Mesh with armature and several animations from blender?

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
lordadamson
Posts: 10
Joined: Sun Nov 29, 2015 6:49 pm

Mesh with armature and several animations from blender?

Post by lordadamson »

How do I load a mesh with armature and several animations from blender? Which format would be best in terms of performance and compatibility with irrlicht?

And how do I load a specific animation?

The tutorials show how to load from md2. But I won't use md2.

Also are their any common bad practices when it comes to modeling and animating that I am not aware of? I triangulate my meshes and I bind bones with vertex groups. Am i doing it right?

Thanks in advance.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Mesh with armature and several animations from blender?

Post by CuteAlien »

Best format is probably the b3d exporter I mentioned in the other thread. B3D has armature and supports several animations. They get put into one file so everything is loaded together on import. You have to check from which to which frame they go and set those in the animation in Irrlicht.

Alternatively it would be possible to split the armature and the animations into different files. But I'm not familiar enough with that exporter to know if it supports partial exports. Inside Irrlicht you can use SkinnedMesh::useAnimationFrom to put animations from one file unto a skeleton+model from another file.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
lordadamson
Posts: 10
Joined: Sun Nov 29, 2015 6:49 pm

Re: Mesh with armature and several animations from blender?

Post by lordadamson »

Hey CuteAlien thanks for the quick reply.
You see I was trying so damn hard to import b3d into irrlicht but it doesn't seem to get the materials/textures right for some reason. After so many hours of trial and error I managed to get collada and 3ds to work. I'm not really sure what the problem is, maybe there is something wrong with my blender exporter? I'm using the Gandalf's B3DExport.py script mentioned in the irrlicht docs here: http://irrlicht3d.org/wiki/index.php?n=Main.B3d
maybe this one is outdated?
I'll search for another.

Anyhow in case I managed to successfully import b3d, could you please tell me what are the functions to use to load a specific animation?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Mesh with armature and several animations from blender?

Post by CuteAlien »

You missed the link I gave you in the other post :-) Take the b3d exporter from stk:
https://sourceforge.net/p/supertuxkart/ ... lender_25/

Collada has no animation support in Irrlicht and is a little bit tricky in general as it's more of a scene-format than a model-format.

I haven't worked with animated blender models for a few years, still trying to find time to get back into Blender animation so I can check that workflow again (last time I did was Blender 2.4.9 when the Gandaldf script still had worked, it broke with the interface changes in 2.5).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply