Page 1 of 1

Blender script: Limit bone count and normalize weights

Posted: Tue May 24, 2011 9:57 pm
by dark_sylinc
Hi all!

I'm surprised a script like this doesn't exist.
We all know Ogre has a bone count limit of 4 bones per vertex, and for a few reasons, the sum of all weights should be 1.
These limitations (i.e. the 4 bone per vertex) may be automatically handled inside the engine, but it may affect the animation which comes as a surprise.

Most importantly, I have other engine/performance restrictions (i.e. max limit = 2) and fixing them with thousands of vertices is hell.

I wrote a script (attached) for Blender 2.49b that will remove extra bones with lowest weights, and will additionally normalize all weights.
Hope you enjoy!

Cheers
Dark Sylinc

PS: Released under GPL v3. Instructions inside the script as comments