Page 1 of 1

Normal Mapping question

Posted: Wed Dec 21, 2005 5:55 pm
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