Normal Mapping question

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
panoramix
Posts: 6
Joined: Thu Oct 06, 2005 8:49 pm

Normal Mapping question

Post by panoramix »

Hi there, I've modified CXAnimationPlayer's method getMesh to return an IMesh * cosisting of S3DVertexTangents... so far so good, it works and now I can apply materials of type EMT_NORMAL_MAP_* and EMT_PARALLAX_MAP_* on animated .X files. The odd thing is the normal map texture in the examples is generated from a heighmap texture... you know, the grayscale kind. Which gets converted to a normal map in a call to driver->makeNormalMapTexture(NormalMap, displace);. What I need to know: is there any special way to load a normal map, the RGB or RGBA kind, as generated from 3dsmax or zbrush directly? do I just need to load it normally? if so... the normal map should be generated for model or world space?

heightmap:
Image

normalmap:
Image
Post Reply