tangent.w acts wrong?

Posted By: Puppeteer

tangent.w acts wrong? - 05/30/11 22:25

I am using a normal mapping shader on a character and it seems the binormal acts weird.
I tried the same model in Unity3d and the normal mapping worked perfectly so it is not an issue of the model.

Example:
Picture

Look at his nipples. One nipples lighting is horizontally inverted.

I talked to a lot of people and it seems that this is a common issue.

It would be great if this could be fixed in the next version as it really lowers the quality of the normal mapping and creates really unrealistic lighting on some models.


Thank you
Puppeteer
Posted By: jcl

Re: tangent.w acts wrong? - 05/31/11 09:53

Tangent.w is correct, and normal mapping works obviously with other people's shaders. A bad looking shader, as in your image, could be the result of a wrong built tangent matrix. A similar problem can be caused by using bones matrices in combination with non-uniform scaling. It can be even a wrong normal map. We had all those cases.

Correct normal mapping is indeed a little tricky due to just this problem. Check out the shader workshop, chapter 4. You can also use one of our standard normal mapping shaders as a template.
Posted By: Puppeteer

Re: tangent.w acts wrong? - 05/31/11 18:49

Thank you!

You were right. The template shader works as it should.
I will find out what gone wrong with my shader.

Thanks again.
© 2024 lite-C Forums