Game Development Community

Environment mapping and lights

by William Kosche · in · 08/06/2005 (11:39 pm) · 3 replies

Recently I merged our code to the new beta lighting pack. My modelers and designers are saying that environment mapping isn't working on interiors and the lighting of interios only seems to be working on the debug exe. Any clues as to why this would be happening. Am I missing some steps any where. I followed all of the port instructions and double checked our code. Any ideas?

#1
08/07/2005 (7:07 am)
Hi William,

The Lighting Pack can be setup to render interior textures with alpha channels in two different ways; the standard TGE method which adds environment mapping to the surfaces, or to create transparent surfaces. It sounds like the transparent method is enabled. If you go into the file "engine/synapseGaming/contentPacks/lightingPack/sgLighting.h", look for and comment out the macro SG_TRANSPARENT_INTERIORS - this will set the Lighting Pack back to rendering the surfaces with environment mapping (while you're in there take a quick look around, there are a ton of other cool compile-time modules you can enable, disable and tweak to create your own custom Lighting Pack experience).

None of the Lighting Pack features are only for debug releases, so I think what happened is that during the Lighting Pack merge you may have changed the target executable to SynapseGaming.exe (which is the default in the Lighting Pack project files). If you look in the "example/" folder you'll probably see three executables; "torqueDemo_DEBUG.exe", , and "SynapseGaming.exe". If you run the SynapseGaming.exe it should contain your project and the Lighting Pack. If this is the case just change your target executable name back to what it was (or if you were using the default "torqueDemo.exe", then you can leave it alone until you're ready to change it).

Let me know if this helps!

-John
#2
08/07/2005 (9:24 pm)
Thank you very much, I have been muddling over this for a while now. That i s a great big help. I also found that checking off the vertex lighting checkbox (enabling it) affects your ligthts, as in they don't show up. When i unchecked it they do , so the interior lights mystery is solved also. I didn't think that would happen. But for this beta release everything looks great so far. Thank you for the prompt reply.
#3
08/08/2005 (7:19 am)
Sure thing, I'm glad that helped. :)

The Lighting Pack static lights operate the same as map entity lights when vertex lighting is enabled - the interior light maps are completely discarded, so any lights that only appear in the middle of an interior surface won't show up, because they don't illuminate the surface's vertices, only lights that illuminate the area around the surface's vertices will show up.

Also keep in mind that light maps are used to provide higher res lighting - switching to vertex lighting loses nearly all of you game's lighting definition (ruining the game's mood and feel). I recommend using light maps whenever you can.