Normla maps on 3D objects

Blitz3D Forums/Blitz3D Programming/Normla maps on 3D objects

Shifty Geezer(Posted 2006) [#1]
I'm trying to create some asteroids with normal mapped objects. All the examples I've seen of normal mapping have it on static scenery. I get it to work fine on a static astroid, but the moment I rotate the rock, the lighting moves with it, as though attached on rather than being a real lightsource illuminating it.

Has anyone any examples of or suggestions for more dynamic normal mapping, for fixed lights and moving objects rather than the usual miving lights on fixed objects?


Ross C(Posted 2006) [#2]
There was one a while back. I modified it to work with a better model, to see the effect better. But, the light source was static. You could rotate the mesh though, and the normal would react correctly.

Limme see if i can find it.


Shifty Geezer(Posted 2006) [#3]
Oooo, please do please do please do! I'd only want a static light source. I'd just have rocks with the normal maps, to look a bit more rocky, and everything else would be lit normally.


Ross C(Posted 2006) [#4]
Ok, here is the link:

www.rosscrooks.pwp.blueyonder.co.uk/normalmapping1.zip

What is happening, is the model and scenary is being rotated. Just look at the textures being used and what order they are applied. The most important thing is to use the cubemap image.


Ross C(Posted 2006) [#5]
Btw, this isn't my code. I could find the code i did, with the other model. The credit is in the source :o)


Shifty Geezer(Posted 2006) [#6]
Many thanks. I'll give it a seriously look when I get chance, but it seems to do the job.