Game Development Community

The center of this model is off... but why?

by Ian Omroth Hardingham · in Artist Corner · 12/10/2009 (10:52 am) · 4 replies

Hey guys.

Regarding the content of this image:

www.omroth.com/selectionBug.png

I don't understand why Torque thinks the center is so far off from the actual center. Considering that Torque can clearly see the bounds of the actual object, why isn't the object center at its center?

This is causing me problems because whenever I rotate this object, it rotates around that center rather than the actual objects' center.

Thanks,
Ian

#1
12/10/2009 (11:44 am)
If it is a Collada DAE import, then the importer will assume that the center of the shape is the average of all the 3D information (ie. if it animates, it will center the shape on the theoretical center of all the animations information). You can correct this I believe by adding a Bounds shape to your scene and re-exporting, the DAE importer is programmed to recognize and use DTS type scene markup.
#2
12/10/2009 (11:45 am)
Its either that or the center of the shape is assume to be from the scene origin of which your shape is offset from. Either way a bounds would still correct it.
#3
12/10/2009 (9:18 pm)
@Ian: You must have the world editor set to "Object Center" mode (rather than "Bounds Center" mode). This can be easily changed from the world editor toolbar.

In "Object Center" mode, the world editor uses the origin of your shape (position 0, 0, 0) as the center. In "Bounds Center" mode, it uses the center of the shape's bounding box, which usually covers only the shape geometry, and may or may not be centered at the shape's origin.

Quote:If it is a Collada DAE import, then the importer will assume that the center of the shape is the average of all the 3D information (ie. if it animates, it will center the shape on the theoretical center of all the animations information).

Partly true. If a mesh called "bounds" at the root level is not present in the DAE file, the collada loader computes the bounding box that encloses all of the scene geometry, but animation data is not used.
#4
12/14/2009 (7:05 am)
Many thanks guys - this helped me sort it.