Game Development Community

Lights show through DTS

by Howard Dortch · in Torque 3D Professional · 11/29/2013 (9:12 am) · 8 replies

I have a light (spot light )that shows through a DTS building. Any way to stop that? Yes it has a collision mesh.

#1
11/29/2013 (9:29 am)
screenshot might help to diagnose the problem.

Ron
#2
11/29/2013 (10:26 am)
Cast shadows needs to be turned on or the light won't check for visible mesh/materials. Also check that the light isn't in a position where it's object bounds will penetrate a mesh.
#3
11/29/2013 (8:56 pm)
%obj.HLightl = new SpotLight() {
range = "75";
innerAngle = "80";
outerAngle = "100";
isEnabled = "1";
color = "1 1 0.9 1";
brightness = "0.9";
castShadows = "1"; <<<< shadow is on

Object is located 20 meters from bounds and collision.

@Ron you want me to post a screen cap of a light penetrating a dts building?

Thanks all...
#4
11/30/2013 (4:18 am)
I noticed this as well. It's not only Spotlight, but every lightsource. Also it seems to me that it is much worse than in previous versions of the engine. I have a scene where sunlight is casting shadows on an inside wall where there shouldn't be sunlight at all. I even tried double walls in the dts, but that led to no success. I think it has something to do with how the lightrays are calculated or something like that. I will post screen caps soon.
#5
11/30/2013 (5:54 am)
Glad it is not just me. I tried to reverse the normals on the collision boxes but that didn't work either. This is a critical requirement for the game. I see it as a major bug. Can someone point me to the right place this gets calculated in the engine?
#6
11/30/2013 (8:56 am)
I think you're experiencing the same problems I had 4+ years ago with the lights in torque, see this thread I made :

www.garagegames.com/community/forums/viewthread/97255

Hewster
#7
11/30/2013 (11:33 am)
Good writeup, thanks...
Now for the hard part, is anyone looking into fixing this? DirectX handles it just fine as far as I can tell from all their light examples.
#8
11/30/2013 (12:09 pm)
I just find out that toying with the overDarkFactor seem to reduce the problem.

Edit:
Only for Sun objects (PSSM)