0
$\begingroup$

I'm trying to make stylized simple materials, using just matcaps and ambient occlusion (without light). In my current setup, the ambient occlusion is black. I would like to change the color of AO for each material, for getting more "clean" and cartoonish colors. In the attached picture you can see, the black shadow under sphere. In short, I want it to be orange-brownish. Any tips? :)

enter image description here

$\endgroup$

2 Answers 2

1
$\begingroup$

You're using the AO node's output as a mask to blend between your yellow colour and nothing/black. To change black to something else, simply add another colour input to the mix shader like so: enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you very much, this works! :) $\endgroup$ Commented May 7 at 17:47
  • $\begingroup$ @BenKaramyan By the way, I did not include this in my answer because it is basically the same as the above, but if you want the same result like in this solution with a simpler nodetree, do it like this, see the addition in my answer at the end: mixing colors with AO. I would also recommend using the AO output, not the Color output like shown in this answer. $\endgroup$ Commented May 9 at 7:51
1
$\begingroup$

If you just want to darken the color without a change in hue or saturation, you can plug the RGB node into a Hue/Saturation/Value node and plug the AO output of the Ambient Occlusion into the Value socket to darken the color:

ao for hsv

But for such a simple task you could also just set the color in the Ambient Occlusion node itself and use its Color output:

ao with color

The first method has of course the advantage that you could tweak the AO maybe with a Color Ramp for example for more contrast.

By the way, you can plug any texture etc. in the Color input of the Ambient Occlusion node, you do not have to stick to a single color.

And not to forget you could use the greyscale AO values themselves to be converted with a Color Ramp:

color ramp

And just to show this for completion, you can do it like in the other answer just a bit simpler: another method of mixing could be done like this, plug the AO output directly into the mix factor of a Mix Color node. I would not use the Color output from the Ambient Occlusion node (unless you want to use the color field like shown above), because most color outputs in Blender are gamma corrected, except for example when you use an Image Texture node and set it to Non-Color. The AO output gives a linear interpolation between 0 and 1.

ao mix

$\endgroup$
2
  • $\begingroup$ Hi! Yes, , just mixing RGB node with AO solved my problem. Tweaking AO with color ramp also can be useful for my task. Thank you very much for detailed answer! $\endgroup$ Commented May 8 at 21:58
  • $\begingroup$ @BenKaramyan I added another example at the bottom. $\endgroup$ Commented May 9 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .