Game Development Community

DTS model disapper when the center of the object is not in view

by Playware · in Torque Game Engine Advanced · 03/25/2010 (12:51 am) · 6 replies

Hi,

I'm currently using TGEA 1.7.1. I have a cargo ship model in .dts. Currently when the center of the model is out of the camera view port, the whole model will disappear.

I can't find any clue to solve this problem. If this problem is discussed and solved before, can anyone post the link here ?

Thanks.

#1
03/25/2010 (2:51 am)
Check your bounds box. Be sure Bounds completely encompasses the mesh. If a large enough portion of the mesh pokes through the bounds box the shape will not render at certain angles, hence the disappearing model.
#2
03/25/2010 (7:25 am)
Also, TGEA forum. Though it does appear to be an art problem.
#3
03/25/2010 (7:33 am)
Moved to TGEA section.
#4
03/28/2010 (8:43 pm)
Thanks for all the replies, still no luck on searching for solution for this problem.

Found a solution to comment the for loop in sceneTraversal.cpp and sceneState.cpp

bool render = true;
/*for (U32 i = 0; i < 5; i++) {
if (rState.clipPlanes[i].whichSideBox(center, xRad, yRad, zRad, Point3F(0, 0, 0)) == PlaneF::Back) {
render = false;
break;
}
}*/

It works, but this means that the clipping is totally disabled.

Is this the correct way to solve this ? Please advice. Thanks.
#5
04/11/2010 (3:32 pm)
Objects will only render if their bounding box falls inside or clips the view frustum. If it's disappearing unexpectedly, then most likely the bounding box for your exported model isn't set up right.

The problem probably lies with how youre exporting your model.
#6
05/05/2010 (7:05 pm)
After finish my other stuff, now i'm back to this question again.
Basically this happens when i use the pathShape, where the model will move by itself following specific path.

Maybe because the pathShape doesn't have the bounding box information for the engine to check for the clipping. So it will always get the origin of the model for the clipping.

I follow some of the implementation from this http://www.torquepowered.com/community/forums/viewthread/29206
and this
http://www.torquepowered.com/community/resources/view/4849

What it does is to make the pathShape object able to detect a trigger event. The bounding box or collision box information is included into the pathShape object.

After implementing this, my problem solved.

ps: I'm using TGEA 1.8.2 now.