Object lighting with Lighting Pack
by Patrick Larum · in Torque Game Engine · 06/16/2004 (10:25 pm) · 5 replies
Hello:
This may be a simple problem(s) to address since I am relatively new to coding side of the Torque engine. I am having issues with the lighting of .dts objects with the SynapseGaming Lighting Pack installed. Typically my .dts objects will cast shadows correctly, but are quite dark with no lighting on what should be the lit surfaces of the object. However, when I move the object about the Z axis until the object's Z coordinate falls below the plane of the terrain (i.e. Z coordinate of object < Z coordinate of terrain), everything is fine and the object is perfectly lit. For example, if the terrain is set so Z=100.0, the Z coordinate of the object needs to be positioned to be less than 100.0 (say 99.9 or less). Additionally, if I move a "correctly" lit .dts object (object Z < terrain Z) into a shadow generated by terrain (such as a mountain), it remains fully lit and unaffected by the terrain shadow. "Relight Scene" in either case does not change the situation.
Here are some examples to help explain:
Z coordinate of .DTS object is less than Z coordinate of terrain
Z coordinate of .DTS object is greater than Z coordinate of terrain
.DTS object moved into shadow of terrain (Z coordinate of object less than Z coordinate of terrain)
Aside from this primary issue, the Lighting Pack seems to work wonderfully with great lighting, vibrant and real! Any help is greatly appreciated.
Thanks!
Patrick
This may be a simple problem(s) to address since I am relatively new to coding side of the Torque engine. I am having issues with the lighting of .dts objects with the SynapseGaming Lighting Pack installed. Typically my .dts objects will cast shadows correctly, but are quite dark with no lighting on what should be the lit surfaces of the object. However, when I move the object about the Z axis until the object's Z coordinate falls below the plane of the terrain (i.e. Z coordinate of object < Z coordinate of terrain), everything is fine and the object is perfectly lit. For example, if the terrain is set so Z=100.0, the Z coordinate of the object needs to be positioned to be less than 100.0 (say 99.9 or less). Additionally, if I move a "correctly" lit .dts object (object Z < terrain Z) into a shadow generated by terrain (such as a mountain), it remains fully lit and unaffected by the terrain shadow. "Relight Scene" in either case does not change the situation.
Here are some examples to help explain:
Z coordinate of .DTS object is less than Z coordinate of terrain
Z coordinate of .DTS object is greater than Z coordinate of terrain
.DTS object moved into shadow of terrain (Z coordinate of object less than Z coordinate of terrain)Aside from this primary issue, the Lighting Pack seems to work wonderfully with great lighting, vibrant and real! Any help is greatly appreciated.
Thanks!
Patrick
#2
Thanks for your reply and good work on the Lighting Pack... I'll look forward to the update when its released.
Thanks again for your help,
Patrick
06/17/2004 (8:29 am)
Hi John:Thanks for your reply and good work on the Lighting Pack... I'll look forward to the update when its released.
Thanks again for your help,
Patrick
#3
first i'll explain my world. It consists of a single terrain (which is completely flat), a single sun, and an airplane. My game is a jet fighter game. When the game starts up, everything is lit perfectly. The airplane starts at z=0 (world units). When I fly the plane into the sky and go above z>=100, then my plane becomes instantly dark. Oh yeah, i only have the single fog layer, and i'm sure its not the culprit here. If i go back down z<100, then the plane lights up perfectly again. So then i decided to delete the terrain from the .mis file, and try flying the plane. However this time i didn't get any lighting problems at all even above z>=100.
So then doing some research on the forums, i figured that it has something to do with the lightmaps that i'm using whihc are being generated by Synapsase Lighting for the terrain. Maybe i'm wrong. So i posted the message here. I remember finding a similar post where someone was having the smae problem, but with static dts objects (which i can also reproduce). I was hoping for some sort of solution to this. Also i am not using the latest version of synapsase lighting.
Will 1.1 fix for "Dynamic DTS objects can receive directional or ambient lighting " help me with my problem. would i set my airplane to use directional lighting instead of ambient?
thanks
10/07/2004 (10:51 am)
Hi,first i'll explain my world. It consists of a single terrain (which is completely flat), a single sun, and an airplane. My game is a jet fighter game. When the game starts up, everything is lit perfectly. The airplane starts at z=0 (world units). When I fly the plane into the sky and go above z>=100, then my plane becomes instantly dark. Oh yeah, i only have the single fog layer, and i'm sure its not the culprit here. If i go back down z<100, then the plane lights up perfectly again. So then i decided to delete the terrain from the .mis file, and try flying the plane. However this time i didn't get any lighting problems at all even above z>=100.
So then doing some research on the forums, i figured that it has something to do with the lightmaps that i'm using whihc are being generated by Synapsase Lighting for the terrain. Maybe i'm wrong. So i posted the message here. I remember finding a similar post where someone was having the smae problem, but with static dts objects (which i can also reproduce). I was hoping for some sort of solution to this. Also i am not using the latest version of synapsase lighting.
Will 1.1 fix for "Dynamic DTS objects can receive directional or ambient lighting " help me with my problem. would i set my airplane to use directional lighting instead of ambient?
thanks
#4
Coz
10/07/2004 (11:49 am)
@Kuni I don't have an answer for you but you may want to bump this thread in about a week or so. I believe Synapse gaming is going to be at the IGC 04 conference which begins tomorrow through the 10th. So John probably won't see this post.Coz
#5
www.garagegames.com/mg/forums/result.area.php?qa=31
10/07/2004 (3:57 pm)
Also the Synapse lighting pack has its own forum:www.garagegames.com/mg/forums/result.area.php?qa=31
Torque Owner John Kabus (BobTheCBuilder)
Glad to see you're pleased with the Lighting Pack!
The issue you're seeing will be resolved in the upcoming 1.1 release (free upgrade). You can see a list of the 1.1 features here. The specific fix you're looking for is listed under 'Sunlight as a directional light source for TSStatic objects'. Sorry for any inconvenience this may have caused.
Hope this helps!
-John Kabus
Synapse Gaming