Adding a script to export igl assets from blender #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
