Sun Datablock Ignored
by Wyck Hebert · in Torque Game Engine · 01/31/2007 (11:46 am) · 6 replies
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)
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";
};
I've changed all the values a hundred times to what should be reasonable values but nothing makes a difference. Any help is appreciated.
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)
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";
};
I've changed all the values a hundred times to what should be reasonable values but nothing makes a difference. Any help is appreciated.
#2
Actually, the scene in question has just DTS (static) objects and a sky box. The static DTS objects are loaded using the mission file - here is an example:
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";
};
The DTS objects do appear to receive sun light (both diffuse and ambient light), they just don't seem to use the settings in my sun datablock. The sun is the only light source in my scene currently.
01/31/2007 (12:50 pm)
Thanks for the reply, but relighting the scene doesn't appear to work either.Actually, the scene in question has just DTS (static) objects and a sky box. The static DTS objects are loaded using the mission file - here is an example:
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";
};
The DTS objects do appear to receive sun light (both diffuse and ambient light), they just don't seem to use the settings in my sun datablock. The sun is the only light source in my scene currently.
#3
Does nothing happen to your scene when you drop the color to "0.1 0.1 0.1 1.0000" and perform a full relight?
Have you made any engine changes?
Have you tried using non-static shapes, such as vehicles, player, and interior?
02/01/2007 (7:49 am)
Are you using TGE 1.5, or the 1.4 with TLK?Does nothing happen to your scene when you drop the color to "0.1 0.1 0.1 1.0000" and perform a full relight?
Have you made any engine changes?
Have you tried using non-static shapes, such as vehicles, player, and interior?
#4
Yes, nothing happens to the scene when I modify the color and do a full relight. For one, our scene doesn't have a terrain (this particular simulation is in space). All the scene consists of currently are DTS objects, and they should get changed as soon as I hit "Apply", but they don't. Either using the world editor, modifying the sun, then hitting "Apply" or if I make changes to the mission file by hand and restart the app, neither one seems to make a difference... the DTS objects remain lit by some "default" sun.
Is it possible the TLK is doing something odd here?
Yes, there are engine changes, but to my knowledge none of the changes should affect this.
Yes, the simulation contains non-static moving objects (DTS) as well with the same result.
02/01/2007 (9:56 am)
We are using 1.4 with TLK.Yes, nothing happens to the scene when I modify the color and do a full relight. For one, our scene doesn't have a terrain (this particular simulation is in space). All the scene consists of currently are DTS objects, and they should get changed as soon as I hit "Apply", but they don't. Either using the world editor, modifying the sun, then hitting "Apply" or if I make changes to the mission file by hand and restart the app, neither one seems to make a difference... the DTS objects remain lit by some "default" sun.
Is it possible the TLK is doing something odd here?
Yes, there are engine changes, but to my knowledge none of the changes should affect this.
Yes, the simulation contains non-static moving objects (DTS) as well with the same result.
#5
1) Open world editor
2) Click sun
3) Change color and ambient
4) Hit apply
5) Click off sun
6) Click on sun and make sure changes are still there
7) Click apply just for good measure
8) Go to lighting in tool bar, click perform full relight
and nothing happens? If that's the case, then something is busted.
And when I meant non-static objects, I mean objects that aren't TSStatic (just exploring different possibilities here)
I know there was a forum thread that is pretty recent (posted in the month of January), that was talking about this issue. A DTS object was receiving lighting from an unknown source. I'll post if I can find it.
02/01/2007 (10:18 am)
So following these steps:1) Open world editor
2) Click sun
3) Change color and ambient
4) Hit apply
5) Click off sun
6) Click on sun and make sure changes are still there
7) Click apply just for good measure
8) Go to lighting in tool bar, click perform full relight
and nothing happens? If that's the case, then something is busted.
And when I meant non-static objects, I mean objects that aren't TSStatic (just exploring different possibilities here)
I know there was a forum thread that is pretty recent (posted in the month of January), that was talking about this issue. A DTS object was receiving lighting from an unknown source. I'll post if I can find it.
#6
The only difference with my setup is that there doesn't appear to be a "lighting" menu, but under "Edit" there is a "Relight Scene Alt L" that I click, no affect of course.
Yes, we do have objects that aren't TSStatic. We may have one object that is TSStatic, then the others that move will be brought in with script and controlled in other ways. Neither the static or moving objects (all DTS) seem to be affected when I change the sun's settings.
I guess something may be busted... I was just hoping that this may be a known issue with using TLK or that some setting somewhere was causing Torque to use a default sun.
Thanks for taking the time...
02/01/2007 (10:31 am)
Yep, tried all those steps and nothing happens.The only difference with my setup is that there doesn't appear to be a "lighting" menu, but under "Edit" there is a "Relight Scene Alt L" that I click, no affect of course.
Yes, we do have objects that aren't TSStatic. We may have one object that is TSStatic, then the others that move will be brought in with script and controlled in other ways. Neither the static or moving objects (all DTS) seem to be affected when I change the sun's settings.
I guess something may be busted... I was just hoping that this may be a known issue with using TLK or that some setting somewhere was causing Torque to use a default sun.
Thanks for taking the time...
Torque Owner AllynMcelrath
But a hint of what you will get will be reflected on the DTS objects of the world. Like if you change color, you will see your objects tint.
Good luck.