Game Development Community

Where is the light coming from?

by Ian Dale · in · 01/20/2005 (8:40 am) · 6 replies

This is a picture of a TSstatic object I have in my interior:

users.tpg.com.au/adsly3la/screenshot_008-00001.png
And this is how it's defined in the mission file:

new TSStatic() {
position = "97.7038 -214.42 51.23";
rotation = "0 0 1 90";
scale = "0.25 0.25 0.25";
shapeName = "~/data/shapes/toilets/toilet1.dts";
receiveSunLight = "0";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0.200000 0.200000 0.200000 1.000000";
castshadows = "0";
};

The model was built in Milkshape 1.7. The interior actually has no lights defined inside it.

Yet as the picture shows, it appears that some light is shining on it. Where is this light coming from?

Regards,

#1
01/20/2005 (10:25 am)
I have a similar problem with the Blue Guy model that BraveTree released for free. I'm just using it for testing.

This is using an old version of the LP as well. It is weird because the Orc works as expected but the Blue Guy lights up no matter what. I wonder if it is an export setting.

[IMG]http://img131.exs.cx/img131/1268/screenshot005000011ih.th.png[/IMG]


[IMG]http://img131.exs.cx/img131/5606/screenshot004000019ez.th.png[/IMG]
#2
01/20/2005 (2:32 pm)
Hi Ian,

It looks like you have a light on the other side of the wall that's illuminating DTS objects (has 'DTS Objects' checked in the Light Editor), you need to disable the DTS lighting (un-check it).

Setting static lights to illuminate DTS objects makes the lighting static on interiors and the terrain, but dynamic on DTS objects. Depending on the situation this can create much nicer lighting, but it also allows the light to shine through walls. Disabling DTS illumination stops this and still allows the object to be illuminated by the terrain or interior light maps. If the DTS object is a TSStatic there are a ton of extra options for tweaking the lighting.

If you need the light to directly illuminate the TSStatic DTS objects in it's room, but not objects in other rooms check out the Modeler's Guide under the section 'Common DTS Lighting Scenarios' and the subheading 'Linked lighting'.


Hi Michael,

It looks like that model's material is setup as self-illuminating, you'll need to check out the DTS exporter documentation for details.


-John
#3
01/20/2005 (7:29 pm)
Thanks John. I didn't even know that there was an option for textures to be self-illuminating.
#4
01/21/2005 (4:43 am)
I recommend checking out the self-illumination options, you can make really cool effect with it. For instance you can make parts of your models look illuminated, like head lights, light strips, and you can animate the self-illuminated texture for really cool glowing effects.

The DTS spotlight objects in the Lighting Pack demo use self-illumination on the inside of the cone to enhance the sharpness of the lighting, you can disable all of the lights in the demo and it still looks like there's a light inside of the cone (very cool).

Torque has a lot of cool features like this that are relatively unknown, as an example you can setup DTS objects to render in additive or subtractive modes, and with detail maps.

Here's a cool reference of DTS features and the exporters that support them:

DTS Exporter Matrix

Hope this helps!

-John
#5
01/21/2005 (5:55 am)
Thanks again John. And the LW exporter supports it :)
#6
02/09/2005 (6:09 am)
Another thing to look at is the sun, this causes me all kinds of misery. The sun will light things you dont want lit so set the color of the sun to 0 0 0 to see if that affects things any then look for light pack / dts lighting issues.