Use SL Shapes

Avastar supports the import of your own SL shape to allow exact animations made for your character, or to create static Mesh dummies from your SL Avatar for re import back to your Online world.

Note: The video was made for Avastar-1.0 However it should still be helpful for Avastar-1.2

Step 1: Export your Shape from SL or OpenSim

The procedure to export the Character shape may vary depending on which viewer you actually use. We use the default SL Viewer.
Ensure that you have the Develop Menu in your menu bar. If you can not see this entry, you can enable it by pressing CTRL+ALT+Q (on Windows)
Open the Develop menu and proceed to the Avatar entry
From Avatar proceed to Character tests
And from Character tests proceed to Appearance to XML
When all is running smooth, then you will find your XML file in your application folder. For me it is in:
C:\Users\gaia\AppData\Roaming\SecondLife\logs\Gaia_Clary_nnn.xml
(where nnn is a number)

Note: the file path contains your Windows user name (mine is gaia) and your SL user name.

Step 2: Import to Avastar

Create a new Avastar

 

Add a new Avastar Character

The very first step is to create a new Avastar character. You find the creation Button in the main menu:

add -> Avastar

This will create a new female Avastar character. After a short time (typically 2-4 secs) a new Avastar character is created in the 3D View and at the current 3D cursor location .

Image006

Avastar's default Shape is compatible with SL's default Shape.

Important: The Avastar figure is an exact representation of the SL Avatar, based on the SL Avatar definition from Linden Labs and so it is fully compatible with the character from Second Life and all similar online worlds like OpenSim for example.
When you use Avastar's default shape then you also need to test your work with a fresh created shape in SL.
We do not use any of the Ruth shapes, because there is no clear definition what Ruth is. While there is an official definition of the default shape. In SL you create the default shape from your Inventory:

new_shape
default_shape

The SL default Shape (Create new Shape).

What you should know

  • New Avastar characters can only be created when you are in Object Mode!
  • A new character will be placed at the current 3D Cursor location.
  • You can hide ('h')  or remove ('x') not needed parts (like the skirt or the hair for example) without breaking the tools.
  • You can create as many characters as you like and thus you can create multi-character animations. Multi-character animations will be explained in the reference guide.
  • The character that you know from avatar.blend or from the workbench (sometimes also named "ruth") looks different from the default Avastar character. this is not a mistake. Further explanations can be found in the Avastar vs. Workbench Skeleton article.

Armature Info

If you have projects made with older versions of Avastar (Avastar 1.0 or any more recent development version ), then it is likely that the armature is no longer compatible with Avastar-1.1

Note: The Armature Info Panel shows the version difference between your Armature (in the example My Rig and the Avastar Version (1.1.20 in the example).
armature_info

You can check if the Armature is outdated(1) (in the Tool shelf).

 

(1) Currently old Blend files will not show an Armature version, because this feature is very new. Because of that you often do not see any version info. But this is enough for Avastar to know the Armature is outdated.

The Armature Info Panel contains following data:

  • Armature name
  • Avastar Version number
  • Rig version Number (may be empty)
  • Version Mismatch Info (if applicable)
  • List of assigned Custom Meshes
  • Number of animated Bones
armature_info

Whenever Avastar detects a Version Mismatch, then it offers an Update Button in the Avastar Tools Panel:

Inplace Armature Update

Avastar can now do an in place update of old Armatures. For this purpose we have added a conversion tool. So if your Armature is indicated as outdated in the Armature Info panel, then the Update tool shows up in Object mode:
  • Select your old mesh or your old Armature.
  • Then – in the Tool Shelf – look for Armature Info. If Avastar indicates a Version Mismatch, then…
  • Look for the Avastar Tools Panel and click on Update Avastar.

update

Select the Armature and click on “update”

 

 

Load your Shape

The Avastar Shape (Properties, Object Section)

Avastar can import and export shapes from OpenSim or any compatible online world. You find the import/export functions in the Object properties of the Avastar Armature:

  • Go to object mode.
  • Select the Rig (RMB on the yellow circles around the mesh).
  • Open the Properties window.
  • Navigate to the “Object” properties.

There you find a panel “Avatar Shape”. This panel displayes a subpanel with 5 main functions.

shape_editor_03

Load Shape

This function allows you to upload a Shape that you have previously exported from your online world: In most viewers there is a shape export option hidden in the advanced menu (“Advanced” -> “Character” -> “Charater Tests” -> “Appearance to XML”). This will silently create a file called:

[application_folder]/character/new archetype.xml

This file contains your current shape and can be loaded into Avastar, where [application_folder] is the viewer’s application data folder. For Windows this folder is located  at:

C:\Users\\AppData\Roaming\SecondLife\user_settings\new_archetype.xml

Save Shape to

By default this function creates a new Shape file with your current shape settings. This file can later be used for Load Shape (see above). Right besides the function you find a selector for the save destination.

As mentioned above the default option is to save to File. But you can also save to a Blender textblock. In that case the slider values can be found in the Blender text editor panel. The values correspond to the shape settings in the SL viewer.
shape_editor_02

Note: You can use the Singularity Viewer to import a shape file to SL. To see the file, switch to the Blender Text editor and locate Shape for: Avatar  (Avatar stands for the name of the Armature). Useful when you need to update the shape in SL with the values from blender.

Refresh Shape:

This resets the Avastar meshes to the current Shape values. Useful together with the new custom shape key function (see below). Also if you messed up the Avastar meshes (by editing them) you can return the mesh back to the current shape slider values.

Warning: if you added or removed vertices from the Avastar meshes, this function will fail!

Reset to Default Shape

Set the entire shape back to the Avastar default setup (the same as the SL Default shape which you get when you create a new Shape)

Delete Avastar Shapes

Remove all Shapesfrom the Avastar character. You will want this when you use the rig for non human characters where keeping the Avastar human meshes make no sense.

Load Shape Editor

When you load a blend file which contains an Avastar Character, then the Shape panel will only display the “Load Shape Editor” Button. Activating the button loads the shape setting controls. We added this for optimization purposes as it takes a few secs to initialize the Avastar shape system.
shape_editor

 


By now the Avastar default Mesh character has been reshaped to precisely match your own mesh character. Note, that your imported character is rigged and weighted already. There is no need for any additional step. However you can still change the Avatar shape by using the shape sliders.
You find the Shape Sliders in the object properties section, right below the Load Shape button. We provide the exact same shape sections in Avastar as you can find in the SL Shape editor. The sliders are supposed to behave exactly in the same way.
Hint: The sliders are a bit slow sometimes. Currently there is not much that we can do about that.

Export to Collada

 

Export your Character as Collada

The Collada exporter exports your Mesh character or mesh attachment to a form that is recognizable by the target System (SL, OpenSim or any compatible online world). You find the Mesh Exporter in the Tool shelf. The Collada Panel has quiet a few options. we explain all of them now
 

Hint: You usually can keep the default settings and just click on the “Collada(Avastar)(.dae)” button. A File Selector will pop up. Here you can navigate to your export directory and then export your file as a Collada file (using the file extension “.dae”)

Modifiers

By default Avastar applies all mesh changing Modifiers except the Armature Modifiers to the exported meshes. However, some modifiers have 2 sets of options, one option set is for rendering, the other option set is for the Viewport. We provide 3 options here:

Image013
  • Apply according to the View Settings (the 3D Preview settings)
  • Apply according to the Render Settings (the settings for Blender’s own Renderer)
  • Don’t apply modifiers and only export the base mesh

The View settings  will be applied by default. These settings are very closely related to the Blender Render System. In most cases you can actually just use the defaults. We will get back to this when we talk about how to use (or not use) Modifiers.

Armature Modifiers define a relation between your mesh and your Skeleton (Armature). You find the Armature modifier in the Modifer Stack (see image). Armature modifiers are always defined for the mesh. Armatures them self have no Armature modifier.

We will get to armature Modifiers in the “Create an Attachment” tutorial.
modifiers

Hint: You want to display the modifier in edit mode and adjust edit cage to modifier result

Textures export (advanced)

You can export images along with your models. In that case the images will be stored as extrafiles and a reference is added to the Collada file. The SL Importer knows how to read and import these images for static meshes.
Note: But for rigged meshes the images are not recognized.
Image014
  • UV Textures & Material Textures: Blender supports Material based textures and UV textures (which are directly assigned to polygons). Normally you want to export only the UV textures. In rare cases it is more desirable to export the material based textures instead. But beware, Blender does not export the render results, but only the source images!
  • Image Type:  The image format is typically predefined in the Blender Render settings.  However we found it convenient to provide an immediate setting in the Exporter. By default the image type will be applied ONLY to generated images.
  • Use ‘Image format’ for all images: If this option is set, then Blender will use the selected image format for all exported images. If the option is disabled, then only the generated images will be affected.
  • Use RGBA: Blender can export the Alpha channel for images. Normally this is controlled in the render settings where you can specify to use either RGB or RGBA for image exports. If the currently selected export format supports Alpha then enabling  RGBA here will export images with Alpha channel even if the render settings are set to RGB and vice versa.

Hint: You may want to NOT use RGBA because of the Alpha glitch. However this is not a general advice. There are many situations where using Alpha images is even recommended (for example when you want to create an Alpha mask).
Hint: If the format of the exported image(es) does not support an Alpha channel then the “Use RGBA” option is simply ignored.

Advanced options

The Advanced Options are related to some special issues. You should normally keep the options set as they are. This ensures your exports are well suited for SL. However in some situations you will have to get back here. So we have added a bit of explanation (to be completed)
Image015
Apply Armature Scale: If you have scaled your Armature in Object Mode for making a tiny or a giant you should not apply the scale to the armature because then the entire Avastar Animation system may no longer work (details need to be documented). But the Object Scale must be applied when you export the mesh.
Otherwise your scaling will not be recognized in your target online world and the giant shrinks back (or the tiny grows back) to normal size. The Applay Armature Scale option ensures that the Object scale is applied in the exported Armature.

 

Apply Rotation & Scale: If you have Scaled or rotated your Objects in Object Mode then this Scale&Rotation should be applied to all objects of an export to avoid unexpected scaling and rotation issues within the target system. However this is all so often simply forgotten and sometimes even unknown.
Hence we have added an automatic apply Rotation&Scale to the exporter. This setting does not affect the original objects.

 

Weld Edge Normals: When two separate objects share a boundary line, then you typically see a boundary seam in the object texture. This happens because the vertex normals differ even if the adjacent objects share the exact same vertex locations.
This option recalculates the vertex normals at the adjacent boundaries of the selected objects.

 

Weld to all visible: Sometimes you want to only export one part but still want the vertex normals be fixed.
This option lets the exporter take all visible objects into account when calculating the vertex normals at object boundaries.
Include Deformer Shape: Some virtual worlds support the Mesh deformer which was originally developed for usage in Second Life.
When this option is enabled, then an additional xml file is created that can be used as reference shape if the Importer supports this feature (currently used with OpenSim)

 

bone bug fix: We have found that some online worlds have serious issues with modified Joint offsets for Collision volumes and Attachments(1). Hence we suppress the export of joint offsets for collision volumes and attachment bones by default.(1): The technical details are related to the SL Importer’s option With Joint Positions The Skeleton can be modified (in edit mode) to create other rest poses than the default rest pose (T-Pose) When you do that, you actually move the Joint Offsets away from their default locations. And you will later have to set “with Joint Offset” during import in order to get your modified sjkeleton uploaded.

However this works only for the SL Basic bones (the mBones) All other Bones have various issues with Joint Offsets. The Collision Volumes do not work at all when you try to import them with Joint Offsets. We consider this an SL Bug. So we have added the Bone Bug Fix option. This option should only be disabled for experimental purposes! Handle with Care. You likely break the animation system.

Step 3: Import your Character to SL

Once you have exported your Mesh character, you only need to import it to your target System (like SL or a compatible online world). Although this is easy in principle, there are a few pitfalls in your way. So let us take a deeper look into the Mesh Importer.

The Video explains:

  1. How to import a rigged Mesh to SL, OpenSim or similar online worlds.
  2. How to use an Alpha mask for hiding the default character
  3. How to use image textures to texturise your character.
  4. Potential problems with your meshes (visible seams, wrong shape, missing face animations)

This video has been made in SL. But it applies also OpenSim or any other OpenSim based world as well. Also the video does not depend on Blender, but it is a general purpose tutorial for the SL Importer. Below you find the import procedure explained in pictures.

Upload the model

You can start an upload directly from the main menu bar as shown in the image above.You also can start an upload from within the repository view.

The LOD Panel

The model uploader starts in the LOD panel. Here you can define all your levels of detail or let them calculate automatically. We currently have no LOD files, so we keep this panel as it is.
Note: You always can get detailed help from the help button in the upper right corner. For now you can proceed by switching to the Upload options tab.

The Options Panel

Normally the uploader will only upload the mesh, but no animation data. If you want to also import the rig data (the mesh weights), then you have to include “skin weights”. Please keep the button “Include joint positions” unchecked unless you know exactly what you do. we will get to this advanced feature later.
Also note that you can checkmark the “skin weights” below the Preview window to see if your mesh is properly weighted. But checking the skin weights here has no influence on the upload! This is so common mistake! If you ever are “sure that your mesh is weighted” but remains stiff when worn, then there is a good chance that you forgot to enable “Include skin weights” on the left side!

Step 4: (Optional) Import your Shape back to SL

Sometimes you might have modified your Shape In Avastar. And maybe you want to get your modified Shape back into Second Life. While the default SL Viewer does not provide a Shape Importer, most other third party viewers offer such an option nowadays.

Exporting a Shape from Avastar

You can export your current shape from Avastar to File as follows:
  • Ensure Blender is in Object Mode
  • Select the Avastar Armature
  • in the Object Properties locate the Avatar Shape panel
  • There you find a Save Shape To option
shape_exporter

Importing a Shape to Second Life (using Firestorm)

You can import your shape back to Second Life with the Firestorm viewer as follows:
  • Enter the Appearance Editor in your Firestorm Viewer
  • Down in the right lower corner of the editor you find an Import option
shape_importer

The Firestorm Viewer provides an Import Option right within the Appearance Editor.

Now we are done with our first Mesh creation. You can simply wear the mesh and see how it moves with the default animations...

44 Enlightened Replies

Trackback  •  Comments RSS

Sites That Link to this Post

  1. Avastarを使ってSLシェイプをBlenderで再現 | Totto World | March 21, 2013
  2. Avastar-1-dev-625 is available « | August 27, 2012
  1. antoine.juigne says:

    Bonjour certainement un tres bon tuto, sauf que meme avec la video, je n’est pas (et pourtant je cherche) de “Avatar shape” sous la rubrique “proprietes” et les 5 rubriques qui vont avec, c’est un peu pour ça que j’avais acheter Avastar :(
    Ps: je suis bien en mode objet, et j’ai selectioner les Rig avatar dans l’onglet Element
    Hello certainly a very good tutorial, except that even with the video, I is not (yet I seek) of “Avatar shape” under “properties” and the 5 sections that go with it is a little to why I’d buy Avastar :(
    Ps: I am in object mode, and I choose the Rig avatar in the Element tab

  2. Trek says:

    In case Mac users are trying to find the shape xml file after doing the Appearance to XML step – it is here: /Users/(username)//Library/Application Support/SecondLife/logs/(slusername)_s_xxxx.xml

  3. Stellar Capelo says:

    Hi, very good tutorial. I can now create a fitmesh avatar body that works as it should except for reacting to avatar physics inworld. I’m using avastar 1.2/blender 2.72b and following this tutorial. my viewer see physics from other fitmesh avatar bodies, just not from the ones I create, am I missing something in creating my dae file? I’m relatively new to this so hopeing its just something i’m overlooking:/

  4. Betty says:

    hi, I am having isues uploading standard sizing objs to avastar. everytime I try, I get the message: “ERROR: NOT SURE WHAT WENT WRONG”

    I know, funny error, but i cant upload shapes :/

Post a Reply

Your email address will not be published. Required fields are marked *

Top