Mesh/Avatar Shape XML Format

From Second Life Wiki
< Mesh
Revision as of 11:58, 23 October 2012 by Darien Caldwell (talk | contribs) (Documenting the Avatar shape XML format.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

History

The Shape XML format has been ingrained in the viewer since the early days, long before mesh existed. However, with the addition of rigged mesh and customized clothing, the file has become invaluable to creators. Sometimes called an "archetype file" due to it's default name "new_archetype.xml".

Header

The file is standard XML, with 3 parameters:

  • <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
    • the 'version' parameter sets the version of the XML markup. (should always be 1.0)
    • the 'encoding' parameter sets the character encoding for the file. (should always be US-ASCII)
    • the 'standaline' parameter informs that the file is self-containted, and not dependent on any external files. (should always be yes)
 (note that some viewers set standalone="true".  This is technically incorrect via the XML standard.)

Root Node

The root node is of type 'linden_genepool' witih 1 parameter:

  • <linden_genepool version="1.0">
    • the 'version' parameter sets the version of the data contained in the node. Currently LL's data is version 1.0. Future revisions may increment this version, so any implementation should check this version number before using the data.

Data Body

The Root node contains one node of type 'archetype' with one parameter.

  • <archetype name="???">
    • The 'name' parameter is a information parameter, and can contain anything, or nothing. Most commonly populated with 3 question marks.

The Data

The data inside is a list of parameters and textures associated with the Avatar's appearance. These can be broken up into 4 categories:

  • Shape
  • Skin
  • Hair
  • Eyes