1
$\begingroup$

I am trying to make a procedural texture for donut, I want the white dots ( sugar ) to be only on top instead of all over the donut, How can I do ?

enter image description here

$\endgroup$
  • 1
    $\begingroup$ weight paint maybe? $\endgroup$ – eromod Jul 5 '16 at 4:08
2
$\begingroup$

To get a mask of the top of the model, you can use the Normal output of the Texture Coordinate node. This gives a map of colors -1 to 1 along the X Y and Z axis. You can use a separate XYZ node to use only the Z axis, which can be used as a mask of the top of the model.

Node Setup

This gives a nice result

Donut

I used the Subtract node to control how high the mask was on the donut. Because the output from separate XYZ is a black and white image, you can manipulate it easily.

Mask

Then I added the Sugar texture onto black using the Z Normal as a mask, giving a black and white texture with the white dots acting as sugar.

$\endgroup$

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.