Create an Attachment

About this Document...

Content:

  • Basics of Attachments
  • Skinning fundamentals
  • Weight Maps
  • Weight Inspection trools

The Cheat Sheet

  1. Bind the Mesh
  2. Inspect the Mesh
  3. Create Test Pose(s)
  4. Optimize the Weight Maps
  5. Toolshelf: Export your character
  6. SL: Import the model.

Some useful Hints

  • Is Avastar installed.
  • Get started with Blender?
  • Check Blender’s Help section.
  • Find online docu: RMB -> Online Manual.
  • In SL: Create a fresh Shape.
    This Shape matches with Avastar’s default shape.
  • The gender setting is supported as well.

What does Avastar provide?

Avastar basically supports the creation of animatable Models (Avatars&attachments) and the creation of animations. Therefore the tool adds various functions and user interface elements to Blender.

The full functionality of Avastar can be a bit overwhelming on first sight. You should be prepared to spend some time and patience to get it all working nicely for your projects.

What does this Document provide?

This article is about creating rigged mesh attachments for SL Avatars (or OpenSim and similar). We concentrate mostly on the Avastar Tools, but most of the information in this document also applies for Second Life mesh creations in general.

This Document is very complex because the topic is complex as well. You should be prepared to spend some time for experimenting and getting experience. Your best approach is to follow this article from top to bottom.

We expect that you have basic knowledge about Blender.

This topic is not difficult,
it is only hard to explain.

Warming up

Please be prepared that there is a lot of experience and training involved when you work on skeletal animation (making rigged mesh for Second Life). You can compare this with learning to play the Piano. In both cases you need a bit of talent, the right tools, and a lot of experience and time for practicing.

Now let the games begin…

Noobie? Open this first...


If you are very new to Blender, or do not understand the terms, then this video gives you a brief introduction to the concepts of Blender’s user interface.

Patience you must have…

It also helps a lot when you get comfortable with Blender before you start this tutorial. In any case:

 

time you need
and patience you must have
my young Padawan!

Further reading

This article is mostly about rigged mesh attachments. And i try to give you as much of background knowledge as possible, so that you can start creating your own attachments with confidence.

However, i expect that you have worked through the Create a Character tutorial

If you not already did, then Consider to first read this:

First Steps

Attachments in a Nutshell...

Attachments are just regular objects, either Prims, Sculpties or Meshes which have been “attached” to an avatar. Furthermore Meshes can be either static (similar to Prims and Sculpties) or rigged (can be animated similar to the default SL Avatar)

Secondlife supports 2 types of rigged objects, namely Rigged Mesh and Fitted mesh. Note that technically there is no difference between a riged mesh and a fitted mesh (see below).

Rigged Mesh attachments

Rigged Mesh attachments are like any other attachments, but they additionally contain extra data which makes them fully controlled (animated) by the Avatar skeleton.

Fitted Mesh attachments

Fitted Mesh Attachments are a special form of rigged mesh attachments which additionally use a specific subset of the Avatar’s skeleton (the Collision Volume Bones)

Some Gotchas you must know...

Attachment Points

Attachment points are hooks where you can tie objects to your avatar. In Second Life we have 32 attachment points where other objects can be attached. These attachment points are distributed all over the avatar (marked as red spots in the image). And each attachment point is “glued” to one of the 26 bones of the SL skeleton. Technically attachment points are regular Bones (for more about Bones see further down).

History

Before Mesh objects have become available, we had only static attachments: either rigid Prim objects or flexi Prim objects. These attachments only move along strictly in parallel to the movement of their attachment point. Thus something attached to a hand attachment point will move with the hand, something attached to a head attachment point will move with the head, etc.

SL Avatar with its Attachment points (displayed as red dots)

Note: Since Attachment Points are Bones, they can theoretically be used for weighting as well. But Second Life does not officially support this. We strongly recommend to not use attachment points for weighting purposes.

Mesh up

Since summer 2012 SL also supports regular Mesh Objects. Since then we have got another possibility for beautifying our beloved Avatar, the Mesh Attachment

Static Mesh Attachments

Meshes are by default rigid Objects which behave exactly in the same way as regular Prims and Sculpted Prims. A Mesh object can be attached to a single attachment point exactly like Prims or Sculpties. So by default they move along with the Avatar like Prims do.

However, besides static Mesh Objects we can also create Rigged Meshes

Rigged mesh and Skeleton

Meshes can be animated in exactly the same way as the SL Avatar itself is animated, by using a Skeletal Animation technique. In the context of SL this technique is named Rigged Mesh. So Rigged Meshes follow the movement of the Avatar in a more natural way. Like a dress can bend when the Avatar sits down, or a jacket follows exactly the arm movements.

Brief Details

Technically, Rigged Meshes are mesh objects with 2 additional features:

  • They are bound (attached) to a specified rig (or more precise: The SL Rig).
  • They have a well defined set of Weight Maps (in Blender: a set of vertex groups) corresponding to the Skeleton bones of the SL Rig.

Note: Weight Maps are described further down in this document.

Rigging & Skinning

There is a bit of confusion about these terms. So here is a bit of clarification for them:

Rigging

In very general terms a Rig is the animation system that is used later for animating the meshes. Rigging is the construction of such an animation system. In the context of SL the Rig is equivalent to what we know as the Avatar Skeleton.

The SL Default Rig

When we create attachments for the SL Avatar, then we actually have to use the SL Rig without changes. When we later upload a mesh to SL then -by default- the SL Importer assumes that the correct Rig was used, thus it does not even upload any skeleton information, even if it was modified in Blender (see below)!

img-1-006

Note: When you work on non human characters, then the human skeleton is in general not suitable. Because of this it is possible to modify the Rig and upload the modifications to SL as well (this is what the with joints option does actually). But we will not get into this here. We have setup an entire course for Non human Character rigging instead, which you can purchase separately on our Blog.

Skinning

Skinning is the process of connecting a Mesh (think of it as the Skin of your mesh) to a Rig (the Skeletal Bones that will animate your mesh), that is, we define exactly how each part of the mesh is influenced by the Skeleton. Skinning involves the creation of Weight Maps. And this tutorial is all about how to create and improve the Weight Maps for mesh attachments. So you are now in the middle of a skinning tutorial actually.

What we get from Avastar

In general skinning a 3D model is a complex and time consuming task.Blender already gives you most of the basic functions for achieving your results. However, there are still a few features missing or not easy to use with pure Blender. And there is where Avastar chimes in…

Bones…

The Second Life Skeleton has been defined with many bones (84 bones actually) for very different usages. Though you might only know about the 26 SL Basic bones (mBones).

Avastar’s Skeleton provides the complete set of bones that are also defined by SL. Plus a couple of extra bones mainly for animation purposes.

84 Bones in the SL Avatar:

  • 26 Base Bones (mBones).
  • 26 Collision Volumes (fitted mesh).
  • 32 Attachment points (hooks).

136 Bones in Avastar:

  • 26 Base Bones (mBones).
  • 26 Collision Volumes (cBones) (1).
  • 32 Attachment Bones (hooks).
  • 29 Rig Bones.
  • 14 IK Bones.
  • 9 Extra- and Structure Bones.

(1): The cBones are used for collision detection and for Fitted Mesh Attachments

and Tools…

Avastar also offers various tools which let you setup your attachments with little effort compared to the “pure” Blender Only solution. We will see a few of these tools in action shortly.
  • Copy weights.
  • Clean weights.
  • Find unweighted.

 

The working Model

I will use a very simple skirt for this tutorial. This skirt comes as a simple static mesh model

Download from here:

simple_skirt.blend (if you want a blend file)
simple_skirt.obj (if you prefer an obj file)

Depending on your browser, you will probably need to right-click on the blend or obj link and “Save as” to download to your computer.

CC-logo-88x31

The above demo_model provided by Machinimatrix is licensed under a Creative Commons Attribution 4.0 International License.

For Second Life Users: We explicitly grant the permission to upload derived material to SL.

model

Simple cloth models for this tutorial.

The goal

So our goal is to attach the skirt to the character such that it moves along with the model, but also bends appropriately when the legs move. This is what we typically call “skinning”. In simple words skinning prepares the static model for getting animated.

We have prepared a couple of documents about all aspects of modelling for Secondlife. You find the documents in the document tree on the right side of this page. IN addition here are the links:

When you want to master the process of skinning (weighting) your mesh, then you need some very fundamental insight into the topic. The following toggle box contains a brief summary. Please take your time and read this text a couple of times. This will save you a lot of time later:
This is about attaching your character to the Avastar Meshes
Introduction to various tools for inspecting your weight maps.
Introduction to tools for editing your weight maps.
A fundamental chapter (beware of knowledge) about how bones weights and meshes work together
A bit about what Topology is and why it is important to think about it
Various scenarios for exporting your work to different target systems
Things can go wrong and will go wrong. Here is what you can do to keep or get back to sanity.