RobynsVeil opened this issue on Jan 24, 2009 · 490 posts
bagginsbill posted Fri, 06 March 2009 at 8:48 AM
Wow - big post. Let's take small steps. I'm going to give you quick recipes, sort of like "30 minute meals". That means this is the easy version. It is not what you'd get in a gourmet restaurant, i.e. one of my full-bore shaders, ok?
OK So here's the recipe for AO. Multiply the AO node with your diffuse value. If you are using a constant for diffuse value, such as 1, then all you need to do is 1 * AO, which is AO. See?
Suppose I have this fragment:
spec = Blinn(...)
diff = Diffuse(color, 1-spec)
The second expression in the Diffuse constructor is my diffuse value, i.e. the brightness of the diffuse reflection.
So to integrate AO into that I will bring the diffuse value out into a variable, for clarity and improved readability, and then multiply it with the AO:
spec = Blinn(...)
dv = 1 - spec
ao = AmbientOcclusion(...)
dv = dv * ao
diff = Diffuse(color, dv)
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)