PDA

View Full Version : Normal map bug



cedric guillemet
08-08-2003, 05:23 AM
hi.
I'm using normal maps without PS but I have a little bug. I don't know where it comes from. the UV tangents seems to be good.
here is a shot:
http://www.kapsul-design.com/Shots/bugpolybump.jpg
thanks for your help

Cedric.

Edgar
08-08-2003, 05:35 AM
It looks loke you need to smooth your tangent base on verticies which are shared among several polygons.

-Edgar

Jan
08-08-2003, 06:10 AM
@Edgar: Can you tell me, how i properly calculate binormals and tangents for a vertex, when i have a vertex-normal instead of a face normal?
The only information i have are the normal, binormal and tangent for the current polygon and the vertex-normal of the current vertex i process.
Now i want to change the tangent and binormal, to be correct for that shared vertex.

@Cedric: To calculate vertex-normals, just find all triangles that share one vertex. Then add all face-normals of those triangles together and normalize the resulting vector. This is the vertex-normal for that particular vertex.
Repeat that step for all vertices in your model.
For bumpmapping to look right you have to calculate a tangent and binormal for every vertex, which takes that vertex-normal into consideration.
Thatīs the point where i got stuck at the moment.

Jan.

cedric guillemet
08-08-2003, 06:54 AM
you were right Edgar. Thanks for your help.

Antorian
08-08-2003, 08:50 AM
Cedric:
If you are from France, and want to do a teamwork project please email-me.
Thanks.

cedric guillemet
08-08-2003, 12:19 PM
Originally posted by Antorian:
Cedric:
If you are from France, and want to do a teamwork project please email-me.
Thanks.
I don't find how to contact u. contact me at: cedric [dot] guillemet [at] tiscali.fr