Page 1 of 1

creating a tangent-space normal map from terrain normal map

PostPosted: Fri Dec 11, 2009 8:48 am
by stevenc
I use the height map created with L3DT to create a 3D model in 3D Max.
I then want to use the diffuse texture and the normal map of this terrain created in L3DT.
But the problem is that the mountain slopes is also present in this normal map.
So when I would apply this normal map on the 3D model the result is wrong (because it's in tangent-space). (the result is correct when I use it in world space, but that's no good)

So my question is, how do I get a normal map wich just the extra detail of the normal map in it, not the mountain slopes ?

Or what would also help is if I could create a 3D model from the normal map (instead of only from the height map).

PostPosted: Sat Dec 12, 2009 2:24 am
by Aaron
Hi Stevenc,

Thanks for your questions.

Or what would also help is if I could create a 3D model from the normal map (instead of only from the height map).


I may be misunderstanding you, but I think you might find that the resultant mesh would be prohibitively large in size (many millions of vertices or more). The normal map is usually (or should be) at least 4x higher resolution than the heightfield, so for a 1024x1024 pixel heightfield you would end up with 16 million vertices on the normal map mesh. Furthermore, you can't decimate this mesh without losing the normal map detail, so you'd be stuck with rendering all those verts.

So my question is, how do I get a normal map wich just the extra detail of the normal map in it, not the mountain slopes ?


An excellent question. At this time, L3DT does not support generation of tangent space normal maps. However, the modifications required to generate tangent space normals are not particularly arduous, so I'll try to add them to the next developmental build. I'll post back here when done. Thanks for the suggestion.

Best regards,
Aaron.

PostPosted: Sat Dec 12, 2009 12:51 pm
by Aaron
Hi Stevenc,

Great success! I've modified the normal map generator to also create tangent space normal maps. I now have to wire up an extra check-box in the normal map wizard to enable/disable tangent space normal map generation. I'll post back here when it's all available for download.

Regards,
Aaron.

PostPosted: Sun Dec 13, 2009 7:25 am
by Aaron
Hi Stevenc,

On the Pro downloads page* you will now find L3DT v2.8 build 3, which includes support for tangent-space bump map generation. To use this feature, enable the 'Generate tangent-space bump map' checkbox on the normal mapping wizard. This option will create a new map in the project called 'TN-tangent', which is your tangent-space bump map. Please let me know if you find any problems with this feature.

* If you've registered for a trial or purchased a license for L3DT Professional from Bundysoft, the link to the downloads page is in your registration / sales receipt e-mail. If instead you're using a license for L3DT for Torque from GarageGames, please let me know, and I'll generate an appropriate installer for you and send you the link.

Best regards,
Aaron.

PostPosted: Mon Dec 14, 2009 12:25 pm
by stevenc
Sorry for the late response, I didn't expect such a quick reply and solution.
Thanks a lot Aaron, that should really help. :)

And yes, I'm using a license for L3DT for Torque from GarageGames.


On a side note, I know the mesh made from the normal map would be really large, but the terrains I'm making are fairly small so I thought that wouldn't be a problem. (though I might be underestimating just how big the mesh would be)

PostPosted: Tue Dec 15, 2009 9:31 pm
by Aaron
Hi Steven,

You'll find the download instructions in your PM inbox.

Best regards,
Aaron.