Banner by Bams

Go Back   Second Citizen MK II > The Mainland: Second Life® > Content Creation > Building Tips

Reply
 
Thread Tools Display Modes

Masami's BOFH (Blender Operator From Hell) thread
Old 11-20-2011, 10:23 PM   #1
Masami
Kuramoto

Masami's Avatar
 
Join Date: Oct 2011
Posts: 93
Default Masami's BOFH (Blender Operator From Hell) thread

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:
  1. In Blender, select the armature and switch to edit mode.
  2. For each bone, uncheck the "Connected" option.
  3. 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:
  1. Select the head of the bone.
  2. Snap the 3D cursor to the selected object.
  3. Select the tail of the bone.
  4. Snap the selected object to the 3D cursor.
  5. 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:

Masami is offline   Reply With Quote
2 users are now drooling and mumbling about pie:

Old 01-01-2012, 03:48 PM   #2
Masami
Kuramoto

Masami's Avatar
 
Join Date: Oct 2011
Posts: 93
Default

UPDATE:

There is now a free add-on for Blender which will perform the above workaround automatically. You can download it from the Machinimatrix website: http://blog.machinimatrix.org/avastar/mesh/
Masami is offline   Reply With Quote
One user says 'MMmmm. Pie':
2 users say thanks:

Old 02-17-2012, 07:35 AM   #3
Masami
Kuramoto

Masami's Avatar
 
Join Date: Oct 2011
Posts: 93
Default

UPDATE #2:

No more tweaks and workarounds required! Blender 2.62, released yesterday, has a Second Life compatibility mode that fixes all our COLLADA troubles.
Masami is offline   Reply With Quote
One user says 'MMmmm. Pie':
2 users say thanks:
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -4. The time now is 06:39 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Second Life® and Linden Lab® are trademarks of Linden Research, Inc.
Second Citizen MK II Forums are not affiliated with or sponsored by Linden Research.
© 2009 - 2011 Second Citizen MKII [SC MKII]
| Home | Register | FAQ | Members List | Calendar | Today's Posts | Search | New Posts |