Lighting issue
by Jeff Murray · in Torque Game Engine · 10/30/2006 (2:37 pm) · 3 replies
Hi! I have a lighting problem with the sun object that I can't figure out the solution for, and I was hoping that someone here might've fixed this already :). I'm using TGE 1.4 along with TLK.
Basically, when my scene has only the sun object in it, everything in the scene gets lit fine, with the exception of the main vehicle or character object, which seems to receive light in an entirely different fashion, and has a permanent ambience attached to it. All other static DTS objects receive light fine. However, as soon as I create an sgLight in the scene, the main player or vehicle is lit properly. However, my problem is that I can't create directional sgLights that have no decay, so for a large environment scene I am kinda' stuck with using the sun object.
Does anyone have any ideas on how to remedy this problem, and get the main player or vehicle to light up properly from the sun?
I've provided here two screenshots showing the difference.
This image shows the vehicle with just sunlight. The hood is a mounted DTS object, and so it receives light fine, but the car seems to just have one base ambient colour.
www.spiralsymphony.com/work/carSun.jpg
This image shows the scene lit with an sgLight and ambient from the sun (sun has 0 0 0 1 for colour).
www.spiralsymphony.com/work/carSGLight.jpg
Basically, when my scene has only the sun object in it, everything in the scene gets lit fine, with the exception of the main vehicle or character object, which seems to receive light in an entirely different fashion, and has a permanent ambience attached to it. All other static DTS objects receive light fine. However, as soon as I create an sgLight in the scene, the main player or vehicle is lit properly. However, my problem is that I can't create directional sgLights that have no decay, so for a large environment scene I am kinda' stuck with using the sun object.
Does anyone have any ideas on how to remedy this problem, and get the main player or vehicle to light up properly from the sun?
I've provided here two screenshots showing the difference.
This image shows the vehicle with just sunlight. The hood is a mounted DTS object, and so it receives light fine, but the car seems to just have one base ambient colour.
www.spiralsymphony.com/work/carSun.jpg
This image shows the scene lit with an sgLight and ambient from the sun (sun has 0 0 0 1 for colour).
www.spiralsymphony.com/work/carSGLight.jpg
#2
PS: I did some more searches on this pref on the forums, and came up with two threads where you had to give more details on the problem. I will look into it further. Thanks' John.
10/31/2006 (7:08 am)
I tried that already, John, but it seems to make no difference whatsoever. I've deleted the .dso files, made the change, and nothing. It still looks the same. Am I missing something here?!PS: I did some more searches on this pref on the forums, and came up with two threads where you had to give more details on the problem. I will look into it further. Thanks' John.
#3
Or, in the data block of the object, custiom ambient is set to true with some value.
10/31/2006 (7:47 am)
Two things. The sorce file in the tool you made it in has self illumination on (How this is set is based on the tool you used) Or, in the data block of the object, custiom ambient is set to true with some value.
Torque Owner John Kabus (BobTheCBuilder)
Setting the pref $pref::OpenGL::sgDynamicDTSVectorLighting to true gives the directional lighting more definition.