Game Development Community

Shadows -> I need a simple answer

by Pale · in Torque Game Engine · 12/12/2007 (12:15 pm) · 5 replies

I've read a ton of information about shadows on these forums and I only find myself MORE confused, as I fear half the threads are out of date. Regardless, here's my question.

Why is it that if I place an object with a datablock in my scene WITHOUT a collision mesh, I get perfect beautiful shadows cast off of it that even include animations, BUT as soon as a collision mesh is added to the dts it uses the collision mesh and makes an ugly block for a shadow.

The engine can obviously cast the shadows I want, because it does it without a collision mesh.

#1
12/13/2007 (9:41 pm)
Check out the TDN article on DTS Lighting and Shadows.

About half way down the page is the section on DTS shadowing. The shadow type depends on the light type and the type of the object. If you want dynamic shadows (the better looking of the two) your object should use a ShapeBase derived type, i.e. StaticShape if I recall.

What does your datablock look like?
#2
12/13/2007 (9:50 pm)
I've seen this issue before. It's not related to your object setup, it's an exporter problem. Some DTS exporters incorrectly process the collision mesh in a way which causes it to be used as render geometry, at least for shadows. Generally this also will cause some collision problems, but there won't be any errors or warnings associated with the issue. I'm not sure if this is because of incorrect export settings, wrong object hierarchy, or simply a bug with several of the max2dts exporters, however I've not seen this problem since I upgraded to Max 9 and therefore a new version of the plugin. Over the years, I've seen lots of different shadow results from the Max exporters: Only shadow lowest LoD, only shadow collision mesh, shadow nothing but render collision mesh. Vehicles are the most likely suspects, because they're the only models with elaborate node hierarchy that could break.

If all else fails, re-examine your node hierarchy or try an older/newer plugin.
#3
12/14/2007 (12:38 am)
Pale, I also have had your problem. I recall changing the objects hierarchy around, i think linking the collision directly to the shape mesh. Either that or click the transparency setting and treat your texture as a alpha texture. Im away from my home computer and have no way to test it right now. (Im on an old 486 laptop right now, 300miles from home...) But i know there is a way to trick the mesh into working as you want...
#4
12/14/2007 (7:18 am)
Interesting. Thanks for the posts. I'm not the one handling the exporting of the models, so I'll forward this thread to them. I do know that we are using Maya 6.5 with the maya2dts plug-in found on this site.

I'll have them experiment and update this thread with their findings. It's nice to know that it doesn't appear to be an issue with stuff I'm doing. ;)
#5
12/14/2007 (4:20 pm)
Oh yes, i failed to mention I use MAX for mesh. Dont know if my suggestion would work for Maya...