Game Development Community

TGEA 1.8.0 - Shadow still broken

by Ivan Mandzhukov · in Torque Game Engine Advanced · 12/30/2008 (1:08 pm) · 6 replies

Shadows are still broken on a large polysoup objects - old problem.
Shadow works only on the first object,catched in the linked hierarchy in the modelling tool.
If i have two or more objects there,shadow is baked only on one of them.

I found a "hack",creating a group of markers,that scene objects share link and unlink connection,but i think it is not the right way to do the rendershadow.

#1
01/04/2009 (9:42 am)
Polysoup is a new technology,it allows you to export the whole scene in a single dts.And that was the problem.When i exported the scene part by part and put all parts together in runtime (using a position markers),shadow worked faultlessly.
btw pay attention on your bit depth.
#2
01/04/2009 (10:16 am)
Ran into this today as well. Scaling down the object (before export) gets around the issue but isn't a solution.
#3
01/04/2009 (1:08 pm)
Today i tracked the code,i think the issue is that the Shadow Projector tracks a single Shadow Texture (the texture of the first object in the list of the modelling software).
It should use a group of shadow texture pointers instead.
But i am not an expert in that point,it is possible to be added a proper correction of the exporter code too.
I believe GG will do the right corrections.

Shadow does not render on 32 bit diffuse maps ,but 24 bit works fine.
Decals does not render on polysoup at all. I'll take a look to work out that problem too.
#4
01/04/2009 (1:42 pm)
Uh huh. But why does a downscaled object work, then?

I can replicate this issue just fine with one single model. Just not sure what you're hinting at and it would be cool to check it out and sort it out because something tells me we'll have to. :/
#5
01/04/2009 (2:18 pm)
Picasso,

For decals not sticking on PolySoup - check out sgDecalProjector.cpp @ 173. Add your PolySoup's typemask there, I went with StaticObjectType just to test it and it works over here.
#6
01/05/2009 (7:44 am)
Offfff the ray cast of course.