Character File (.gcha)
The Character file lists the meshes of a Character and defines characters appearance when rendering. Those information are stored in a .gchafile (which is actually a xml). Here's how those information are stored in a .gchafile for the following example:
And the corresponding .gcha file:
<XMLSerialization>
<inspectableObject pointerID="1" typeName="AssetManager">
<id value="0"/>
<name value="SampleCharacter"/>
<skeletonRootName value="Reference"/>
<geometryGroup pointerID="2">
<name value="Geometry Group"/>
<assets>
<element index="0" pointerID="3">
<id value="0"/>
<assetManager pointerID="1"/>
<name value="sampleCharacter"/>
<filename value="C:/sampleCharacter.fbx"/>
<halfExtents x="0.65" y="1.65" z="0.65"/>
</element>
</assets>
</geometryGroup>
<assetGroups>
<element index="0" pointerID="4">
<name value="Body"/>
<assets>
<element index="0" pointerID="5">
<id value="0"/>
<assetManager pointerID="1"/>
<name value="MAN_MD_body"/>
<meshNames>
<element index="0" value="MAN_MD_body_head"/>
<element index="1" value="MAN_MD_body_arms_biceps"/>
</meshNames>
<excludedMeshAssets/>
</element>
</assets>
</element>
<element index="1" pointerID="6">
<name value="Tops"/>
<assets>
<element index="0" pointerID="7">
<id value="1"/>
<assetManager pointerID="1"/>
<name value="MAN_MD_torso_tshirt"/>
<meshNames>
<element index="0" value="MAN_MD_torso_tshirt"/>
</meshNames>
<excludedMeshAssets/>
</element>
<element index="1" pointerID="8">
<id value="2"/>
<assetManager pointerID="1"/>
<name value="MAN_MD_torso_sweatshirt"/>
<meshNames>
<element index="0" value="MAN_MD_torso_sweatshirt"/>
</meshNames>
<excludedMeshAssets/>
</element>
</assets>
</element>
<element index="2" pointerID="9">
<name value="Bottoms"/>
<assets>
<element index="0" pointerID="10">
<id value="3"/>
<assetManager pointerID="1"/>
<name value="MAN_MD_legs_pants_longFolds"/>
<meshNames>
<element index="0" value="MAN_MD_legs_pants_longFolds"/>
</meshNames>
<excludedMeshAssets/>
</element>
</assets>
</element>
<element index="3" pointerID="11">
<name value="Hair"/>
<assets>
<element index="0" pointerID="12">
<id value="4"/>
<assetManager pointerID="1"/>
<name value="MAN_MD_top_hair_std"/>
<meshNames>
<element index="0" value="MAN_MD_top_hair_std"/>
</meshNames>
<excludedMeshAssets/>
</element>
<element index="1" pointerID="13">
<id value="5"/>
<assetManager pointerID="1"/>
<name value="[empty]"/>
<meshNames/>
<excludedMeshAssets/>
</element>
</assets>
</element>
</assetGroups>
<voidAsset pointerID="13"/>
<meshesShaders>
<element>
<element index="0" value="MAN_MD_body_arms_biceps"/>
<element index="1">
<element index="0" pointerID="14">
<id value="0"/>
<name value="MAN_MD_body_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes>
<element index="0" pointerID="19">
<attributeName value="body_textureId"/>
<attributeType value="0"/>
<minValue value="0"/>
<maxValue value="2"/>
<fileName value=""/>
<useRandomValue value="1"/>
<ppAttr value="body_textureId"/>
</element>
</shaderAttributes>
</element>
</element>
</element>
<element>
<element index="0" value="MAN_MD_body_head"/>
<element index="1">
<element index="0" pointerID="14"/>
</element>
</element>
<element>
<element index="0" value="MAN_MD_legs_pants_longFolds"/>
<element index="1">
<element index="0" pointerID="15">
<id value="3"/>
<name value="MAN_MD_legs_pants_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes/>
</element>
</element>
</element>
<element>
<element index="0" value="MAN_MD_top_hair_std"/>
<element index="1">
<element index="0" pointerID="16">
<id value="4"/>
<name value="MAN_MD_top_hair_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes/>
</element>
</element>
</element>
<element>
<element index="0" value="MAN_MD_torso_sweatshirt"/>
<element index="1">
<element index="0" pointerID="17">
<id value="2"/>
<name value="MAN_MD_torso_sweatshirt_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes/>
</element>
</element>
</element>
<element>
<element index="0" value="MAN_MD_torso_tshirt"/>
<element index="1">
<element index="0" pointerID="18">
<id value="1"/>
<name value="MAN_MD_torso_tshirt_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes/>
</element>
</element>
</element>
</meshesShaders>
<blendShapeGroups/>
</inspectableObject>
<inspectableObject pointerID="20" typeName="RenderingType">
<id value="0"/>
<name value="SampleCharacterRenderingType"/>
<assetWeights>
<element index="0">
<element index="0" value="Body"/>
<element index="1">
<element index="0" value="100"/>
</element>
</element>
<element index="1">
<element index="0" value="Tops"/>
<element index="1">
<element index="0" value="50"/>
<element index="1" value="67"/>
</element>
</element>
<element index="2">
<element index="0" value="Bottoms"/>
<element index="1">
<element index="0" value="100"/>
</element>
</element>
</assetWeights>
<assetManager pointerID="1"/>
<parent pointerID="0"/>
<children/>
</inspectableObject>
</XMLSerialization>
PointerID
As you can see in the example xml above, each element (Character, Assets Group, Mesh Asset...) has an UNIQUE pointerID attribute and value. This pointerID attribute is used to instanciate similar objects or define parenting properties. In the example, both Meshes MAN_MD_body_arms_biceps and MAN_MD_body_head share the same shader MAN_MD_body_blinn. In the xml, this share is defined as follow:
<element>
<element index="0" value="MAN_MD_body_arms_biceps"/>
<element index="1">
<element index="0" pointerID="14">
<id value="0"/>
<name value="MAN_MD_body_blinn"/>
<category value="drawdb/shader/surface/blinn:shader/surface"/>
<shaderAttributes/>
</element>
</element>
</element>
<element>
<element index="0" value="MAN_MD_body_head"/>
<element index="1">
<element index="0" pointerID="14"/> // same pointer id than above
</element>
</element>
Character
A Character in the Assets Manager is a description of a pool of assets (meshes and shaders) available when rendering an Entity. It's the main container of the Assets Manager and is defined the following way:
<inspectableObject pointerID="1" typeName="AssetManager">
<id value="0"/> // Character id (must be unique)
<name value="SampleCharacter"/> // name of the Character
<skeletonRootName value="Reference"> // name of the root bone of the Character
<geometryGroup pointerID="2">
// Geometry Group information (see below)
</geometryGroup>
<assetGroups>
// Assets Group information (see below)
</assetGroups>
<meshesShaders>
// Shaders information (see below)
</meshesShaders>
<blendShapeGroups>
// Blend Shape information (see below)
</blendShapeGroups
</inspectableObject>
Geometry Group
A Geometry Group represents a set of base Geometry files (.fbx or .gcg files).
<geometryGroup pointerID="2">
<name value="Geometry Group"/>
<assets>
// for each line in the Geometry Group, add a Geometry File
<element index="0" pointerID="3">
<id value="0"/> // Geometry File id
<assetManager pointerID="1"/> // link to the parent Character
<name value="sampleCharacter"/> // name of the Geometry File
<filename value="C:/sampleCharacter.fbx"/> // file path of the Geometry File
<halfExtents x="0.65" y="1.65" z="0.65"/> // bounding box of the Geometry File
</element>
</assets>
... // other Geometry File of this Geometry Group
</geometryGroup>
Assets Group
An Assets Group represents category of assets for the Character: tops, pants, hair styles... They are used to structure the distribution of Mesh Assets.
<assetGroups>
<element index="0" pointerID="4"> // Assets Group id (must be unique) and pointerID
<name value="Body"/> // Assets Group name
<assets>
// Mesh Assets of this Assets Group (see below)
</assets>
</element>
... // other Asset Groups of this Character
<assetGroups>
Mesh Asset
A Mesh Asset represents one or more meshes, contained in an Assets Group, that are treated as a whole when computing assets repartition (e.g a T-Shirt Mesh or a Cap Mesh + a Hair Style Mesh)
<meshNames> // The Assets Group "Body" (see above) is composed of the meshes listed below
<element index="0" value="MAN_MD_body_head">
<element index="1" value="MAN_MD_body_arms_biceps">
</meshnames>
Shaders
A Shader in the Character Maker corresponds to the name of the shader applied to the rendered geometry. Shaders define the characters appearance at render time. Each Mesh can have one or several shaders attached to it. Golaem Crowd can handle two types of shaders:
<meshesShaders>
// for each mesh listed in the Mesh Asset, associate a shader
<element>
<element index="0" value="MAN_MD_body_arms_biceps"/> // name of the Mesh Asset
<element index="1">
<element index="0" pointerID="14">
<id value="0"/> //Shader id (must be unique)
<name value="MAN_MD_body_blinn"/> // Shader name
<category value="surface"/> // Shader type (can be surface, contour or displacement)
<shaderAttributes>
// Attributes of this shader (see below)
</shaderAttributes>
</element>
</element>
</element>
... // other shader associations of this Character
</meshesShaders>
Shader Attributes
Shaders Attributes are used to pass random or ppAttributes controlled values to the shading graph. The generated values can be retrieved in the shading graph by using user data shaders
<shaderAttributes>
// for each Attribute of this Shader, add it
<element index="0" pointerID="19">
<attributeName value="body_textureId"/> // Attribute name
<attributeType value="0"/> // Attribute type (0: integer, 1: float)
<minValue value="0"/> // Attribute min value (only if useRandomValue is true)
<maxValue value="2"/> // Attribute max value (only if useRandomValue is true)
<useRandomValue value="1"/> // Defines if the value of the Attribute is randomly picked between min and max or from a ppAttribute
<ppAttr value="body_textureId"/> // Name of the ppAttribute from which the attribute value will be read (only if useRandomValue is false)
</element>
... // other Shader Attributes
</shaderAttributes>
Rendering Types
Rendering Types determine how the Mesh Assets defined in the Assets Panel are distributed to the Entities, thus defining the appearance of characters and creating diversity.
<inspectableObject pointerID="20" typeName="RenderingType">
<id value="0"/> // Rendering Type id (must be unique)
<name value="SampleCharacterType"/> // Name of the Rendering Type
<assetWeights>
... // Assets Weights of this Rendering Type (see below)
</assetWeights>
<assetManager pointerID="1"/> // pointerID of the linked Character (see above)
<parent pointerID="0"/> // pointerID of the parent Rendering Type (only if it's a Child Rendering Type)
<children/>
</inspectableObject>
... // other Rendering Types
Asset Groups Weights
After the Rendering Type creation, Assets Groups (defined in the Assets Panel) from its associated Character can be added to it. Note that a Rendering Type can contain all Assets Groups from the source Character or only some of them (in this case the omitted Asset Groups will not be rendered).
// The Rendering Type "SampleCharacterType" (see above) contains the asset weights below
<element index="1">
<element index="0" value="Tops"/> // Name of the Assets Group (Assets Group are defined in the Character, see above) for which the weights are specified
<element index="1">
<element index="0" value="50"/> // Relative weight of the 1st element of the Assets Group "Tops"
<element index="1" value="67"/> // Relative weight of the 2nd element of the Assets Group "Tops"
</element>
</element>
... // weights for other Asset Groups