Mesh

Uses XML Tag mm:mesh and contains…

Tag Type Description name string A name is required. [center] float[3] Local center position. If not supplied, it will be calculated. [minmax] float[6] Local min/max boundaries. If not supplied, it will be calculated. [cullradius] float Radius for culling purposes. If not supplied, it will be calculated. [position] float[3] World position. If not supplied, it will be located at the world’s origin. [rotation] float[3] World rotation. If not supplied, it will be aligned to the world’s axes. [scale] float[3] Local scale. Default is [1,1,1], if not supplied. [surfaces] mm:surface[?] List of attached surfaces. If not supplied, mesh will be invisible. [materials] mm:material[?] List of attached materials. Material count must be equal to or greater than the surface count.

In the example below, the material refers to an existing source and modifies its default textures.

Example:

<mm:mesh>
   <name>MyMesh</name>
   <minmax>-30.00,-30.02,0.00,30.00,30.00,7.14</minmax>
   <surfaces>
      <mm:surface>[...]</mm:surface>
   </surfaces>
   <materials>
      <mm:material src_proto=“Mana::Material/ExistingMaterial”>
         <textures>
            <mm:texture uri=“Mana::Textures:SubTexA.tga”/>
            <mm:texture uri=“Mana::Textures:SubTexB.tga”/>
         </textures>
      </mm:material>
   </materials>
</mm:mesh>

Model

Uses XML Tag mm:model and contains…

Tag Type Description [src_proto] attribute Specify a path to a prototype. If not supplied, model is unique. [class] string Class extension. This is required if no source prototype was supplied name string A name is required. [center] float[3] Local center position. If not supplied, it will be calculated based on attached meshes. [minmax] float[6] Local min/max boundaries. If not supplied, it will be calculated based on attached meshes. [cullradius] float Radius for culling purposes. If not supplied, it will be calculated based on attached meshes. [castshadows] integer Shadow casting property. If not supplied, model will not cast shadows. [position] float[3] World position. If not supplied, it will be located at the world’s origin. [rotation] float[3] World rotation. If not supplied, it will be aligned to the world’s axes. [scale] float[3] Local scale. Default is [1,1,1], if not supplied. [meshes] mm:mesh[?] List of attached meshes. If not supplied, model will be invisible.

Example:

<mm:model>
   <class>MyModel</class>
   <name>MyModel</name>
   <center>0.00,-0.01,3.57</center>
   <minmax>-30.00,-30.02,0.00,30.00,30.00,7.14</minmax>
   <cullradius>46.84</cullradius>
   <castshadows>1</castshadows>
   <position>0.00,0.00,0.00</position>
   <rotation>0.00,0.00,0.00</rotation>
   <scale>1.00,1.00,1.00</scale>
   <meshes>
      <mm:mesh>[...]</mm:mesh>
      <mm:mesh>[...]</mm:mesh>
   </meshes>
</mm:model>

Surface

Uses XML Tag mm:surface and contains…

Tag Type Description name string A name is required. faces base64 | integer[3][?] Formatted triangle data. vertexdata mm:vertexdatafull[1+] List of attached vertex data. Must have at least one.

Example:

<mm:surface>
   <name>surf1</name>
   <faces encode=“b64iv3″>AAAAAAEA[...]</faces>
   <vertexdata>
      <mm:vertexdatafull>[...]</mm:vertexdatafull>
      <mm:vertexdatafull>[...]</mm:vertexdatafull>
   </vertexdata>
</mm:surface>

Vertex data full uses XML Tag mm:vertexdatafull and contains…

Tag Type Description nverts integer Vertex count is required. verts base64 | float[3][?] Formatted vertex coordinates. norms base64 | float[3][?] Formatted vertex normals. tangs base64 | float[3][?] Formatted vertex tangents. uv1s base64 | float[3][?] Formatted vertex map channel 1 coordinates. uv2s base64 | float[3][?] Formatted vertex map channel 2 coordinates. colors base64 | float[4][?] Formatted vertex colors.

Example:

<mm:vertexdatafull>
   <nverts>4</nverts>
   <verts encode=“b64f”>AADwQQAA[...]</verts>
   <norms encode=“b64f”>AAAAAAAA[...]</norms>
   <tangs encode=“b64f”>/OeqNAAA[...]</tangs>
   <uv1s encode=“b64f”>AINEO3Ln[...]</uv1s>
   <uv2s encode=“b64f”>AAIDOkLf[...]</uv2s>
   <colors encode=“b64f”>gYAAP4GA[...]</colors>
</mm:vertexdatafull>

Material

Uses XML Tag mm:material and contains…

Tag Type Description [class] string Class extension. This is required if no source prototype was supplied name string A name is required. textures mm:texture[?] List of textures. brushes mm:brush[1+] List of brushes. Must have at least one. technique mm:technique[1+] List of techniques. Must have at least one.

Example:

<mm:material>
   <class>MyMaterial</class>
   <name>MyMaterial</name>
   <textures>
      <mm:texture uri=“*/Textures:grid.tga”/>
      <mm:texture uri=“*/Textures:flat.tga”/>
   </textures>
   <brushes>
      <mm:brush>[...]</mm:brush>
   </brushes>
   <techniques>
      <mm:technique>[...]</mm:technique>
      <mm:technique>[...]</mm:technique>
   </techniques>
</mm:material>

Brush uses XML Tag mm:brush and contains…

Tag Type Description [name] string A name is required only when the brush is not parented. [specular] float Specular highlight value. If not supplied, the default is 0.5. [shininess] float Shininess value. If not supplied, the default is 10.0. [stages] mm:texturestage[?] List of texture stages (described below). Must match the number of textures in brush’s parent material. [shader] mm:shader Companion shader for this brush. Defaults to simple shader or fixed function pipeline.

Example:

<mm:brush>
   <specular>0.75</specular>
   <shininess>15.0</shininess>
   <stages>
      <mm:texturestage>[...]</mm:texturestage>
      <mm:texturestage>[...]</mm:texturestage>
   </stages>
   <mm:shader>
      <name>MyShader</name>
      <nshadows>2</nshadows>
      <vshaders>
         <mm:vertexshader uri=“*/Shaders:MyVS.vert”/>
      </vshaders>
      <fshaders>
         <mm:fragmentshader uri=“*/Shaders:Common.frag”/>
         <mm:fragmentshader uri=“*/Shaders:MyFS.frag”/>
      </fshaders>
   </mm:shader>
</mm:brush>

TextureStage uses XML Tag mm:texturestage and contains…

Tag Type Description texid integer Id that matches this stage to a texture in the parent material. [flags] integer Flags describing the texture application. [coords] integer Mapping coordinate set to use in this stage. [blend] integer Blend value determines how this texture blends with the previous layer (if any). [wrapu] integer Horizontal wrapping method (in U). [wrapv] integer Vertical wrapping method (in V). [matrixfn] integer Matrix function index. Used for animation, lighting, etc.

Example:

<mm:texturestage>
   <texid>0</texid>
   <flags>9</flags>
   <coords>0</coords>
   <blend>2</blend>
   <wrapu>0</wrapu>
   <wrapv>0</wrapv>
   <matrixfn>0</matrixfn>
</mm:texturestage>

Technique uses XML Tag mm:technique and contains…

Tag Type Description [name] integer A name is optional. [brushes] integer[?] Brush index used in each pass. [blends] integer[?] Blend function used in each pass. [options] integer[?] Additional options used in each pass.

Example:

<mm:technique>
   <name>Opaque</name>
   <brushes>0</brushes>
   <blends>0</blends>
   <options>0</options>
</mm:technique>