Position of 3D model components

jrs's picture

Hi All,

Does anyone know how to get the position of an object in a 3d model? Its an fbx model with multiple components and I'd like to know the offset of each object. Kineme 3D has the "object center" patch which seems to be able to access this offset and recenter it but I'd like to access it from within the composition.

Is this doable or a feature request?

Cheers James

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: Position of 3D model components

If it's an ASCII model file then you could search for the RotationOffset and the ScalingOffset.

If you've got Binary files then you could convert them to ASCII format using the FBX Convertor application from Autodesk Labs, so you could read those values as set in the file for each object contained within the master object.

The Kineme 3D Object Loader doesn't provide that Rotation offset information from the Ouput Objects output port even though it will load .fbx files, but if the .fbx is in ASCII format, you can get that information from within the file's listing of the object's properties.

If the file is in ASCII format, you can tweak edit those settings and save the file

Not quite sure how you could then use that information meaningfully upon that object, other than plumbing it into how individual objects are subsequently rotated and positioned and scaled.

Then again, maybe someone else has a better idea about this.

See attached example.

Apologies for the lack of the material file.

The blue sphere is the one that has default 0,0,0 offset for rotation or scaling.

The red file has offsets done for it's scaling.

PreviewAttachmentSize
fbxoffsetquestion.zip27.12 KB

jrs's picture
Re: Position of 3D model components

Cheers Peter - I'll have a play around and see how I go - the idea is to simply overlay each component from a model with its name

cybero's picture
Re: Position of 3D model components

You can use the Output Objects port output on the 3D Object Loader to sort through and 'capture' the distinct individual objects contained within a multiple object 3d file.

You can then adjust the composed positions as you see fit.

You can also adjust the offsets within the ASCII version of the file within a text editor, [FBX Convertor is your friend :-)]

See attached example.

[Just realised that there's some excellent multiple .fbx object files on NASA's site [http://www.nasa.gov/multimedia/3d_resources/]]

Regards the labelling, they could be objects in the file or else you could create separate 3d text .fbx files and position appropriately. Alternately you could create 3d text meshes with fill using Mesh Renderers for the text or Image with String to Sprites.

PreviewAttachmentSize
honeybee.zip3.65 MB

franz's picture
Re: Position of 3D model components

Hi, the trick is, in your modeling software, to have each object's pivot point centered at 0,0,0 (and not centered on the object's center of gravity, as it is usually the case). That way in QC, each object will be in its right position.