Cubemap creation for normal mapping?

Blitz3D Forums/Blitz3D Programming/Cubemap creation for normal mapping?

Finjogi(Posted 2005) [#1]
I'm trying to create cube map for normal map lighting purposes. Instead if calculating vertex to light normal I'll apply "normalcubemap" to mesh (texture 0) and then apply normal map.

This is code that I hacked together for calculating cube map textures.



I think this is not right method to do it as for example front face z component / blue is constant acros the face and it makes normal mapped object little bit flat even if for example a sphere object seems to be lit ok..

Any ideas for correct or better way to make this kind of "normalizing" cube map?


Ross C(Posted 2005) [#2]
This is very good man. I've been looking for something like this :D This should enable you to do cubemaps on animated characters, as the cubemap will auto select the colour, for the angle the the vertices are at :o) Nice work!