I created a deformable mesh with a skeleton and it's corresponding skinning weights in blender. However, I wasn't able to find any tooling to export libigl compatible assets.
Solution
So I created this script to export
obj that exports mesh compatible with libigl's read_obj function
tgf that exports skeleton hierarchy compatible with libigl's read_tgf function
dmat that exports skinning weights compatible with libigl's read_dmat function
How to Use
In the scripting tab of the Blender layout, load the blender_script_export.py
Select the parent Armature in the scene inspector of the editor
Key Notes:
a. The armature used for rigging needs to match the name of the parent selected for export.
b. It's best to set the highest level bone of the armature as "root". If you intend to use a different name, update this line in the script.
c. You can optionally control what to export in the settings on the top right
Provide a path with an asset name on where to export the file. You do not need to provide any extension. Navigate straight to the folder and provide an asset name like shown.
Hit "Export" and the script should do the rest.
Debugging
I dump out a blender_igl_export.log file to ~/Documents/. This should provide a good set of progress, errors or warnings.
Remaining Questions
Is this script even needed for other folks?
If answer to 1. is yes, then is this the right location for the script?
Any further optimizations needed?
Proof of life
Loading the cylinder from blender using libigl. The image also shows the root bone's skin paint.
Here is what it looks like in blender
Comparing the animation loaded from dmat vs animation loaded as npy
Comparing frame 31 of animation in igl vs blender (in order)
This is really cool. I'm going to merge, but I wonder if this is the best place for this? I don't think this is going to get included in the pypi distribution as part of the bindings, right?
Exporting IGL Assets from Blender
Context
I created a deformable mesh with a skeleton and it's corresponding skinning weights in blender. However, I wasn't able to find any tooling to export libigl compatible assets.
Solution
So I created this script to export
How to Use
In the scripting tab of the Blender layout, load the blender_script_export.py
Select the parent Armature in the scene inspector of the editor
Key Notes: a. The armature used for rigging needs to match the name of the parent selected for export. b. It's best to set the highest level bone of the armature as "root". If you intend to use a different name, update this line in the script. c. You can optionally control what to export in the settings on the top right
Debugging
I dump out a
blender_igl_export.log
file to~/Documents/
. This should provide a good set of progress, errors or warnings.Remaining Questions
Proof of life
Here is what it looks like in blender
Comparing the animation loaded from dmat vs animation loaded as npy
Comparing frame 31 of animation in igl vs blender (in order)
Here is what it looks like in blender