Game Development Community

TGEA 1.7.0 Beta 2 Bug - T3D Demo - Shadows project through polys

by Stephan Goebels · in Torque Game Engine Advanced · 03/30/2008 (4:32 am) · 4 replies

Start the T3D DEMO, walk with the player model into a building and look down to the shadows. So the shadows project through polysoup TSStatic's is not fixed.

i27.tinypic.com/14lm4xi.jpg
Windows XP PRO German, DirectX (WEB March 2008) and Drivers 69.21: Nvidia 7800GS.

#1
03/30/2008 (6:38 am)
I realize it's word choice, but this is not shadows projecting through polys, this is "shadows being cast by light sources on the other side of non-transparent geometry".

Sounds as if it's the same thing, but it's not honestly, and when you're looking at a bug tracker it makes a lot of difference sometimes how things are phrased.

The reason I say this is because there were actually (at least) -two- bugs regarding shadows :

--this one that you describe here
--a different one where a shadow itself would be rendered on surfaces past the "first contact" surface.

You are correct however, don't get me wrong--what you see above is not as it should be :)
#2
03/30/2008 (12:15 pm)
The lighting system (at least it used to) culls lights based on zones. Since that building is a DTS which cannot be zoned the lights ignore the walls. This is a problem we're running into as well. There is a strong desire to use DTS instead of DIF, but DTS lacks zoning.
#3
03/31/2008 (4:00 pm)
Tom is right on point for this one.

We could do a basic raycast from the light position to the player position and enable/disable the shadows based on that but that would look weird if the player's position (which is centered at his feet) is just below a little lip/edge/step and the rest of its body is visible to the light.

You could beef that up with additional raycasts at its "feet" and "head" but then you can still get in weird situations (like looking through a window). Add more raycasts and maybe you get the effect you are lookin for but it is going to start costing you a lot of performance. It is pretty much impossible to do this in completely reliable and generic way and not have it kill your performance.

This is the sort of thing that you are going to need to customize to match the art/camera/style/play mechanics of your particular game.

At some point we (or someone else) may cook up a fully generic and fast way of doing this or video cards and cpus will just plain be fast enough that the cost is easily worth it.

For now....the simple solution is to just reduce the radius on that dynamic light ;)
#4
04/01/2008 (1:20 pm)
The whitepaper "Integrating Realistic Soft Shadows into Your Game Engine" on the developer zone of NVIDIA can help to find a better solution.