Game Development Community

Exterior of Interior Lighting

by CdnGater · in Torque Game Engine · 11/15/2004 (8:17 am) · 3 replies

I'm trying to understand why an interior's exterior textures are dark when you first add an interior to a scene.

I understand that lightmaps are added after based on lights in the scene.

Looking though the code I see that an interiors base lightmaps are loaded, my guess is that they are dark textures.

So the question is, who does this?

Is it because an interior has no lights on the outside when modeled?

or

because the exporter does not add enough light to lightmaps?


I currently have interiors adding dynamicaly, I can already light them individualy using the lights in the scene at run time. But when I do this, I take a major hit each time this happens.

So I want to have the interiors brighter when first added that I dont need to relight them.

Thats why I'm trying to figure out why they are dark in the first place. So any pointers (becides look at the code) as to the reason they are initialy dark would be helpfull.

Thanks

#1
11/15/2004 (10:19 am)
Map2dif generates lighting information for the parts of the interior that are "known", ie, the inside parts. The outside parts are going to have different lighting dependent on the part of the scene they are in. So when an interior is first loaded, it has the inside parts lit and the outside parts dark. Then you have to do a relight to regenerate the information. So the reason they are dark is because there is no information that can be pregenerated for them.

There are a couple ways to optimize that relight or to make it unnecessary, but all of them take some pretty deep understanding of lighting in realtime games.
#2
11/15/2004 (11:19 am)
Thanks Ben, I'm not so worried about whats in the scene to light them at the moment, just wanted to make the initial interiors brighter on the outside when first loaded.

Because players can add (build) interiors in my game, the interiors are loaded on the fly. So I'm just trying to cut out the freeze time of the game as the interior has to be relight to make it brighter.

I think I'll delve into Map2Dif and see if I can just do a simple constent pregenerated texture for the outsides so that I can relight them later.
#3
11/15/2004 (11:50 am)
If you add lights into the scene on the outside, it will work. If you're using quark, just place some light entities around the outside. I tested this about 6 months ago, so it may not work anymore, but I can't imagine why it wouldn't.