Sun Datablock Ignored
by Wyck Hebert · in Torque Game Engine · 02/01/2007 (7:43 am) · 4 replies
I posted this on a public Torque engine forum, which was probably not the best place, so posting it here as well:
This may be a newb question, but I've done several forum searches and haven't found the answer:
When I make changes to the sun datablock in my mission file (color and ambient values), those changes don't appear to take affect - the scene is still lit the same as before. Whether I make the changes to the mission file by hand then restart the application, or if I use the world editor inspector and hit apply, the scene lighting remains the same. (By the way, the scenes we have are mostly DTS files with receiveSunLight = "1" and receiveLMLighting = "0", no interiors, with a skybox and maybe terrain - and Sun is currently the only lightsource, and it is the sun lighting on the objects (DTS) that I'm not seeing a change)
Torque appears to be using some default sun value and ignoring my settings. There have been a few (very rare) occasions that Torque will use my settings, but generally it appears to be using some "default". I did read in a forum thread that if you make the color and ambient too dark, Torque might decide to use a default, but that didn't seem to matter either. Here is my sun datablock that is apparently ignored:
new Sun() {
azimuth = "10";
elevation = "45";
color = "0.500000 0.500000 0.500000 1.000000";
ambient = "0.100000 0.100000 0.400000 1.000000";
locked = "false";
scale = "1 1 1";
position = "0 0 0";
rotation = "1 0 0 0";
direction = "0.57735 0.57735 -0.57735";
};
And an example TSStatic object loaded via the mission file as well:
new TSStatic() {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
shapeName = "./Assets/test.dts";
receiveSunLight = "1";
receiveLMLighting = "0";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "1.000000 0.000000 0.000000 1.000000";
};
I've changed all the values on the sun datablock a hundred times to what should be reasonable values but nothing makes a difference. Any help is appreciated.
This may be a newb question, but I've done several forum searches and haven't found the answer:
When I make changes to the sun datablock in my mission file (color and ambient values), those changes don't appear to take affect - the scene is still lit the same as before. Whether I make the changes to the mission file by hand then restart the application, or if I use the world editor inspector and hit apply, the scene lighting remains the same. (By the way, the scenes we have are mostly DTS files with receiveSunLight = "1" and receiveLMLighting = "0", no interiors, with a skybox and maybe terrain - and Sun is currently the only lightsource, and it is the sun lighting on the objects (DTS) that I'm not seeing a change)
Torque appears to be using some default sun value and ignoring my settings. There have been a few (very rare) occasions that Torque will use my settings, but generally it appears to be using some "default". I did read in a forum thread that if you make the color and ambient too dark, Torque might decide to use a default, but that didn't seem to matter either. Here is my sun datablock that is apparently ignored:
new Sun() {
azimuth = "10";
elevation = "45";
color = "0.500000 0.500000 0.500000 1.000000";
ambient = "0.100000 0.100000 0.400000 1.000000";
locked = "false";
scale = "1 1 1";
position = "0 0 0";
rotation = "1 0 0 0";
direction = "0.57735 0.57735 -0.57735";
};
And an example TSStatic object loaded via the mission file as well:
new TSStatic() {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
shapeName = "./Assets/test.dts";
receiveSunLight = "1";
receiveLMLighting = "0";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "1.000000 0.000000 0.000000 1.000000";
};
I've changed all the values on the sun datablock a hundred times to what should be reasonable values but nothing makes a difference. Any help is appreciated.
#2
02/06/2007 (4:50 am)
I never had this kind of problem... Sorry for the very stupid question... but you remember to relight the mission after the changes?
#3
02/06/2007 (7:23 am)
Yes, I did relight the mission to no avail. The objects in the scene are pretty much all DTS, so they should've seen the changes right away. But either way, relighting had no affect.
#4
02/06/2007 (7:44 am)
Put in an fxSunLight, lock it to the real sun, and make sure the sun isn't underneath your terrain. I think that sometimes can happen. If so change the direction values until it's positioned where it should be.
Employee Michael Perry
ZombieShortbus