Doom 3 normal mapping, object or tangent?

Squeak

Veteran
Does Doom 3 use object or tangent space normal mapping, or a combination of both?
Before I updated ATI drivers, there was this noticable seam down the middle of all characters. The most likely reason for that AFAICS, is that the game uses object space normal maps, where the normals are flipped for rendering both sides of the model. I've also searched some old threads on B3D that talks about Doom 3 using OSNM.
Then comes the part that puzzels me, doesn't OSNM normally only work on static geometry, that is non-deformable models? Is there some workaround for this (for example not using it at skinned joints) or did id use tangent space normal mapping?
 
Squeak said:
Then comes the part that puzzels me, doesn't OSNM normally only work on static geometry, that is non-deformable models?
I can't see why it shouldn't work. With the object-space normal models, you have an implicit coordinate system (whereas with the tangent space system, you have to supply explicit vectors on each vertex).

It seems to me that you can just as easily "warp" the light direction with the skinning matrices (I think).
 
Simon F said:
It seems to me that you can just as easily "warp" the light direction with the skinning matrices (I think).
Yup, as was recently discussed in the gdalgorithms mailing list: "Normal map building process" (plus also a while ago in another thread).
 
Simon F said:
It seems to me that you can just as easily "warp" the light direction with the skinning matrices (I think).
Ooh, Of course! But if you can do that, why ever use TSNM?
 
Because, I believe, object-space normal mapping requires more calculations to be done before rendering. And, of course, it's easier to warp geometry. While I'm sure you can do it with object-space normal mapping, you would still have to update the entire map every time you modify the geometry.
 
Ooh, Of course! But if you can do that, why ever use TSNM?

Well, one thing I could think of is that tangentspace maps would lend themselves better for compression since in general the normals are facing mostly in the same direction. Also, tangentspace allows you to derive bumpmaps from heightmaps without taking geometry into account, which is probably an advantage to artists (for example, applying standard noise bumpmaps or metal plate textures or such).
 
Because, I believe, object-space normal mapping requires more calculations to be done before rendering

On static geometry, object-space normalmapping requires less calculations, since you can use object-space light vectors directly, for all triangles.
On dynamic geometry, you have to find the transform from the old object space to the new object space, which I suppose can be done in pretty much the same way as tangent-space.
 
Squeak said:
Simon F said:
It seems to me that you can just as easily "warp" the light direction with the skinning matrices (I think).
Ooh, Of course! But if you can do that, why ever use TSNM?
Because (AFAICS) with TSNM you can re-use the same texture over and over in different places on different models, while for the object space technique, each texel is effectively tied to a particular small area of a particular model.
 
I don't know for certain if normal maps are stored in tangent space, but I'm guessing they are because of this carmack quote:

http://www.beyond3d.com/interviews/carmack04/
CPU skinning, shadow generation, and tangent space reconstruction are the parts of Doom that take up significant time in timedemos, but there is a lot of driver overhead as well.

If part of your world is known to exist in tangent space it's a reasonable assumption that the rest would be stored in tangent space also where possible to simplify processing.
 
Back
Top