Documentation‎ > ‎User Guide‎ > ‎

Creating 3D Avatars (Advanced)

Open Cobalt supports Ogre xml avatar files that contain motion data. Avatar information is stored in Cobalt/Content/Avatar. Users can design avatars in 3rd party software and import that content into Open Cobalt (described below). To assign yourself a new avatar, simply put the xml avatar files in the avatar directory, launch Open Cobalt, and then select a new avatar from the Cobalt/change Avatar menu option. For other users of the Open Cobalt alpha to see your avatar, they will need to also have started from the same Cobalt image file with the new or modified avatar file in their avatar directory.

Creating 3D Avatars with Motion


You will need a 3D authoring application such as Blender, Maya, or 3ds Max to create your custom avatar.

Workflow for Creating Avatars

  1. Open your 3D authoring application.
  2. Create a new mesh or import an existing mesh.
  3. Modify it in Blender, Maya, or 3DS Max. Note that joining of mesh to skeleton happens in Blender, Maya, or 3DS Max.
  4. Import skeleton or create one from scratch (or import BVH into your 3D application from Poser BVH export). Note that the BVH file contains relative joint positions and raw data representing rotations.
  5. Attach skeleton to mesh in Blender, Maya, or 3DS Max (this step is hard to do right).
  6. Use Orge exporter (for Blender, Maya, or 3DS Max). Note that at this point you should have a set of binaries (Ogre exporter animation data is in files and should end with the following extensions: .mesh, .skeleton, .material, .jpg or .gif)
  7. You will now need to convert all of the .skeleton and .mesh files to their XML equivalent. Ogre provides a command line tool for doing this here: http://www.ogre3d.org/index.php?Itemid=133
  8. Put avatar xml file in Cobalt/Content/Avatar directory.

Avatar Descriptions for Motion Avatars


There is an avatar description file format for use with Ogre based motion avatars. It is used for the same kinds of situations you would want to use an Avatar Description for billboard avatars, when the default parameters produce wrong results. Of course with a mesh, there are more things that can go wrong, and the extra parameters are concerned with scaling, orientation and positioning. Also, the Ogre meshes do not scale very well at present (it can cause problems with the animations) so it is best if the scaling is done in the content creation process.


^(TAvatarOgreRepresentation new) 
    source: 'name.mesh.xml' ; 
    scale: 1.0 ; "do not change"
    translation: ( 0.0 @ 0.0 @ 0.0) ; 
    pitchYawRoll: (0.0 @ 0.0 @ 0.0) ; 
    eyeHeight: 1.63 ;
    yourself


A slightly easier way

There is an RTF file attached to this page (below) that sketches out the process of using Evolver.com, Animeeple and Ultimate Unwrap 3D Pro for generating mesh avatars and animating them. 

Technical notes for content creators

The newest of the supported avatar formats for Open Cobalt is Ogre mesh and skeleton data. In order to keep from having to rewrite the importer every time there is a new Ogre binary file version, we use the .mesh.xml, .skeleton.xml and .material formats for the import. The import generates a TAnimatedMesh which is a subtype of TMesh and has similar limitations to TMesh. The code base is centered around the SkeletalAnimation package. 

There are currently a lot of limitations to the Ogre importing and TAnimatedMesh, we hope to alleviate these limitations in later revisions. 

  • Only 1 mesh in the .mesh is supported, no sub-meshes allowed. 
    • As of 2010-02-19 the importer will map sub-meshes into a single mesh. 
    • This may present some visual issues, but is better than crashing. 
  • Animations currently need to be internal to the .skeleton.xml file. 
  • All faces must be triangles(for hit testing?). 
  • The animator has code to handle both skeletal and vertex animations. 
  • Animations can either be run as #action (one-shot) or #cycle (keep running until explicitly told to stop). Code assumes that, if not explicitly overridden, skeletal animations are #cycle and vertex animations are #action. 
  • Multiple animations can be run at a time, #action animations override #cycle animations. Unclear how the animation blending works. 
  • Currently only 7 animations are standard, it won't complain about others but it won't use them either: 
    • walk - skeletal walking animation 
    • StandIdle - skeletal standing idle animation. 
    • type - vertex animation to indicate the user is text chatting. Run as Cycle 
    • speak - vertex animation to indicate voice chat. Run as #cycle. 
    • sit - skeletal sitting animation 
    • sidestep - skeletal animation 
    • turn - skeletal animation 
      • Sidestep and turn should probably be divided into a left and right as there are no facilities to mirror image an animation.
    • We are very open to changing this list. 
  • There appears to be code to try to turn the avatars head to look at the pointer location but it appears to be not working properly if the camera is not behind the avatar. Some avatars also seem to have head bones positioned so that it doesn't work well. 
  • Though Ogre has support for multiple root bones in the skeleton, we do not at this time. However, we do attempt to patch up the skeleton for the cases we have run into by trying to determine a primary root bone (it has children and the others don't) then adding the other root bones as children of the primary root bone. 
At present we have no standard rigging, however the basic animator is flexible enough to handle a variable number of bones up to a configurable limit. Input on the benefits and limitations of the various rigging options is sought. 

There is some fixed shader support (Phong shading), but currently it is turned off due to compatibility issues. Vertex buffers can used so that it will only work on platforms with OpenGL 1.5 support, so by default we are not using them at this time.


ċ
EvolverAvatarArtToolchain20110222.rtf
(16k)
John Dougan,
Feb 22, 2011, 11:41 AM
Comments