Adjusting ambient mission light?
by Kirby Webber · in Torque Game Engine · 12/12/2005 (7:43 am) · 8 replies
It almost feels silly having to ask this after more than 2 years of working with this engine, but the truth is, it's something I've never even looked into before.
My design calls for several missions set at dusk and/or in the evening, though I cannot locate a mission variable that will allow me direct control over the amount of ambient light used within a single mission.
For clarity, I am NOT using any of the day/ night cycle resources available as I don't really need anything to 'cycle' during game play... it's just a static time of day.
I played with the fog values in the mission editor, but it's just not really the effect I'm looking for - is there a way to set the ambient light levels through script?
Any help is greatly appreciated.
My design calls for several missions set at dusk and/or in the evening, though I cannot locate a mission variable that will allow me direct control over the amount of ambient light used within a single mission.
For clarity, I am NOT using any of the day/ night cycle resources available as I don't really need anything to 'cycle' during game play... it's just a static time of day.
I played with the fog values in the mission editor, but it's just not really the effect I'm looking for - is there a way to set the ambient light levels through script?
Any help is greatly appreciated.
#2
This will of course require a neat skybox texture to go with the new colors.
12/12/2005 (7:49 am)
What about changing the various values of the Sun mission object?? There you can set colors etc. And setting a dark/blue colour should make it look more like night. Perhaps red/purple you could make it look more like sunset.This will of course require a neat skybox texture to go with the new colors.
#3
Also, I've not been able to reorient the rotation or direction of the sun for mission lighting purposes.
My skybox has a sun in it and I'd like the mission lighting/shadows to reflect that, but it never changes and is currently directly opposite the position/ rotation/ direction I need it to be (well... almost directly opposite).
I was struggling with this for a bit last night. It would be much easier if I hade a simple mission object I could visually grab (like a spawn sphere) and move/ orient, etc.
12/12/2005 (8:00 am)
Okay, when I change the values associated with the sun object, it changes the light that gets applied to the models, but the terain stays brightly lit!Also, I've not been able to reorient the rotation or direction of the sun for mission lighting purposes.
My skybox has a sun in it and I'd like the mission lighting/shadows to reflect that, but it never changes and is currently directly opposite the position/ rotation/ direction I need it to be (well... almost directly opposite).
I was struggling with this for a bit last night. It would be much easier if I hade a simple mission object I could visually grab (like a spawn sphere) and move/ orient, etc.
#4
-Max
12/12/2005 (9:11 am)
I don't know what type of game your making, but you could always concider just darkening your terrain textures. Also, another idea might be to invert the colors of your detail texture, because if the detail texture is too bright, it will make the terrain appear lighter, no matter how dark you make the mission.-Max
#5
Hmmm....
I guess I'll have to do some experimenting.
12/12/2005 (9:26 am)
So... the terrain detail texture is unaffected by the lighting?Hmmm....
I guess I'll have to do some experimenting.
#6
12/12/2005 (12:21 pm)
Did you do a relight after you adjusted the Sun's ambient value?
#7
12/12/2005 (12:24 pm)
Terrain texture shouldn't be affected by lighting. Have you done a relight scene after the changes??
#8
I plan to try that this evening.
As a parting thought, I noticed something odd (this is in 1.4) with regards to interiors and lighting. Seems that if you merely select an interior without moving it (or doing anything that would technically require a relight) the engine forces a relight on it's next startup anyway.
It wouldn't be any big deal accept I have a cr@pload of data in there already so it takes a while - alos, whenever it does a relight on mission startup, it doesn't spawn the player object?! =\
12/12/2005 (1:22 pm)
Matt, yes I did... although I stumbled across an old thread today where someone had similar issues - turned out that the terrain wouldn't relight unless he deleted all the existing *.ml files.I plan to try that this evening.
As a parting thought, I noticed something odd (this is in 1.4) with regards to interiors and lighting. Seems that if you merely select an interior without moving it (or doing anything that would technically require a relight) the engine forces a relight on it's next startup anyway.
It wouldn't be any big deal accept I have a cr@pload of data in there already so it takes a while - alos, whenever it does a relight on mission startup, it doesn't spawn the player object?! =\
Torque 3D Owner Marco Meier
Slickware Games
Values like 0.1 0.1 0.1 are already really dark.
Maybe I don't remember the values correct. But the logic should be right. I hope that helps a little bit.