Page 1 of 1

How to get hold of individual 3D objects ?

Posted: Sat Dec 01, 2012 8:51 pm
by JuggernautIRR
Hello,

Once I load a .irr or .b3d file in irrlicht how do I get access to the individual objects within that file ?

I mean the .b3d and .irr file contains many individual 3D model parts. How do I get access to each of them as when required ?

Thanks,

Re: How to get hold of individual 3D objects ?

Posted: Sat Dec 01, 2012 9:31 pm
by hybrid
In .irr files you can access the scene nodes via names. In b3d files, all parts are grouped into one mesh. Separate parts are put into separate mesh buffers. However, these are not named so you have to find some way to identify your objects on your own. It's better not to group things into one mesh file if you need to separate them later on, though.

Re: How to get hold of individual 3D objects ?

Posted: Sat Dec 01, 2012 10:35 pm
by JuggernautIRR
Hybrid, thank you for your reply. Is there any definite order in which the different nodes are returned ?

Re: How to get hold of individual 3D objects ?

Posted: Sat Dec 01, 2012 11:47 pm
by hybrid
Neither for mesh buffers nor for scene nodes you'll have any guarantee. The order can change at any time with any Irrlicht release. However, in most cases the order will be file order or reverse file order.

Re: How to get hold of individual 3D objects ?

Posted: Sun Dec 02, 2012 4:59 am
by Abraxas)
JuggernautIRR here's an idea that might be of help.

Construct your assembly in 3ds/blender whatever. Make sure each "part" is a separate object. Orient them properly. Now, use the "export selected" feature to save them one at a time.

This works really well if, for example, you're designing armor that would go on a model. Make the model, make the armor, orient them in each frame, then export.

Re: How to get hold of individual 3D objects ?

Posted: Wed Dec 05, 2012 1:31 pm
by JuggernautIRR
@ Abraxas): Thank you for the tip. I will try to follow it.