Game Development Community

Ambient light too bright

by Mike Rowley · in Torque Game Engine · 06/03/2006 (9:25 am) · 17 replies

I have 2 pics to show you. (I've heard pics speak a thousand words, and I don't have that many words to discribe my problem. :; )

Before TLK
After TLK

How do I turn the lights down? This is wayyyyyy too bright.

#1
06/03/2006 (9:46 am)
Hit F11 to go into the editor, select the sun in the treeview, and change the ambient property to something like "0.5 0.5 0.5 1". Hit Apply, and then relight the scene. Those are RGBA values, so you can experiment with them until you get the effect you want.
#2
06/03/2006 (9:47 am)
Hi,

This is a common question for the lighting pack. Here's a quote from John from another thread that should answer your question.
Quote:
The main light source in TGE is the sun, if you open up the mission editor and select the sun in the scene tree on the top right of the screen, you can edit the scene's main lighting source. Reduce the values of both the color and ambient amounts - I recommend cutting them in half first and then adjusting them from there until you get the lighting you're looking for.

It's due to TLK deliberately doubling the lighting intensity of stock Torque's lighting, or something like that =)

@ John - if there isn't one already maybe you could implement a TLK FAQ section where common problems such as this are addressed.
#3
06/03/2006 (9:47 am)
Cool. Thanks. I've been comparing the mis files to no avail.
#4
06/03/2006 (10:18 am)
Thanks to both of you. I have quit messing up my game, and have added the starter.racing demo game to the examples folder. I'm going to mess with it. Once I've finished getting it to look right, I can upload it for others to play with.
I really want to put headlights on the car. :) (in time)

Edit to add:
I have the lighting fixed. (had to learn torques way of changing the colors. :blush: )

The shadows are fantastic, but Look at the tires.
They aren't round anymore. Any other settings I should know about? :D
#5
06/03/2006 (1:06 pm)
Looks like LOD issues, that's strange.
#6
06/03/2006 (7:09 pm)
Nope. Canpt be a lod issue. It's the standard starter.racing demo from the sdk.
All I've done to it is to adjust the light from the sun, but the tire problem was there before I messed with anything.
It seems the lighting kit is doing something to the textures. I'm going to run the debug exe and see if I can find the problem that way.
#7
06/03/2006 (8:17 pm)
I agree with C2, I think its an LOD issue. The tires don't look that way for me, they are nice and round. Not sure what would be funkering up the LOD, though.

-Jase
#8
06/03/2006 (8:57 pm)
I don't know. I'm at a loss here. Looking closely at the tires, it looks as tho the tread is being pealed off. I can actually see the original tread under the buggys tread texture. I'm not getting any errors, even running with the debug exe.
If you want to check it out for yourself, You can download it here
I am totally lost.
#9
06/03/2006 (10:14 pm)
Mike - what is happening is that the engine is choosing a lower LOD for the tires, dastically lowering the polygon count. It's not supposed to do that unless the model is very far away.
I tested this with the current lighting pack, and a stock Starter.racing, and got the exact same results - the wrong LOD is being chosen for the tires.

*See Johns update below*
#10
06/04/2006 (6:38 am)
Thanks for checking this out, and for your help.
If John can come up with a fix for this, then I can use this awesome pack. :)
#11
06/04/2006 (7:15 am)
This is something that I have come across aswell. A fix for this is something that i would love to see.
#12
06/05/2006 (8:03 am)
Hi guys,

Try setting these prefs to the following values:

$pref::TS::detailAdjust = "1";
$pref::TS::screenError = "10";


You can change how aggressive the DTS lod is through the prefs and there is a difference between the 'starter.fps' and 'starter.racing' demos.
#13
06/06/2006 (1:08 pm)
Thankyou. That worked great.
Now to find a way to tone down the ambient light and I'm all done. :)
#14
06/07/2006 (5:28 pm)
Hi Mike,

Did you try Tim and Jaimi's suggestions? Turning down the sun's color and ambient value will reduce the lighting in the mission, or do you mean the self-illuminated objects?
#15
06/07/2006 (5:31 pm)
I tried turning it down, and with a whole lot of pain, got the world looking "Ok".
I don't know why TLK really needs to do anything to the suns light. I think the stock tge sun looks great.
#16
06/07/2006 (6:39 pm)
If you cut the sun's lighting in half it should look identical to the original TGE mission (except for the self-illuminated objects, but those can be adjusted too).

TLK is very customizable, you can tweak it to get just the features you want. For instance, if you only need the lighting tools and like the original darker TGE lighting, you can change it back using the macro 'SG_LIGHTING_OVERBRIGHT_AMOUNT' (in sgLighting.h):

#define SG_LIGHTING_OVERBRIGHT_AMOUNT			2.0

To

#define SG_LIGHTING_OVERBRIGHT_AMOUNT			[b]1.0[/b]


The file 'sgLighting.h' allows you to customize a lot of TLK, and it's fairly safe to edit - if anything breaks too badly you can always replace it with a clean copy.

Let me know if this helps!
#17
06/07/2006 (6:57 pm)
That worked great. Thankyou.
The lighting looks exactly like it should. (with ecception of the trees, but that's fixable too) :)
Now to go exploring more thru the code. (sorry, tge code is quite scary for a newbie coder)