Lesson #1: How to export rigged meshes from Blender 2.60 and later
If you are tired of using outdated Blender releases for rigging, this one is for you. There is a way to make COLLADA exports from Blender 2.60 compatible with Second Life, and it doesn't involve any patches, scripts or external tools. All it takes is some modifications to the rig. I'm going to use the "simplebot.blend" example from the SL wiki
to show you how it's done.
By default, if you use Blender 2.60 to create a COLLADA file from a rigged mesh, the result in SL will be messed up like this:
The problem is that Blender and Second Life disagree about how to interpret the bind pose information in the COLLADA file. Of course each party thinks that the other one is wrong, which means that there will be fingerpointing but no solution from either side any time soon.
Now here's the workaround:
- In Blender, select the armature and switch to edit mode.
- For each bone, uncheck the "Connected" option.
- Rotate each bone so that it is parallel to the global Y axis and set its bone roll to 0°.
In case you're wondering how to perform the rotation in step #3, here's how:
- Select the head of the bone.
- Snap the 3D cursor to the selected object.
- Select the tail of the bone.
- Snap the selected object to the 3D cursor.
- Press G, then Y, and move the tail along the Y direction.
After you're done, the rig will look like this:
Although it looks a bit weird, this rig is still fully functional, because the initial direction and length of the bone tails is irrelevant. What matters is the relative position of the joints, which we haven't changed at all.
Now switch back to object mode, select both the armature and the mesh, and export them as COLLADA. Here's the result in Second Life: