Game Development Community

Animated lightmaps for DIFs?

by Rubes · in Torque Game Engine · 09/17/2008 (4:17 pm) · 9 replies

I was peeking at the feature list for TGE and TGEA when I came across the description of "Doorway", the part of the engine that handles DIF structures and the seamless transition between interior and exterior environments, at:

http://www.garagegames.com/products/torque/tgea/features/doorway/

Interestingly, I read this portion with great interest:

Quote:"Torque also features animated lightmaps so you can add color cycling, fading, flickering, among other effects designed to help you achieve a desired environmental mood or style."

I thought DIFs only dealt with static lightmaps, and I don't recall hearing much before about animated lightmaps. After a few searches, though, I haven't really been able to find out much information on this. Does anyone know much about animated lightmaps and how to set them up?

Thanks...

#1
09/23/2008 (5:17 pm)
Bump...anyone?
#2
10/08/2008 (6:26 pm)
The entity names are "light_strobe", "light_pulse", "light_pulse2", "light_flicker", and "light_runway". The only ones I've used are "light_strobe" and "light_flicker"; "light_strobe" is, as the name implies, simply a on-off effect, and "light_flicker" creates a flickering effect simply by picking from a list of color values which you must specify. (IMO, the current implementation of "light_flicker" should be tossed in the trash bin and rewritten since it tends to look terrible no matter what settings you specify.)

Oh and all these light types let you specify timing settings, of course.

HTH!
#3
10/08/2008 (7:57 pm)
Interesting, thanks...but where are these specified? In the model itself? Is it part of the DIF exporting process?
#4
10/09/2008 (11:55 am)
Sorry, I was under the assumption that you were familiar with how to place lights within a DIF; these work the same way. Within your DIF editor, create an entity, open its Properties window, set it to the desired light type, and adjust the properties. That's pretty much it.
#5
10/09/2008 (12:35 pm)
Thanks, I was asking mostly for the person doing the modeling. And it's good to know about the flickering code...that's the one I was most interested in. Ah well.
#6
10/09/2008 (1:13 pm)
My suggestion is to try it out, play around with it; you may be able to get it to work for your needs.

In my experience, it's just too fiddly to get it looking the way I want. For Frayed Knights, I really wanted to use these to approximate torch light, but it wasn't happening. I spent considerable time going back and forth between editor and game, tweaking and re-tweaking the properties, but I could never get it to look quite "right".

If you're willing to do a little engine coding you could probably make it look really nice -- I considered doing just that, but decided I had better things to do. =)
#7
10/09/2008 (1:20 pm)
That's funny, I totally missed the connection between you and Frayed Knights. Congrats, by the way! It's an awesome accomplishment.

Basically I'm trying to do the same, although it's candlelight more than torchlight. Similar idea, though. Right now I have a dynamic light doing a pretty good job of it, so I'll probably just stick with that even though the overhead is a bit more.
#8
10/09/2008 (2:42 pm)
Heh, thanks. =)

Yeah, for more sparse lights like the occasional candle (which might be moveable too) I'd definitely stick with the dynamic lights. In the case of FK, there were really too many lights to handle solely with dynamic lights (for performance reasons of course). I think -- including the party light -- there were only a handful of dynamic lights used. Everything else was done with the static DIF lighting, but it got the job done, I think.

And I think that's a pretty good way to go: Use the DIF lighting for the general, "ambient" lighting and use the dynamic lighting for the more specific and detailed lighting.
#9
10/09/2008 (2:53 pm)
That's essentially the same situation we're in -- we have a monastery with a lot of wall candles all around the place. Static DIF lighting is okay for that, but not as good as a nice dynamic, particle-linked flickering light. But with the number of candles we have, performance would be awful.

One thing I'm trying to implement is a zone-style system of turning these dynamic lights on and off based on where the player is located, so at any one time we'll only have a couple of dynamic lights active. Not the most ideal solution, but it might work.