Game Development Community

Dynamic lighting and shaodws

by Dan Partelly · in Torque Game Engine Advanced · 11/25/2005 (11:15 am) · 2 replies

Hi. I have here a small set of questions regarding MS4.

1. What kind of dynamic lighting will you impleement ?
2. What kind of shadow algorithm will you implement ?
3. What kind of light sources will you support ?
A. Point
B. Spot
C.Directional
4. Will you support an arbitrary number of light sources / object or there will be hacked and limited to closest light source ?
5. How will you handle dynamic lighting of terrain , and for interiors ?
6. How will you handle lighting of charachters ?
7. Will you update lightmapping technologis used (Atlas lightmapping) ?
8. How will you handle lightmapped / dynamic light interactions ? How will you handle lightmapping influences
on charachters ?

Thanks, Dan

#1
11/25/2005 (11:39 am)
While i cant answer everything very solidly, they went into this some at IGC

1) Not completely sure at the moment, but it will interact with the shaders like bump/normal mapping, etc
2) They are looking between stencil shadows and shadow maps
3) again, with this i am unsure
4) There's always a hardware light limit on the video cards, but i am unsure what GG's planning to do concerning that :p
5) If they go with shadow mapping, everything in the game world would cast a shadow from the shadow map, which is dynamic, so terrain and interiors would shadow dynamically as well. However, if they choose stencil shadows, there's the very good possibility that other techniques would have to be used on static things.
6) Lighting on characters i would imagine would be pretty spiffy and interact with the normal mapping/bump maps you may have on it, but their exact plans i dunno yet(not like i'm working for them, as spiffy as it'd be :P )
7) As stated above, if shadow maps are used, they'd likely let shadow mapping deal with the terrain shadowing, as it be the quickest and most uniform method.
8) if shadow maps are used, it wouldnt be too hard to have dynamic lights have access at the shadow maps as well, so using a flashlight on the terrain(again, if shadow maps are used to light terrain anyways), it would light accordingly

GG can come in and beat me with a stick for wherever i'm wrong, but that's the general gist of what they where saying at IGC :)
Hope that gives *some* insight, though GG'll have to clarify for us to be sure :)
#2
11/26/2005 (12:14 pm)
As far as lights go.. the lightmanager in TSE is actually working (uncomment 1 line of code in sceneobject)..If you look in material.cpp you see that is hard coded to grab the sun, light[0]. Change that to grab a real light and your in business. not an official solution but it should get you going..