More on AO JaggiesIt isn't Blender/C4D AO algo alone that's responsible for the jaggies. The current uber-shader is also taking its toll.
The shader original code used the AO map in its ambient channel only, which led to the shadows being almost never visible. Not only is ambient lighting rarely used in our models at all even at its weakest settings, but it also is generally the weakest, the least noticeable lighting component in the final color intensity of the screen pixel even at its maximum 1.0 setting. Thus roughly, the screen pixel final color used to be
Pixfinal = (Colamb * MapAO) + (Coldiff * Mapdiff)In other words, the AO map did not affect the diffuse component (the strongest one) at all and we wouldn't see the AO map jaggies (nor the AO shadows, for that matter) when
Coldiff happened to be bright, and
Colamb*MapAO, pitch-dark for whatever reason.
I thought it wasn't correct either logically or visually. We
do see object shadows in the real world when there is no ambient lighting around (no surrounding scenery for the light to scatter by and/or reflect from) and there is only the very distant sun shining down upon the object, which is what the directional diffuse lighting component is supposed to emulate.
So I changed the shader code roughly in the following way:
Pixfinal = (Colamb * MapAO) + ((Coldiff * Mapdiff) * MapAO)so now we're seeing beautiful shadows under any amount of the always-present diffuse lighting, and these shadows fade out smoothly and gently as we're dimming out the scene lighting with our "stray light" fader.
I think we should stick to this lighting scheme further on. Which also means we should find a technique practical enough to mask off, minimize or eliminate completely the jaggies we're seeing now in some extreme cases like this drone 166 model hull meshes.
What is your opinion about all this, Patrice?
