Torque 3D 1.0.1 Bug - Lights shine through DTS walls - RESOLVED
by Oscar Velzi · in Torque 3D Professional · 06/12/2010 (5:50 pm) · 11 replies
This is a bug I've found some time ago when I downloaded the T3D Demo for testing. It's still present in the full 1.0.1 version. I didn't test it in 1.1 since we didn't upgrade our game to it (and our programmer didn't download it so he couldn't test it).
I downloaded the T3D demo and tested a DTS model. I placed a point light inside the building, and the light goes through the walls. Here is a picture of the issue:

Cast shadows is on. As a matter of fact, you can see some of the shadows of the objects inside the ruins. There is a normal facing the light source, and there are no double sided polys. Here is a screenshot of the interior:

Also, I made a simple mesh and the same thing happens:


And just to be sure, I tried one of the models provided in the demo, with similar results:


From what I gathered, it seems to be an issue with the dual paraboloid. If I switch to cubemap the issue disappears. I tried rotating, but it hardly helped. I don't much about how it works, but from what it seems is that it cast two "lights" in opposites directions, and sometimes a poly can end in the middle of both, not being recognized, right? I assumed this from the ShadowViz. But it seems that being in the "split" is not the cause of the issue, as you can see one of the sides fully facing the wall.

While looking at it, I noticed that it lightened up the affected polys with a green light, but the back wall was completely blue, which means that for some reason it doesn't recognize it... Then it struck me. All the affected polys were quite small in size, while the wall was a very big face.

So I selected the face in max, tessellated it a couple of times, and exported into the game.

And... Success! From the ShadowViz you can see that the light "recognizes" the wall, and now it does not cast light through it!


But this just a work-around. There should be no reason why the lights don't recognize big faces. It would be nice to have a source solution for it. Thanks!
I downloaded the T3D demo and tested a DTS model. I placed a point light inside the building, and the light goes through the walls. Here is a picture of the issue:

Cast shadows is on. As a matter of fact, you can see some of the shadows of the objects inside the ruins. There is a normal facing the light source, and there are no double sided polys. Here is a screenshot of the interior:

Also, I made a simple mesh and the same thing happens:


And just to be sure, I tried one of the models provided in the demo, with similar results:


From what I gathered, it seems to be an issue with the dual paraboloid. If I switch to cubemap the issue disappears. I tried rotating, but it hardly helped. I don't much about how it works, but from what it seems is that it cast two "lights" in opposites directions, and sometimes a poly can end in the middle of both, not being recognized, right? I assumed this from the ShadowViz. But it seems that being in the "split" is not the cause of the issue, as you can see one of the sides fully facing the wall.

While looking at it, I noticed that it lightened up the affected polys with a green light, but the back wall was completely blue, which means that for some reason it doesn't recognize it... Then it struck me. All the affected polys were quite small in size, while the wall was a very big face.

So I selected the face in max, tessellated it a couple of times, and exported into the game.

And... Success! From the ShadowViz you can see that the light "recognizes" the wall, and now it does not cast light through it!


But this just a work-around. There should be no reason why the lights don't recognize big faces. It would be nice to have a source solution for it. Thanks!
About the author
Lead Artist of Iron Tower Studio
Recent Threads
#2
06/12/2010 (6:24 pm)
It is inside T3D. Inside the editor go to the "Lighting" drop down menu and select Toggle ShadowViz while selecting a light.
#3
06/12/2010 (7:07 pm)
Thanks A lot Oscar - nice model too
#4
The paraboloid shadows save alot of CPU power and draw calls, but have the unfortunate side affect of not being very good with large triangles. This is because the warp is done per-vertex.
If you had used a cubemap shadow you wouldn't need to extra tessellation, but you would have had 6 render passes instead of 2 per shadowed light.
So its not a bug as much as a limitation of that style of shadow map. The few extra triangles won't hurt your performance at all... but it is annoying to have to do.
In the future i can see DX11 making this moot as it could ensure an even tessellation for shadows and even do a pixel perfect single pass paraboloid shadow.
06/12/2010 (8:49 pm)
Hi Oscar.The paraboloid shadows save alot of CPU power and draw calls, but have the unfortunate side affect of not being very good with large triangles. This is because the warp is done per-vertex.
If you had used a cubemap shadow you wouldn't need to extra tessellation, but you would have had 6 render passes instead of 2 per shadowed light.
So its not a bug as much as a limitation of that style of shadow map. The few extra triangles won't hurt your performance at all... but it is annoying to have to do.
In the future i can see DX11 making this moot as it could ensure an even tessellation for shadows and even do a pixel perfect single pass paraboloid shadow.
#5
Yeah, it's a little annoying to add the extra triangles, but performance sure is very good (especially with the single pass ones). I have a mine level with 15 point lights with full shadows and it runs at over 120 fps, great work on the performance, guys :D
06/13/2010 (2:48 am)
Good to know the reason, Tom. :)Yeah, it's a little annoying to add the extra triangles, but performance sure is very good (especially with the single pass ones). I have a mine level with 15 point lights with full shadows and it runs at over 120 fps, great work on the performance, guys :D
#7
I can't wait for it, especially for the mesh instancing. That will really help us with the town levels, which have a lot of repetitive clutter.
06/14/2010 (11:12 am)
Now you are teasing me :PI can't wait for it, especially for the mesh instancing. That will really help us with the town levels, which have a lot of repetitive clutter.
#8
06/14/2010 (12:53 pm)
Logged: TQA-373
#9
08/02/2010 (4:39 pm)
Confirmed as Fixed in 1.1 Beta2
#10
08/02/2010 (4:45 pm)
Excellent news! This was certainly one of the more annoying T3D quirks I had with pre-1.1 beta2.
#11
Unless what you mean is that it's not a real bug but a limitation the type of shadows have, so it's considered "fixed" (as "There's nothing we can do to change that").
08/02/2010 (10:37 pm)
Really? I mean, after what Tom said, I didn't expect that it would be possible to avoid the issue of them not recognizing big triangles...Unless what you mean is that it's not a real bug but a limitation the type of shadows have, so it's considered "fixed" (as "There's nothing we can do to change that").
Torque Owner Hans
The Darkseer
or is it a sandalone ?
or is it with in Torque3D ? - if it is inside Torque3D how do you get it to work?
Thanks
Hans