How to get hold of individual 3D objects ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
JuggernautIRR
Posts: 21
Joined: Tue Jun 05, 2012 4:42 pm

How to get hold of individual 3D objects ?

Post 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,
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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

Post 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.
JuggernautIRR
Posts: 21
Joined: Tue Jun 05, 2012 4:42 pm

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

Post by JuggernautIRR »

Hybrid, thank you for your reply. Is there any definite order in which the different nodes are returned ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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

Post 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.
Abraxas)
Posts: 227
Joined: Sun Oct 18, 2009 7:24 am

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

Post 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.
JuggernautIRR
Posts: 21
Joined: Tue Jun 05, 2012 4:42 pm

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

Post by JuggernautIRR »

@ Abraxas): Thank you for the tip. I will try to follow it.
Post Reply