Something about exporting animated meshes to Irrlicht.

Hi all!

I’ve been reading the posts related to the export of Blender animated meshes using the DirectX8 script and using them in the Irrlicht engine. There are some requirements for the script to generate a correct .x file but I’ve found something I didn’t read about on any posts. That’s why I’m posting this one (sorry if that’s already a well-known subject, I’m new in this board).

I’ve found out that “skinnable” bones of the armature (I mean those who have vertex groups assigned to them) must be directly or indirectly parented to the first bone that shows at the top of the list on “Armature Bones” Panel (having all bones selected in edit mode). The phyton script reads that list in order, starting from the first bone, and follows its hierarchy taking each child bone information. If the main parent bone isn’t at the top of the list and there are some skinnable bones not parented, the script will miss some bone’s transform information, and the mesh won’t animate correctly when loaded in Irrlicht (its console will show an error line for each one).

As an example, if we take the foot rigging example described in Blender Docs, we’ll need to parent bones “UpperLeg”, “Foot” and “Toes” to the first bone in list, since they are root bones of 3 independent bone chains (although they relate each other by “Copy Location” constraints and so). We can add a dummy bone in the armature (remember it must be at the top of the list) and make it parent of these, and it will work OK as long as we don’t apply any transform on it (otherwise it could apply its transformations to its children). Don’t parent “no skinnable” bones (like solvers) since it’s unnecessary (the Irrlicht console will show some warning error about these, though, but they can be safely ignored).

I suggest to add the dummy bone first in the armature (and forget about it for now), then make your rigging setup, test it and, as a final step before exporting your .x file, parent every unparented chain root bone to the dummy bone (remember, only chains which include skinnable bones, don’t need to parent IK solvers).

Well, that’s it. I guess that Blender&Irrlicht users already knew that, but I’ve found this out by myself since I didn’t found info about it.

Hope you find that useful. :slight_smile: