Game Development Community

Bounds Automation for the XSI DTS Exporter

by Matt Summers · in Artist Corner · 03/01/2009 (9:38 pm) · 6 replies

I am working on the scripted UI for the XSI DTS exporter and I am nearly finished with the bounds automation tools. Since I seem to get the most questions about the bounds setup I thought it might be helpful to release this part of the UI first.

Download it here

Install this plugin script in the same directory that you installed the XSI DTS exporter. This script will register a new custom command named "MakeDTSBounds". This command will automatically create a bounds object for you based off of the volume of the objects in your selection.

To call this custom command you can bind a keyboard shortcut to it, create a new toolbar and add a button to the toolbar that is set to run the "MakeDTSBounds" command, or enter the following code in the XSI Script editor.

MakeDTSBounds();

You can also pass several variables to this command to change its behavior.

// Command Syntax
MakeDTSBounds(oSelection, Padding, FixPivot, ObjName);

// Default Values
MakeDTSBounds(null, 0.5, true, "bounds");

oSelection : The current selection in XSI

Padding : The amount of padding to apply to the x, y, and z axes of the generated mesh object. Defaults to 0.5

FixPivot : This value determines if the command should adjust the orientation of the axes of the generated mesh object to match Torque world space orientation. Defaults to true.

ObjName : The name to assign the generated mesh object. Defaults to "bounds".

You can also use this command to generate collision objects based off the volume of the object or objects you have selected in XSI.

// For Example
MakeDTSBounds(null, 0, false, "col-1");

This example would create a mesh object named "col-1" (a collision mesh) that's size is based on the volume of your selection in XSI with 0 Padding. Because a collision mesh doesnt need to have its pivot adjusted, FixPivot is set to false.

Feel free to post here if you have any problems, questions or suggestions regarding this tool. More tools to come.

#1
03/01/2009 (11:43 pm)
yay even better now its turning more into benders auto set up future they made on a older version of the exporter.
#2
03/13/2009 (1:23 pm)
This looks great. I'm looking forward to the entire UI and am grateful for the work that Matt is doing/has done on this and the XSI exporter.
#3
03/29/2009 (10:08 pm)
just a quick question on this.... I know that this has been updated in the exporter, and that the default for fix pivot is set to true for the bounds, but is it possible to automate fixing the pivot of the original model at the same time?

the reason I'm asking on this, is that xsi is kinda a pain to maneuver around in once you adjust your model to facing the correct way if you want to move nulls around while animating....
it's great the rest of the time...when everything seems oriented correctly...but once I rotate my model, I just can't seem to move around well....and if I'm not mistaken you can't place the nulls until the model is rotated or else the transforms come out wrong....
anyway...it would be alot easier if it could be automated, so that there is one less thing to worry about....(I hope I don't sound like I'm complaining or anything...so far this exporter rocks...just being hopefull)
#4
03/29/2009 (11:27 pm)
I guess I'm not sure exactly what you would like to automate. If you could explain the process you are going thru a bit more, I will see what I can do.
#5
03/30/2009 (8:27 pm)
just wondering if there was a way to build my mesh with xsi default pivot, - facing the wrong way for torque...
then place and animate my nodes(nulls)...then be able to make the bounds(click on "make bounds") but before it works on the bounds it fixes the orientation of the mesh so that x y and z are all facing properly for torque..then create the dtsbounds
#6
03/30/2009 (9:21 pm)
It would probably be best if you sent me a sample scene. Are you importing something from another 3d app?