Using assimp library (Open Asset Importer Library) we noticed that our animated models looked horrible, it seemed like the vertices were acting outside the armature limits.
The picture below shows the problem we had initially. Perhaps for someone who had use assimp it will look familiar.
(The application showed in the pictures is Open 3D Model Viewer)
After analyzing the log and do some research about assimp limitations, it turns that all weights in a vertex have to sum 1.
In blender there is already a function to normalize weights, however, it only works for one vertex, so you have to select each one of them and apply the normalization manually.
So, we decided to create a simple plugin that loops over all vertices and normalize the weights.
The picture below shows the result after applying the plugin.
The blender plugin installation is in the standard way according to the next steps:
- Download the plugin file HERE (for Blender 2.8 download HERE).
- Unzip the downloaded file.
- In Blender go to the menu File -> User Preferences.
- On the User Preferences window go to Add-ons panel and click on Install Add-on from file.
- Select the file "normalize-all-vertices-weights.py" and click OK.
- The plugin (add-on) now is already installed.
- Consider clicking on Save User Settings because otherwise, when you close Blender you will lose the plugin installation and you will have to do it again.
- Once the plugin has been successfully installed, select the object you want to normalize.
- Change to edit mode.
- Go to Mesh menu and click on the new element "Normalize all vertices weights".
- A simple confirmation window will be shown.
- After it has been executed you will see the result text on the status bar indicating the number of normalized vertices.
- Up to this point we already have our model with normalized vertices.
- Then we export the model as usual.
*The procedure to install and use the plugin on Blender 2.8 is pretty much the same described above, you only need to use the file "normalize_all_vertices_weights_2_8.py"
*If you have questions about this plugin feel free to contact us.