Jump to content
Posted 30 October 2012 - 12:51 PM
Posted 31 October 2012 - 01:19 AM
At the first glance I would say, that your normals are correct. I guess that you have a missconception. When you have a surface facing away from your lightsource, the angle between surface normal and light is greater than 90 degree which lead to cutting off the light. But applying a normal map to this surface, the normals rendered to the gbuffer start to bend and this could lead to bending to less then 90 degree which lead to lighting of back faced surfaces.
Even if I only display dot(normal,lightdir) I get light artifacts on the faces the light shouldn't reach ...
Posted 31 October 2012 - 10:16 AM
Posted 02 November 2012 - 03:25 AM
They don't need to. A simple, though extreme, example:
I wonder why normal maps can store normals that go in the face they are displayed on
Most often you only need this for the x,y component, which is absolutly legal and necessary. The z component (pointing away from the surface) is in 99.9% of the time positive, this is the reason all the normals maps got this bluish tint(z-component=b channel > 0.5). But as stated above, the problem is not that a normal is pointing into the surface.
TBN-matrix you need a vector with values from -1 to 1 but why do I store those vectors in the final normalmap?
This is not a problem you can solve by playing around with the tangent-space normal maps, you can only lessen the effect by reducing the angle between surface normal and tangent normal. If you want to get rid of the effect, use either surface normals for normal map culling or shadow mapping or accept it
I guess i have to play with the tangent-space normalmaps then.
Posted 19 November 2012 - 11:39 AM
Edited by yonarw, 19 November 2012 - 11:40 AM.