Sign in to follow this  
chubakueno

Normal maps

Recommended Posts

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 .

Share this post


Link to post
Share on other sites
[quote name='chubakueno' timestamp='1297911861' post='4775242']
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 .


[/quote]

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. [url="http://www.terathon.com/code/tangent.html"]Here[/url] is a tutorial i got from the first page of hits.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[quote name='CDProp' timestamp='1298249133' post='4776844']
Are you texture mapping the sphere yet?
[/quote]
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this