Changing Sun Color and Ambient
by Liu Yi · in Torque Game Engine · 05/28/2007 (2:58 am) · 4 replies
Hi all,
I'm having some problem with updating the sun color and ambient.
I changed the color and ambient of the sun. However, the scene lighting was not updated even though I had called the Sun::inspectPostApply(). To update the lighting, I had to relight the whole scene with Alt-L, which is very slow.
Is there any way for me to update the lighting without relighting the whole scene?
Thanks a lot in advance.
I'm having some problem with updating the sun color and ambient.
I changed the color and ambient of the sun. However, the scene lighting was not updated even though I had called the Sun::inspectPostApply(). To update the lighting, I had to relight the whole scene with Alt-L, which is very slow.
Is there any way for me to update the lighting without relighting the whole scene?
Thanks a lot in advance.
#2
05/28/2007 (3:27 pm)
Lighting takes time to calculate and you have to relight the scene in order for the lightmaps to be updated with any changes.
#3
I'm just wondering if there are other ways to update the lighting after I change sun color in the game. Because to relight the whole scene takes a very long time. I doesn't make sense to make the player wait so long while the whole scene is being relit.
05/28/2007 (6:05 pm)
Hi all, thanks for the replies.I'm just wondering if there are other ways to update the lighting after I change sun color in the game. Because to relight the whole scene takes a very long time. I doesn't make sense to make the player wait so long while the whole scene is being relit.
#4
Otherwise I suggest you come up with a different idea for this lighting.
05/29/2007 (3:58 pm)
Static lighting is not meant to change mid-mission. It is a set-it and forget-it type of deal. If you want ever changing lighting, look into dynamic lights. However, they are very exprensive and need to be used with skill to avoid destroying the framerate.Otherwise I suggest you come up with a different idea for this lighting.
Torque Owner Tim Heldna