Game Development Community

Lighting Bug - Lights shine through my DTS walls

by Oscar Velzi · in Artist Corner · 12/08/2009 (5:49 pm) · 6 replies

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:

img7.imageshack.us/img7/6459/t3dissue.jpg
It's the same problem this user had, but I couldn't find any solutions. I tried rotating but it didn't help.

http://www.torquepowered.com/community/forums/viewthread/100131

Any advise would be welcome.

#1
12/08/2009 (7:30 pm)
1. Lights won't stop unless they have cast shadows on.
2. They need to hit a plane with a normal facing against them. Normals on one side, facing the other way, don't stop light or collision. Double sided polys are just bad.
#2
12/08/2009 (8:24 pm)
Thanks for the reply =)

1. Yes, cast shadows is on. As a matter of fact, you can see some of the shadows of the objects inside the ruins.

2. There is a normal facing the light source, and there are no double sided polys. Here is a screenshot of the interior:

img686.imageshack.us/img686/5264/t3dinterior.jpg
Also, I made a simple mesh and the same thing happens:

img197.imageshack.us/img197/3860/t3dbox01.jpg
img808.imageshack.us/img808/2288/t3dbox02.jpg
And just to be sure, I tried one of the models provided in the demo, with similar results:

img193.imageshack.us/img193/1388/t3dtower01.jpg
img37.imageshack.us/img37/440/t3dtower02.jpg
Thanks for your help.
#3
12/08/2009 (8:33 pm)
Hmmm .... Try rotating the light, maybe it's an issue with the "split" on a dual paraboloid.
#4
12/08/2009 (9:04 pm)
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.

img69.imageshack.us/img69/7391/shadowviz01.jpg
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.

img35.imageshack.us/img35/1074/ruinwall01.jpg
So I selected the face in max, tessellated it a couple of times, and exported into the game.

img709.imageshack.us/img709/2803/ruinwall02.jpg
And... Success! From the ShadowViz you can see that the light "recognizes" the wall, and now it does not cast light through it!

img229.imageshack.us/img229/4609/shadowviz02.jpg
img256.imageshack.us/img256/2240/successo.jpg
So the issue is solved! It seems that dual paraboloid lights have issues with large faces, so if you are having this problem, subdivide them and it will work like a charm.
#5
06/12/2010 (3:24 pm)
Hopefully this gets some attention - although the solution works, it is just a way around the problem. This should still be fixed in source, this is still a bug. I'm also seeing this with my models.

Could you please change the title of the thread to show that it is not fixed and is still a bug in the engine? There's little chance that QA will find this if this is marked as resolved.

Good thinking on catching the source of the problem btw! And the house is really cool!
#6
06/12/2010 (3:33 pm)
Sure, I'll make a bug report thread in the Private T3D forum too, with better sized pictures.