normalmapping with 2 lights?

Blitz3D Forums/Blitz3D Programming/normalmapping with 2 lights?

Svenart(Posted 2008) [#1]
Hello together,

I want to add normalmapping to a game I´m working on in my free time. Everything is ok with one light, but I dont know how to make it with more lights. Can anyone help me with that? I tried it with the athena.bb normalmapdemo.

Also, how Is it possible to use specularity together with normalmapping?


Svenart(Posted 2008) [#2]
one more question: how can I make the "lights" colored when using normalmaps?


Naughty Alien(Posted 2008) [#3]
..i think you cant do it with more than 2 lights...Devil lib use to mess with that but I cant be sure is it working or not..


Ross C(Posted 2008) [#4]
Specularity, from my research in blitz 3d, can be done by:

Creating a map showing which parts you want to be shiney (White pixels) and which parts you want to be non shiney (Black pixels)

Creating a cubemap or sphere map to give the shiney moving map.

And having a normal detail texture map.

Apply the detail map on layer 0,
Apply the shiney map (or specularity map whatever you want to call it)
Apply the cubemap.

That should work. I may have mixed up the order, but those are the three maps you need.

For two different lights, you need a seperate cubemapped normalmap. I don't know if you've seen the normal mapped cubemaps before? It's the only way to get normalmap to work on animated entities properly, and IMO, the best way to do normalmapping on convex types meshes.


Svenart(Posted 2008) [#5]
thank you all for your help:)