Home Technical Talk

tangent basis - normalmaps from xNormal to Ogre

polycounter
Offline / Send Message
rollin polycounter
Hi, I'm again hitting this topic and maybe someone of the shader coder can lead me into the right direction.

I want to bake normal maps in xnormal which show up in ogre as nice as in the xnormal viewer.

I would love to know how a typical and simple hlsl shader creates the tangent basis. And how xnormal does it compared to it.


The problem is I still don't really understand what is meant by "basis"

As far as I understand it you have
  • the highpoly with normals for every spot on the surface
  • the lowpoly with the same but a lot less vertices
  • and the normal map which gives you a normal vector for every pixel, storing the information how to get from the lowpoly-surfacepixel-normal to the normal of the highpoly at this spot (more or less as we know this depends on the rays).

The tricky part is where the viewer or baker gets the tangents for a pixel/spot of the surface.

I want these formulas. I want the real vector math. As long as I don't have that I will for sure never really understand this.

cheers

Replies

Sign In or Register to comment.