Hey to all,
OK, quick question, what is the best way to use an AO map, which is married to my Diffuse, to fake pending on Light Vector, the effect of AO.
Here currently what my setup looks like:
Diffuse * Lerp ( 1.0, AO Map, (Dot (L, N ) )
Currently, it looks OK, but at the same time, it looks weird. The light doesn't feel like it's killing the AO map when directly exposed to a surface, especially up close and personal.
However, strangely enough, when I use the blue channel on my Normal Map to as my AO, it interacts correctly with the light.
To make it even more strange, when I plug my Normal Map to my Dot, as opposed to 0,0,1 I get WORSE result.
Much appreciated for any feedback on this.
Replies
I was curious about this as well, but unfortunatly I don't know how I would do it. Can you post some pics of what you got so far?
Basically, Lerp gets in the Alpha your Light function and the AB slots get the texture.
The problem is, from my normal map, especially the blue channel, the shadows get exposed correctly. The bends project shadows, etc, without being too dark in the light areas.
Problem is, with a REAL AO map generated from the HP model, the parts of model which receive light end up looking real nasty, as in someone shot liquorice on my model. I'm guessing I need to also copy the function to my Specular slot to tell it to not expose any Spec power in the shadowed parts.
LERP(diffuse*ao,diffuse,DOT(lightvector,normalmap))
Direct lighting would have NO AO, direct lighting's shadows are handled my dynamic shadows or shadow maps, so that would be Dot(Normal,LightVector)*DiffuseTexture going into custom lighting, then DiffuseTexture * AO would go into CustomLightingDiffuse input. CustomLightingDiffuse is what handles indirect lighting.
Unfortunately, no matter what I do, the R and G channels end up with seams on my model. They simply do not match up at the seams, so I'm left with the blue, which while works, can look abit off in certain dents and pushed in areas.
However, the delicious paradox is for any tile based texture, you can get out the RG channels correctly and play around with them.