Game Development Community

Lighting and normal maps

by Wicked Sunny · in Torque X 2D · 07/02/2007 (7:13 am) · 4 replies

I have two issues-

1) How exactly do I create a normal map for a 2d image ? Using which software?

2) How exactly do I apply lighting ?

I was trying to play with the Tank blaster airplane, when I apply the normal map and enable lighting I get bit of details but not exactly the kind of lighting I find in the tank buster game demo. (Obviously after saving/running the game in XNA). How do I achieve that lighting effect?

About the author

Sunny is Multi Award Winning Poet, Writer, Designer and Chef. He is the Director of PublishingGurus.com, a book publishing company.


#1
07/02/2007 (5:15 pm)
If I'm not mistaken, the normal maps in TankBuster were made by hand using photoshop. Another method would be to create a mesh in any third party 3D modelling app and bake out a lightmap.
#2
07/02/2007 (9:55 pm)
Thanks Thomas.

3d is not a problem, but I found that the plane was 2d and not 3d thats why I was a bit confused.

normal maps in photoshop, I never tried something like that before, any links tutorials for creating normal maps in photoshop ?

Will be searching on google, but I doubt I will find a link for 2d images.

edit- Ok I found a Nvidia plugin and I think thats pretty cool :)


Thomas

As TXB adds its own specularity option, do I need to add a special specular map on my normal map or should I import a simple normal map in TXB and add specularity here ?

moreover How exactly I add lighting ? using light components on a data object and mounting it on the plane or directly assigning component on the plane ?
#3
07/06/2007 (10:34 am)
Make sure you copy the plane's material definition over too - from what I can tell in the TankBuster demo level the plane has lighting disabled, and the bump detail is generated from the default direction/intensity.

Adding a T2DSceneObject that contains a LightRegisterComponent with lights to the scene automatically adds the contained lights to the scene, which will light all objects with materials/effects that support lighting. If the lights are point lights the source will originate from the scene object's position. You only need to add lights directly to a sprite for custom lighting on the object or to have lighting originate from the object.
#4
07/08/2007 (10:02 am)
John Thanks for that , I will definitely try this out, but only if TXB stops giving me video memory errors.