Updating normal dot sample interests for dating sites
The main idea behind using tangent space is going through extra steps to allow the reuse of a normal map texture across multiple parts of the model (storing normals/tangents/binormals at the vertices, and computing the normals of the normal map relative to them, then converting back when rendering.
Also, you could use tangent-space to skin a flat bump texture around a model.) See the Tangent Space article for a more detailed description of computing and using these vectors.
Not all changes are marked, but some are marked with "update" ( MARCH 26th, 2006 ) I made more changes to simplify/streamline this tutorial and bring it up to date, including updating some code.
Hopefully this tutorial is better now and not worse =) code is given in C , using Open GL for rendering.
By writing a tutorial on object space, I'm not saying object space is better.
However it does have some advantages, and is certainly a usable approach.
Instead of using interpolated vertex normals to compute the lighting, the normals from the normal map texture are used.
The low resolution raptor model used for this tutorial has 1100 faces, while the high res model has 20000 faces.
However the amount of detail from the high-res model that will be captured by the normal map is limited by the texture's resolution.
) This means less initial calculations, and you don't have to worry about poorly behaved n/t/b causing distortion.
It's also slightly faster because you don't have to rotate the n/t/b with your model, or convert light vectors to tangent space.
I only use object space for normal maps generated from a high-res mesh, but I use tangent space for bump-mapping on levels.
Below are a few of my personal thoughts on the two methods for those interested, but be aware that there are some tricks or different ways to do things with any method.
Please Note: This tutorial leaves out some optimizations that I've done, but the code and technique given should still run at a decently fast framerate.