Normal mapping for Cal3D

I’ve just upgraded by Java port of Cal3D to 0.10 which includes support for tangent spaces and our artist is producing normal maps for our characters - now I’ve got to make them work! I understand the basic principles, but there’s still quite a gap left to jump to working out how to do it in OpenGL. Googling suggests a variety of shader programs (which I’d like to avoid for a while yet) or using the DOT3 ARB extension - and I haven’t been able to find any good references for how to use that.

I’d be very grateful if anyone could give me some good pointers (or even better code snippets) for doing normal mapping in OpenGL?

Also, if you have any hints on how to do per pixel specular lighting with a specular map, I’d appreciate that too!

There are some possibilities to implement Normal-Mapping. I use GLSL shader for this. You could also use CG and compile them to ARB fragment program assembly. Another approach is to use Cube-Maps to simulate per pixel Lightning:

http://developer.nvidia.com/object/cube_map_ogl_tutorial.html

for this approach you have to precalculate a corresponding cube-map from your normal maps.

also 3dkingdoms describes the “old way” of doing it:
http://www.3dkingdoms.com/tutorial.htm

Ah - “dot3” is now the “old way” - thanks for the links. Looks like I need to catch up with GLSL and CG pretty damn quickly :wink:

Is GLSL reasonably widely available on typical gamer’s machine now?

Depends on your “typical gamer” :slight_smile: First person shooter fans generally up to date. Casual gamers, not so much.

Kev