flickering lights
by john lomax · in Torque 3D Professional · 04/13/2010 (6:08 pm) · 10 replies
Has anyone else had an issue when using multiple point and spot lights having them start to flicker when moving around in game ? For some reason I have an interior environment that is lit and the lights are flickering on and off. I checked to see if they where animated but they are not, has anyone seen this before ?
#2
04/13/2010 (6:39 pm)
Its weird because I actually am and have been using advanced lighting right now, It only happens sometimes like when I move the camera at certain angels. I am not sure but does full relight help at all ? This is my first time working with torque at all so I am not to familiar with a lot of its functions :(
#3
You might also find a performance boost with Advanced Lighting (no shadows) as Basic's stencil shadows for characters hammer performance. I did a little test with lots of AI and found BL was -30fps lower than non-shadowing AL (@120fps). (once I get round to finishing my demo I'm ripping the projected BL shadow system out).
PureLight is great and I'd recommend it to anyone with the spare cash. (but I see that you're a student ...)
Full relight shouldn't help in AL. Are you sure you're not in BL?
04/13/2010 (7:31 pm)
Isn't there's a priority field on pointlights which you should be able to set, so that they kinda "queue" which should render/illuminate ...You might also find a performance boost with Advanced Lighting (no shadows) as Basic's stencil shadows for characters hammer performance. I did a little test with lots of AI and found BL was -30fps lower than non-shadowing AL (@120fps). (once I get round to finishing my demo I'm ripping the projected BL shadow system out).
PureLight is great and I'd recommend it to anyone with the spare cash. (but I see that you're a student ...)
Full relight shouldn't help in AL. Are you sure you're not in BL?
#4
04/13/2010 (7:44 pm)
Yeah I am 100% positive I am not in basic lighting. How do you go about turning off all shadows with advanced lighting ?
#5
04/13/2010 (8:27 pm)
Well, uncheck cast shadows on lights and the sun/scattersky. And if you've still got a very nice stencilled shadow underneath your player - you're in BL.
#6
04/14/2010 (12:31 pm)
I def dont have basic lighting on. underneath the lighting tab advanced lighting is selected. If I turn off the shadows the flickering stops but my scene starts to not look to great. If you have multiple lights with multiple shadows that are cast does that cause issues ?
#7
What version of T3D are you running and how many shadowed lights are we talking about?
Before 1.1 you could have so many shadowed lights that a shadow map would "timeout" waiting for an update and be thrown back into the free pool. This caused the light to be unshadowed until it got around to updating it.
In 1.1 i refactored the shadow update logic to better prioritize and manage alot of shadowed lights.
04/14/2010 (1:12 pm)
@johnWhat version of T3D are you running and how many shadowed lights are we talking about?
Before 1.1 you could have so many shadowed lights that a shadow map would "timeout" waiting for an update and be thrown back into the free pool. This caused the light to be unshadowed until it got around to updating it.
In 1.1 i refactored the shadow update logic to better prioritize and manage alot of shadowed lights.
#8
04/14/2010 (1:17 pm)
I am currently using Torque 3D 2009 SDK 1.0.1. I have started turning shadows off on some of the lights and the problem seems to be getting resolved slowly. But It feels like if I have lights that are very close together that have shadows enabled then the flickering occurs. It is not all the time though when I look at certain camera angles it flickers sometimes but sometimes it does not at all.
#9
04/14/2010 (3:13 pm)
Do you know if thier is a way to blur the cone shape of the spot light so its not so sharp when it hits and asset ?
#10
The sharpness of the spotlight cone.... you have control over the inner and outer angle of the cone as well as the normal point light attenuation. That should give you what you need.
04/15/2010 (8:33 am)
@John - Ok... 1.1 should solve your flickering issues i believe. It sounds like the issues i was addressing with my changes to shadow update prioritization.The sharpness of the spotlight cone.... you have control over the inner and outer angle of the cone as well as the normal point light attenuation. That should give you what you need.
Associate Tom Spilman
Sickhead Games
In BL mode we only support 4 lights per-mesh using some simple prioritization. If you have more lights than that you can get flickering.
You have a few different solutions.
1. Use PureLight and bake your static lighting into lightmaps and keep the dynamic lights for real moving light sources.
2. Break your geometry into smaller meshes to allow for better light selection.
3. Use Advanced Lighting which supports an unlimited amount of dynamic lights per mesh.
If your targeting lower end systems then a mixture of the 1st and 2nd option is your best bet.