Game Development Community

Dynamic relighting of interiors in game.

by Nathan Tran · in · 01/08/2005 (11:08 am) · 3 replies

Hi,

I read the following in the info section of the Lighting Pack:

Filtered re-lighting significantly increases lighting performance by only calculating interiors within the working area. - new!

Although this is in the Light Editor Section can it be implemented to work real-time in the game world? How much of an increase in relighting can I expect from this feature?

In my game, I plan to allow players to upgrade their housing. This requires changing interiors on the fly. In stock Torque, adding new interiors result in the need to relight the scene. This takes seconds to do and the game simulation pauses during this operation. Is it realistic to expect to be able to dynamically add lighted interiors in Torque or am I trying to do the impossible?

Nathan.

#1
01/09/2005 (2:50 am)
Hi Nathan,

Right now the TGE SceneLighting code is all or nothing - either it relights the entire scene or doesn't relight at all. The Lighting Pack's Filtered Relight skips unneeded interiors, which appear black, because they were processed by SceneLighting, but skipped by the Lighting Pack, so they don't have any lighting. Even if you can get SceneLighting to relight specific objects big interiors and the terrain will likely slowdown the relight process.

Hope this helps!

-John
#2
01/09/2005 (10:54 am)
John,

Could you please explain in greater detail what was said in the following sentence?

"The Lighting Pack's Filtered Relight skips unneeded interiors, which appear black, because they were processed by SceneLighting, but skipped by the Lighting Pack, so they don't have any lighting."

You've lost me on the purpose of the filtered re-lighting.

Nathan.
#3
01/09/2005 (8:22 pm)
Sure thing, the Filtered Relight makes building and tweaking mission lighting faster and more efficient by only relighting the interiors within you working area (your working area is defined by the the filter radius shown in the Lighting Editor with it's center at the camera). You can see which interiors are in the working area by the pink bounding box highlight around them.

The SceneLighting code (both TGE and Lighting Pack) deletes the existing interior light maps and then recalculates them for all interiors during a relight, which means that the light maps are deleted, but only recalculated for interiors within the working area - all other interiors then become completely black.