Game Development Community

Shape->Shape Shadowing

by Mike Kuklinski · in Torque Game Engine Advanced · 09/21/2006 (6:51 pm) · 18 replies

Has anyone, as of yet, been able to get shapes to cast shadows properly onto other shapes? The farthest I got was casting shadows onto the collision mesh of other shapes...

I'd write more in this thread, but, yeah, what would I write?

#1
09/22/2006 (9:16 am)
The TSE projected shadow works essentially the same as the TGE projected shadows, and those can only project on collision geometry, because they use collision-related functions to build a clipped piece of geometry to project the shadow texture on.

But in TSE it might be possible to cast shadows on the true geometry of DTS objects without going through the massive amount of trouble that'd be required to do it in TGE.

You can do something like this:

First find a way to detect DTS-based objects (TSStatics and ShapeBase objects) which intersect the shadow volume, in the shadow drawing function.

Then you need to re-draw those objects with the shadow texture projected on them. You can use a hardcoded material for that, but you'll need to find a way to get that material to replace all materials on the mesh while drawing. It isn't that hard, but you'll need to understand the rendering pipeline (and the whole renderInstance stuff) first in order to know where to make the code additions.
#2
09/22/2006 (10:24 am)
DTS to DTS shadows are already in (just not pushed to cvs yet), see TDN for details:

Dynamic Shadows (look under shadowDTSShadow)
#3
09/22/2006 (11:00 am)
Sweet john! When do we get said code?

[Ishbuu]
#4
09/22/2006 (4:39 pm)
Ahh, when I loooked at the TDN that wasn't even there, so you can understand my confusion :)
#5
09/23/2006 (9:07 pm)
I'm not sure when the next push is, but there should be lots of cool new code in there. ;)

Like light masking:

www.synapsegaming.com/content/linkedimages/TSE-LightMasks-small.jpg
TSE Full size image
#6
09/23/2006 (9:11 pm)
Please say soon, please say soon, please say tonight.

;)
#7
09/23/2006 (9:47 pm)
That's awesome.
#8
09/24/2006 (3:07 am)
That looks great.
#9
09/24/2006 (3:18 am)
Hehe, very nice John!
#10
09/24/2006 (11:15 pm)
Definetly cool stuff, I hope this isn't an add-on type thing though.
#11
09/25/2006 (12:38 pm)
Josh, I'm not quite following that. Do you mean like TLK? No, definitely not - we're still working on building up and finishing off the TSE features (and squashing bugs).
#12
09/26/2006 (3:40 am)
Oh, I see now, I didn't actualy read much of this thread before posting. My mistake.

Definetly some nice stuff there, looking forward to the next update.
#13
10/15/2006 (4:42 pm)
Has any of this found its way into CVS? I didn't notice anything new with the lighting system as of a couple days ago.
#14
10/17/2006 (8:56 pm)
Given the lack of a response, I'll assume that the answer is "Yes, idiot, it is in CVS"
#15
10/17/2006 (9:07 pm)
Then I guess I should grab the current HEAD.
#16
10/17/2006 (9:52 pm)
I'm fairly certain that this isn't in HEAD. HEAD hasn't been updated in almost a month.
#17
10/18/2006 (7:45 am)
Nope, not in HEAD yet. I update nearly daily, and both dts-dts shadows and light masking are missing.
#18
10/27/2006 (6:21 am)
This looks a lot like a "projector" that you get in Unreal... :)