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 Blender Export menu.
The Exporter opens with a file selection window where you can select the file to where you want to export, or you can type in a new filename.
Note: If you prefer to see the Collada exporter in the Tool Shelf, then you can customize the Avastar Add-on Preferences.
Hint: You usually can keep the default settings and just click on the “Collada(Avastar)(.dae)” button in the upper right corner of the Window (see zoom icon in this chapter title).
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”)
Tip: If you intend to use your exported mesh for Animesh then please note that Animesh currently does not support the Appearance sliders. Your mesh will always shows as when you enable the white Stickman preset in the Avastar Appearance slider panel.
The Export option Sub-panels
The Exporter provides a couple of export options for special cases. Please use these options with care.
Modifiers
By default Avastar applies all mesh changing Modifiers except the Armature Modifiers to the exported meshes. However, some modifiers offer 2 sets of options, one option set is for rendering, the other option set is for the Viewport. We offer 3 options here:
- 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 exporter by default applies the View settings. 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.
Side note: The Armature Modifier
Armature Modifiers define the relation between your meshes and your Skeleton (Armature). Avastar never applies the Armature Modifiers when exporting because the mesh would be transformed to static non rigged Meshes. This is almost never what you want.
For the curious: You find the Armature modifier in the Modifier Stack (see image). Remind: Armature modifiers are always defined in the mesh modifier stack. Armatures them self have no Armature modifier.
We will get to armature Modifiers in the “Create an Attachment” tutorial.
Textures export (advanced)
Note: But for rigged meshes the images are not recognized.
- 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 offer an immediate setting in the Exporter. By default the exporter applies the image type only to generated images.
- Use ‘Image format’ for all images: If you set this option, then Blender will use the selected image format for all exported images. If you disable the option, then only the generated images are affected.
- Use RGBA: Blender can export the Alpha channel for images. Normally you set this in the render settings where you can specify to use either RGB or RGBA for image exports. If the 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 (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 special scenarios. You should normally keep all options set as they are. This makes sure that your exports are well suited for SL. However in some situations you will have to get back here and set the options according to the descriptions below.
Warning: You must really know what you do when you set an advanced option. Handle with care!
Use Bind Pose: The Use Bind Pose option is largely documented in the Bind Pose Workflow
You normaly set this option in the Appearance Sliders. We added it here only for convenience.
Following options are only available when the Use Bind Pose option is enabled:
- Export Visual(new in Avastar-2.6): Avastar tries to minimize the number of translation components in joint offsets to achieve the best possible (the easiest) rig configuration. Normally you want to keep this option enabled. If you find that this option does not work for you,m then please send us a note, so we can improve the feature.
- with Reset Animation (new in Avastar-2.6): Avastar generates a 0-priority single frame animation of the current Restpose. This animation can later be used in SL together with an animation reset script (see below)
- with Reset Script(new in Avastar 2.6): Avastar generates an LSL Script ready for usage in SL. In SL you copy this script together with the Reset Animation (see above) into your model’s inventory. You need this especially when you are not exporting in white stickman mode (see Appearance sliders)
Bone Filters
Export with Joints: When you have edited the Armature to adjust the Rig to your special character (Alien, creature, pet…) then you normally want to keep your edited Armature when you export your Meshes.
Hint: You want this option disabled only when your rig is so complex that Avastar can not calculate the Neutral Rig for your situation. In that case please set the sliders to SL Neutral and never touch the sliders again.
Disabled: Export the Rig visually as it is. Note: You must make sure that the Appearance Sliders are reset to the SL Neutral Shape (White Stickman Icon). Otherwise Avastar rejects the exports.
Enabled: Calculate the neutral skeleton from the current rig settings (temporary set Sliders to Neutral SL Settings) but apply the current Slider settings as bind pose. Pleased refer to the Bind Pose document for further explanations.
Only Weighted Bones: Avastar can export all deform bones of the Rig. However in most cases it is enough to only export the deform Bones which are actually used (weighted to meshes)
Hint: You want to enable this option in most cases.
Enabled: Export only those bones which are actually used (have weights for meshes)
Only Deform Bones: Avastar has many control bones (mainly for IK-animation, targetless Animation and attachment points) Avastar can export all Bones of the rig, or only the Deform bones
Hint: You want to enable this option in most cases.
Enabled: Export only deform Bones
Include Parent Hierarchy: Ensures that all parent bones of exported bones are also exported, even if they have no weights defined.
Details: When you enable the above bone filters then it can happen that not all bones of a Bone chain are exported. This becomes a problem when one or more of the not exported bones have Joint edits defined. Those definitions would then get lost during export.
Hint: You want to enable this option in most cases.
Enabled: Take care that all parent bones of exported Bones are also exported.
Export Bone Roll: Export Bone Roll using the Blender Collada Scheme.
Hint: This is only useful when you want to later import back the Dae file to Blender.
Enabled: Export the Bone roll according to Blender’s Collada Scheme
Export Bone layers: Export Bone Layer Data using the Blender Collada Scheme.
Hint: This is only useful when you want to later import back the Dae file to Blender.
Enabled: Export the Bone Layer data according to Blender’s Collada Scheme
Export with Blender Profile: Use Blender Collada scheme for exporting Blender specific Information
Hint: This is only useful when you want to later import back the Dae file to Blender.
Enabled: Export Extended Options according to Blender’s Collada Scheme
Export with SL Rotation: When you export an Avastar Rig then it must be rotated according to the SL Standards (so that the character looks into the positive X direction).
Hint: You want to enable this option when you export to Second Life or similar worlds.
Enabled: Rotate the Rig by 90 degrees to make it compatible to the SL specifications
Accept Attachment Weights: SL does not allow weighting of attachment points. Hence we suppress the export of weights for attachment points by default.
Sanity Checks: Perform tests on the Mesh (tricount, texture face counts, etc…)
Hint: You want to enable this option in most cases.
Unsupported Options
Avastar also provides some advanced export options. However those options are not shown by default as they are only rarely used.
You enable these options in the Avastar Add-on Panel (where you initially enabled the Add-on after you installed it):
Limit Weight Count: In SL the number of weights per vertex is strictly limited to 4. We believe this number is enough for all weighting tasks. In cases where you think this limit is too low, we always found the real problem was due to bad mesh topology and bad rigging.
Setting this number affects the maximum number of weights which are exported by Avastar. We strongly recommend to keep this number set to 4.
Troubleshoot Collada Export Warnings/Errors
Messages from the Avastar Collada Exporter:
- M001 : Limited weightcount to 4 for nnn verts in Mesh sss
Your Mesh has vertices where the number of assigned Bone weightmaps exceeds the number of allowed weightmaps (4) SL supports up to 4 weightmaps per vertex. Avastar has fixed this for you by reducing the number of weights on affected vertices. Caution: This automatic fix may affect the visual shape in SL. - M002 : Found nnn zero weighted verts in sss
Your mesh contains vertices which have weightmaps assigned, but all weights sum up to a value of 0. Caution: This may result in unexpected behavior and distortions when later uploaded to SL. - M003 : Bone sss is not defined in SL. nnn weights not exported
Your mesh contains bones and related bone weightmaps which are not recognized by SL. The bones and weightmaps are ignored. - M004 : The Mesh sss uses nnn Bones while SL limit is nnn Bones per Mesh
Your Mesh has vertices where the number of assigned Bone weightmaps exceeds the number of allowed weightmaps (4) SL supports up to 4 weightmaps per vertex. - M005 : High Tricount nnn in material face [sss] of mesh sss
SL allows up to 21844 triangles per texture face. Your mesh contains texture faces with more triangles. the SL Importer will cut your mesh into pieces so that the maximum triangle count is obtained per texture face. - M006 : Image [sss] from material [sss]: not found on disk
The image is not available at the specified location on disk. This may happen when you got the blend file from someone else but the images have not been loaded into the blend file. - M007 : Image copy failed
The image could not be copied from the source to the destination. Typical issue: Missing write Permission or Disk full. - M008 : Armature [sss] not an Avastar Rig (can’t export mesh [sss])
The Mesh uses an Armature that was not recognized as an Avastar Rig. Avastar can only export rigged mesh that is rigged to Avastar Rigs.
MAV_BLOCK Parsing error
If you create small objects with disconnected sub-meshes, then you often get errors labelled as MAV_BLOCK Error when you try to upload your mesh to Second Life.
The image aside gives a nice example of a single object that is made of many smaller disconnected submeshes. While there is nothing wrong with this mesh, the SL Importer often has trouble to import the mesh.
The reason for this issue is hidden somewhere in the Second Life Upload process. We believe the reason for the issue is that the SL Importer deletes Submeshes when they become too small. Then suddenly a part of the Mesh gets removed and this can end in a situation where a complete texture face is no longer available in one of the LOD’s. Then the SL Importer runs into this issue.
A known Workaround
In all cases where small submeshes where involved, we found that adding your own (simple) physics mesh to your Object solves the problems:
- Create a simple mesh like a cube or a tetrahedron for example. The size of the mesh does not matter.
- Export this simple mesh as Collada file
- Import your Mesh as usual.
- But before uploading visit the physics tab of the SL importer
- There add Physics mesh from file
- select your simple object
Now the upload should work.
DAE Parsing Errors
Second Life users frequently report a Dae parsing error. We found a couple of situations where this error appears (see below). However, in general your first step is to look into the Second Life Viewer Logfile…
Find the Viewer Logfile
Typical causes for this issue
Special characters in Object names
Most dangerous characters are: & < ! > # $ ‘ “
Resolution:
Remove special characters in Object names and then export again
Special characters in File names
Most dangerous characters are: & < ! > # $ ( * ) [ ] { } ‘ “
Resolution:
Remove special characters in file names (renaming the .dae file should be enough)
Extremely dense Meshes
Please check if your mesh contains areas with very small triangles (edge length smaller than about 1 millimeter)
Resolution:
Try to avoid high resolution meshes. You are doing better when you put high density into textures and normal maps (Normal maps are now supported by Second Life)
Orphaned edges and vertices
If your mesh contains edges which do not belong to any face or disconnected vertices.
Resolution:
Remove these edges and vertices.
Hint: in Edit mode Select -> Non Manifold to find candidates. You may want to disable the “boundary” option in the operator panel.
Duplicate Vertices
If your mesh contains duplicate vertices this can cause issues. However sometimes duplicate verts are on purpose (for example when you use the split edge modifier in Blender 2.73 or older) so you need to test if this issue is caused by split edge or by accidental duplicates.
Resolution:
Remove the duplicate vertices.
Hint: in Edit mode ‘W’ -> Remove Doubles to delete the duplicates.
My mesh looks OK in SL but it does not fit.
This can happen when you use Appearance Sliders together with a Mesh that uses Collision Volume Weighting (Fitted mesh). In this case you must export your work in the Secondlife Restpose.
- Click on the white stickman icon to reset your pose to the SL Restpose (no worries, Avastar preserves your edited joints)
- Make sure that you export the mesh with the male gender disabled (yes! that is important)