Normal maps

Started by
3 comments, last by chubakueno 13 years, 1 month ago
How can I implement a normal map in a Sphere only with the Sphere Normal(How can I know the tangent and bitangent) and transform the normal map to tangent space. After googling a lot I can't find the tangent, I will appreciate your reply .

Advertisement

How can I implement a normal map in a Sphere only with the Sphere Normal(How can I know the tangent and bitangent) and transform the normal map to tangent space. After googling a lot I can't find the tangent, I will appreciate your reply .




The tangent and bitangent are equivilent to the U and V vectors in object space, so if you have a Triangle, you can generate normals, tangents, and bitangents from it. Your google fu is not strong. Here is a tutorial i got from the first page of hits.
The problem is that I'm not working on OpenGL, neither with triangles, so I don't have u and v. I'am working on a basic raytracer I code to study the the 3D rendering basics, so I don't have any triangles, only a mathematicaly defined sphere.I can get the tangent from the sphere but I can't get it from a more general case.
Are you texture mapping the sphere yet?

Are you texture mapping the sphere yet?

I've textured it with a cylindrical projection and normalized coordinates procedurally obtained from the 3d sphere, but in the triangle case the u and v are relative to a "p0" point (any of the 3 corners) and the triangle is always planar, but in a mathematically defined solid doesn't apply because the solid may be not planar and there is no reference point parallel to the tangent plane .

Sorry if there are gramatical errors :D

This topic is closed to new replies.

Advertisement