DTS Culling Issue
by Robert Seeman · in Torque Game Engine · 07/29/2006 (10:39 pm) · 3 replies
Experiencing some strangeness. I'm trying to place a DTS model using the World Editor in the example "tutorial.base" for TGE 1.4.
When I place the model, the yellow bounds box does not show. Only a small dot at the base of the model appears with the x,y,z axis lines. Any time that dot moves off screen, the model disappears.
However, if I open the model in the Torque Show Tool I do not get this culling issue. In fact, if I show the "Bounding Boxes" in TST I can see the bounds as plain as day.
Anyone know what I'm doing wrong? Why would I experience this in the world editor and not in the Torque Show Tool?
Thanks for any assistance you can provide.
-Robert
When I place the model, the yellow bounds box does not show. Only a small dot at the base of the model appears with the x,y,z axis lines. Any time that dot moves off screen, the model disappears.
However, if I open the model in the Torque Show Tool I do not get this culling issue. In fact, if I show the "Bounding Boxes" in TST I can see the bounds as plain as day.
Anyone know what I'm doing wrong? Why would I experience this in the world editor and not in the Torque Show Tool?
Thanks for any assistance you can provide.
-Robert
#2
First off, scaling is a bad idea in either 3DS or Torque; it wreaks havoc with all sorts of things, and it's my understanding that scaling is wonky in Torque right now. Use the box trick to reset your transforms in 3DS. If you're not familiar with it, there's a MaxScript resource that will do this for you, or you can just search the docs and posts for "box trick".
Second, very large DTS objects will be culled when the viewpoint passes the center of the bounding box. You can fix this by setting setGlobalBounds() on the object (which gives it an infinitely large bounding box), or by breaking it into smaller sections.
Ben Garney's post introducing setGlobalBounds()
Good luck!
-- JohnDopp
07/30/2006 (9:41 am)
Robert,First off, scaling is a bad idea in either 3DS or Torque; it wreaks havoc with all sorts of things, and it's my understanding that scaling is wonky in Torque right now. Use the box trick to reset your transforms in 3DS. If you're not familiar with it, there's a MaxScript resource that will do this for you, or you can just search the docs and posts for "box trick".
Second, very large DTS objects will be culled when the viewpoint passes the center of the bounding box. You can fix this by setting setGlobalBounds() on the object (which gives it an infinitely large bounding box), or by breaking it into smaller sections.
Ben Garney's post introducing setGlobalBounds()
Good luck!
-- JohnDopp
#3
I just found it interesting that the Show Tool had no problem with the scaled bounds box and actually displayed it at the correct size, but the tutorial.base showed it at its pre-scaled size. Definitely one of those mysteries of programming.
I'll pass the links along to our modeler and programmers. I'm sure they'll find them useful.
Cheers!
-Robert
07/30/2006 (12:33 pm)
Thanks for the info, John.I just found it interesting that the Show Tool had no problem with the scaled bounds box and actually displayed it at the correct size, but the tutorial.base showed it at its pre-scaled size. Definitely one of those mysteries of programming.
I'll pass the links along to our modeler and programmers. I'm sure they'll find them useful.
Cheers!
-Robert
Torque Owner Robert Seeman
This is interesting, but troubling.
When our modeller created the model in 3DSMax 6, they scaled the model and the bounds box to a much much larger size than their original size.
In Torque Show Tool it shows the model and the bounds box at the correct size (post scaling), but in the tutorial.base World Editor only the model is shown at the correct size. The bounds box shows as its original pre-scaled size. The reason why it looks like a dot is because I was zoomed out to view the whole model but when I zoom in close I see a small yellow box.
So the question now becomes "Why does TST display the bounds at its correctly scaled size when tutorial.base shows the bounds at its pre-scaled size?"
And trust me when I say that I'm viewing the same model in TST as I am in the tutorial.base mission.
We can delete the bounds box and recreate it at the correct size to get around the problem, but I'd like to understand what the differences are between TST and TGE 1.4's tutorial.base. It'd be a real shame to see certain behaviors in TST and then not see that reflected in TGE.
Thanks again.
-Robert