I'm importing some models from blender to unity and can't work out how to easily control the number of bone influences per vert. Looking at it some of them have 6 or more bones controlling it, ideally for my use I want to automatically set it to max out at 2.
Also, it feels like I'm getting a lot of my control rig data built into the package at the end (even though its no appearing in unity) and its bloating the file size of the assets. Any ideas how to check or what to do about it?
Replies
I found this addon that let's you set a bone limit (Unity supports 4 bones per vertex, 2 seems a little low.) Then you have to run a Clean in Weight Paint mode to actually remove the bone influence.
As for the extra junk... The best solution we found was to always Export Selected to FBX format with bake animation turned on. We use 3ds Max, but it should be similar. A Unity editor script could technically be made to remove all the junk at import time, but it would be very difficult to maintain.
Regarding the script I'm using rigify for some of them and there is actually a script for it in the asset store already.
http://forum.unity3d.com/threads/90913-Rigify-to-Unity
It strips out the junk while it loads but looking at the file sizes on the built asset list it's still bigger than I would expect it to be, but hard to tell exactly.
Theres another solutionin that thread I just saw but, if you wanted to use it I made this script (more like a macro) to change the default deform bones to the org set rather than the def to leave out the twist bones. https://dl.dropbox.com/u/1693140/rigifyscript.py