Game Development Community

Bounding box in ShowTool?

by Andre Poston · in Torque Game Engine · 02/11/2005 (3:16 pm) · 11 replies

I have a question about viewing the bounding box in the ShowTool I created a character model with a bounding box and everything loaded up into the tool properly. Then I noticed the "Render solid bounding boxes" button in the tools (8th button from the left).

Anyways, I decided to go into my model and make the bounding box extraordinarily large. When I reloaded the model into the ShowTool the bounding box size hadnt changed. Is the bounding boxes size getting shrunk somehow on export? Is the button not really showing the bounding box and showing something else?

I also loaded up the default orc model into the showtool along with the dance sequence and noticed that the bounding box didnt move with the orc over the course of the animation. Is this the way it is supposed to be? I thought that you were supposed to animate the bounding box along with the model.

#1
02/12/2005 (10:09 pm)
Short answers: Bounding box might be generated by the DTS exporter. Bounding boxes are not currently animated. Dave Wyand should be able to give you fuller answers (though you might try asking in the TST forums, if there are some set up...).
#2
02/12/2005 (10:20 pm)
Todd are you using the Torque ShowTool Pro or the default showtool?
#3
02/13/2005 (11:43 am)
I am using the Torque ShowTool Pro, although we are still evaluating it and using the demo version, don't know if that makes a difference though.
#4
02/13/2005 (1:36 pm)
Bounding box for characters is automatically generated by the engine and collision meshes (as you would create in a model editor) are not used for characters is my understanding. So the BB size shouldn't have changed.
#5
02/14/2005 (12:22 pm)
Greetings!

The bounding box information that I'm using for TST Pro comes directly from the mesh. Specifically I'm doing a call of:

Box3F bounds = mMeshObjects[ i ].getMesh(od)->getBounds();

where i is the mesh number and od is the object detail level. This retrieves the untransformed bounding box for the given mesh, and comes directly from the DTS file I believe. You can poke around in tsMesh.cc and see what is done with the mBounds member variable.

As for it not animating with the shape, this is true. The rendered bounding box in TST Pro is not transformed and represents the base bounding box. The method of using the bounding box during animation is specific to your exporter and is just used to ultimately generate ground transforms for the animation sequence. For example, the upcoming LightWave DTS exporter doesn't have to use an animated bounding box to create these ground transforms and could be keyed off any object in the scene.

Now, as to why your changes to the bounding box in your modeling program are not showing up in TST Pro, I'm not really sure why this would occur. TST Pro does not differentiate between "character" shapes and other types of shapes, so it does reference the bounding box information in the DTS file. Perhaps there is something happening during the export process? This may be a good question to ask in the forum that matches your 3D package here on GarageGames.

I hope that helps. Please let me know if you have any further questions.

Oh, and Ben, the TST Pro specific forum is here. :o)

- LightWave Dave

EDIT: The forum didn't like seeing [ i ] in the code block and changed it to an italics marker. :o)
#6
02/14/2005 (5:33 pm)
Thanks for clarifying the character/non-character issue. :)
#7
02/23/2005 (6:37 am)
Hi David,

Is there some way of seeing the bounding information as stored from the bounding mesh in the source scene?

Thanks,
-Josh
#8
02/23/2005 (10:25 am)
Greetings!

Josh
Do you mean being able to see the bounding box dimensions for a particular object?

www.gnometech.com/torque/images/plan-05-02-11/powerup-object-bounds.jpgJoe Maruschak's PowerUp Object

If so, select the object using the Objects popup and then select the Obj Local Bounds choice from the popup at the left of the screen.

Or were you looking for something else?

- LightWave Dave
#9
02/23/2005 (4:43 pm)
David,

I am interested in viewing the bounds of the entire shape which (I believe) is generated from the bounds mesh (at least with 3dsmax).

Thanks for the great tool,
-Josh
#10
02/24/2005 (8:16 am)
Greetings!

Josh, unfortunately it looks like the overall shape bounds properties have been missed. I'll add it to the list for the next version, although I know this doesn't help you out right now.

Sorry about that.

- LightWave Dave
#11
03/10/2005 (2:43 pm)
Just following up on this thread. I posted the situation in the 3dMax exporter forums in this thread but no one has been able to solve the issue.