Game Development Community

Question on dynamic lighting within interiors.

by Ryan Boucher · in Torque Game Engine Advanced · 08/15/2008 (9:27 am) · 1 replies

Using: TGEA 1.7.1

I'm curious about how the interior rendering code builds its list of relevant dynamic lights. I would like to get around the problem that occurs when you have a dynamic light within an interior and the light's effect isn't blocked by self shadowing. That is, one plane within the interior does not block or occlude a dynamic light for another plane behind it.

Using the "DiffuseRestrictZone" doesn't produce an acceptable result because it isn't always possible to zone the scene.


From the way the lighting appears to work, and I've not yet tracked down the specific code within the engine, is that for each plane that is within the radius of the light sphere is included in the dynamic lighting pass for that plane. A normal calculation may be applied at this stage, if it isn't it'll be applied within the shader.

If this is correct then _a_ solution would be: at mission start-up compile a list of the lights and the planes that each light can see, or the lights that each plane can see. It really depends on which is more efficient to store (probably the former).

This calculation could be done via approximated ray traces (the number of rays could be set per light for perf. reasons). Then at render time each plane would ask each light if they are within the lights radius, if true, am I within your "visible planes" list? If true then factor that light into the equation.

Now, this solution does not provide dynamic self shadowing on interiors. What it does provide is for the artist to tessellate their occluded planes so that fake self shadowing occurs, i.e. some portions of the now tessellated plane are occluded.

This may be enough to solve some lighting issues and may be coupled with replacing occluding planes with DTS objects to further provide fake dynamic self shadowing on interiors.


If anyone has any knowledge of the lighting code within the TGEA engine I would appreciate any information on whether this technique is possible or even useful.

EDIT: fixed spelling

About the author

Recent Threads

  • Export/import problems

  • #1
    08/19/2008 (8:37 am)
    No responses... does anyone have any suggestions on where I could find some additional information on the lighting system outside of reverse engineering the code?