bagginsbill opened this issue on Oct 25, 2007 · 273 posts
ice-boy posted Fri, 10 April 2009 at 6:32 PM
Quote - ice-boy what do you mean there should be no AO where the light comes from?
AO is supposed to be used to block the IBL. The same spot may also have a directional shadow. The directional shadow should correspond to the blocking of directional light, and the AO shaodw should correspond to the blocking of ambient light - usually implemented as IBL.
If you use light-based AO on the IBL, this will work perfectly.
If you use material-based AO it will not work perfectly, because the darkening will affect the reflected light from all light sources, not just ambient IBL light sources. That's why it would be better to use light-based AO. But if you get too many bad results from the LBAO, you have no choice. So that's why I modulate the MBAO, to take into account that not all of the diffuse reflection is actually from ambient light, so the amount of darkening has to be tweaked. It is not based on iterating over each light in the shader, and only doing MBAO for IBL lights. There should be a switch on the MBAO that tells it to automatically adjust for the proportion of the diffuse light that is from IBL versus directional, but there is no such switch. So we have to hack it. That's why I use the N node.
so there should be no AO where light comes from.so since material-based AO doesnt work how it should i made a shader.
just playing around with nodes a little. i used gain to make more contrast in the diffuse. and used bias to make it darker.