Shadow on top of TSStatic
by Bullitt Sesariza · in Torque Game Engine · 11/15/2007 (7:06 pm) · 4 replies
Hi, I am using sort of an arena which is a TSStatic for my game instead of the terrain. The problem is all the other objects can't cast a shadow to the arena, even the player / control object. I tried dragging the player out of the arena and into the terrain in World Editor and the shadow showed up. But inside the arena itself, it didn't. Can anybody tell me how to solve this?
BTW I've searched around in the forums and found out that for a more advanced lighting and shadow system, I should use TLK. But can TLK make the shadow of objects on top of a TSStatic show up on the TSStatic?
Thanks in advance.
BTW I've searched around in the forums and found out that for a more advanced lighting and shadow system, I should use TLK. But can TLK make the shadow of objects on top of a TSStatic show up on the TSStatic?
Thanks in advance.
#2
It sounds like this arena is a fairly large structure so creating it as a DIF is recommended in general.
11/16/2007 (8:22 pm)
Zavada is right. Direct shadowing on DTS objects is not available. If you want shadows from players and other objects (dynamic and static) to show up, a DIF interior would do the trick. It sounds like this arena is a fairly large structure so creating it as a DIF is recommended in general.
#3
Just out of curiosity and for arguments sake, couldn't you implement the code snippet in the middle of this thread:
www.garagegames.com/mg/forums/result.thread.php?qt=29546
that enables the player to cast shadows on dts objects collision mesh and then implement Ben's polysoup collision (thereby allowing you to remove collision meshes that really make this first resource less useful)?
The player shadows should then fall on the actual mesh of the static shouldn't they? I haven't tried it, since the polysoup implementation that I got in was "quirky" and my player kept getting stuck in things. Just thought I'd throw this out there to muddy the waters.
Not that the real solution in this particular circumstance isn't DIFs, because I agree that it is.
Edit:BTW I have implemented the mentioned code snippet, and it does work, I just haven't tried them both together.
.
11/16/2007 (8:47 pm)
@Ross,Just out of curiosity and for arguments sake, couldn't you implement the code snippet in the middle of this thread:
www.garagegames.com/mg/forums/result.thread.php?qt=29546
that enables the player to cast shadows on dts objects collision mesh and then implement Ben's polysoup collision (thereby allowing you to remove collision meshes that really make this first resource less useful)?
The player shadows should then fall on the actual mesh of the static shouldn't they? I haven't tried it, since the polysoup implementation that I got in was "quirky" and my player kept getting stuck in things. Just thought I'd throw this out there to muddy the waters.
Not that the real solution in this particular circumstance isn't DIFs, because I agree that it is.
Edit:BTW I have implemented the mentioned code snippet, and it does work, I just haven't tried them both together.
.
Torque Owner Ed Zavada
Short of that, the best answer I've been able to find for this is that you have to use a DIF (interior) rather than a DTS (static shape). There simply doesn't seem to be any way to make DTS objects receive shadows from general lighting otherwise. I haven't actually tried DIFs as a way to solve this problem, just heard from others that they work.