Game Development Community

Lightmaps for 'static' DTS objects?

by Keith Johnston · in Torque Game Engine · 03/09/2003 (2:59 pm) · 8 replies

I'm wondering how hard it would be to create lightmap textures for dts shapes. I'm thinking that you would load the DTS shapes into the mission editor and place them where you wanted them, flag them as 'static' and then during the relight sequence lightmaps would be created for the DTS objects as well as the terrain and interiors. You could even perhaps use fxLights as part of the lighting calculations, in addition to the ambient and sunlight. The DTS rendering code would have to be changed to blend these lightmaps with the DTS objects of course.

So before I jump into researching this more - I'm wondering if anyone else has thought this through or even tried it and could tell me if its completely nuts...

#1
07/29/2003 (4:46 pm)
OK, I have a new idea here I'm hoping someone can shed some light on (yuk,yuk).

I've figured out how to use 3DS Max to create baked lightmap textures. Now I can set up lights in 3DS, use whatever lighting calculations it has, and then create the lightmaps for the DTS object.

This seems a lot more feasible. I'm wondering if someone has maybe already done it and could offer some tips? One thing I am concerned about is the size of the lightmap textures. Is it normal to use a lightmap that is a lower resolution than the texture it is combined with?
#2
07/31/2003 (1:27 pm)
Melv May spelled this out in the forums... There is this thread to look at.

- Brett
#3
07/31/2003 (1:32 pm)
I think Keith is trying to lightmap the DTS not cast shadows from the DTS (I think).

I have also been looking into getting more natural lighting on the DTS's. Last I check DTS's can cast or receive shadows, but not both.

It would be nice to cast onto surrounding DTS's...

Oh well... :)

John.
#4
07/31/2003 (7:57 pm)
Yes - I'm actually trying to get the per-pixel simulated lighting on the DTS shapes, and I am close to having it working!

I found out that the 3ds max exporter will actually export a second set of texture coordinates if you put a texture in the 'ambient' slot. Then I had to make a one-line change in the engine to get the mesh renderer to use this 'detail' texture. So I'm using the detail texture as the lightmap.

As soon as I have this working I'll post it as a resource.
#5
08/01/2003 (3:08 am)
Hm, well I thought it was working, but I think that is only because I was using a base texture that was relatively uniform. Now I'm trying with two different unwrap UV modifiers and its not working. So maybe it is only exporting one set of texture coordinates. Looks like I may need to modify the exporter after all.
#6
11/14/2003 (6:47 pm)
Do you have a usable result with the per pixel lighting study on dts objects Keith ?
#7
11/14/2003 (7:28 pm)
Actually, we ended up using the texture baking feature in 3dsmax. This actually works pretty well if you don't mind generating large textures.
#8
11/15/2003 (4:32 am)
Yes, we are using texture baking too, not in max, but Lightwave, its really nice, but still fake.
Im looking for a perpixel solution for the realtime dinamic lights, just becouse my complex DTS dungeon have dynamic lights in it, and i still have dynamic lights problems, just becouse the behaviour of per vertex lighting of open GL.