Normal Mapping HELP

Blitz3D Forums/Blitz3D Programming/Normal Mapping HELP

SirGorto(Posted 2004) [#1]
Anyone have some good code that actually works for a 3D object using normal mapping? I have code working for a single face as long as it is facing one direction. All other faces are normal mapped with the same normal map but if a face is not in the correct direction is is still looked at as if it is.

Example: My one face works perfectly and the lighting on the normal map works great, but a face that is facing the opposite direction will be all black if the light is directly in front of it.

Hope somebody understands what I am trying to say. I just need help... Any example code with a 3d model normal mapped woould help a lot.


CyberHeater(Posted 2004) [#2]
I'd like to know as well. Has it something to do with tangent mapping?


IPete2(Posted 2004) [#3]
Sir,

You need to use fourlights when you make your original model and textures etc. N, E, S, W I believe 90 degrees from each other.

Look at Robs code for an example of the model with the texture mapping etc included. He's a real gent that Rob chap!


IPete2.


Ross C(Posted 2004) [#4]
You need to use world space mapping in blitz. If you look at robs normal map texture, you'll see it. Unfortunely, it's not an easy thing to acheive, and very little tools (that folks can afford) do this :(


SirGorto(Posted 2004) [#5]
I figured it out really well but with my program there is never a dark side to the object. Is this due to my primative normal map or to my lighting equations?


Ross C(Posted 2004) [#6]
YOu need to use world space normal map. Meaning, as the angle of the surface changes, the colours will change to suit.