I ended up with a kinda cool looking pattern for donut icing. I've been trying to use it as a mask between two materials (icing and pastry) The problem I'm facing is that I can't figure out how to get the bottom of the sphere to be black so I can properly use this pattern as a mask. I tried with object and textures coordinates but no luck so far. Is it even possible or is there a better way to achieve what I'm trying to do ?

Thank you in advance for your help !

enter image description here

  • $\begingroup$ Can use two materials on this same object? $\endgroup$
    – lemon
    Nov 3 '20 at 7:26
  • $\begingroup$ Yes, you can use the mix shader node with a mask as Fac $\endgroup$ Nov 3 '20 at 9:50
  • $\begingroup$ Was talking about adding another material. If you don't want that, the simple way is to use a UV map. $\endgroup$
    – lemon
    Nov 3 '20 at 9:55
  • $\begingroup$ Yes that would do the trick. This is something I'm doing for nodevember so no UV maps allowed if I read the rules correctly $\endgroup$ Nov 3 '20 at 10:08

The arctan2 into division step is turning this into a radial gradient. Instead of a light and a dark half you have light and dark quarters of the mesh, basically, and the way you've ramped the color is kind of hiding the problem from you.

enter image description here

So I think what you are asking for is not going to happen without some changes to the math leading up to it. If you take the output of your noise texture into a math node set to Less Than you may find something you like, or try the following:

enter image description here

  • $\begingroup$ Thanks a lot ! I have a bit of trouble understanding what the mix vector/noise does. The output is a "noised" vesion of the textures coordinates ? $\endgroup$ Nov 12 '20 at 22:17
  • 1
    $\begingroup$ Precisely. The XYZ data can be forced down the same paths as RGB and as such can be used with a MixRGB node to give us a handy little factor slider, or you could even plug in another texture as your factor. It's fun to mess around with your coordinate space before feeding it into a texture. The output varies between 0 and 1 quite a lot, and it looked like what you wanted was a solid mask, and that's what the last divide gives us, note that we check the clamp box to limit it to the 0-1 range. $\endgroup$ Nov 12 '20 at 23:19
  • $\begingroup$ Thank you again for the explanation, that is an excellent trick ^^ $\endgroup$ Nov 13 '20 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.