Difference between revisions of "MSH"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(add schema for msh.xml)
m (trang)
Line 10: Line 10:
 
== msh.xml schema in RELAX NG 1.0 format ==
 
== msh.xml schema in RELAX NG 1.0 format ==
  
See [http://www.oasis-open.org/committees/relax-ng/spec.html] for information on the RELAX NG 1.0 XML schema format.
+
See [http://www.oasis-open.org/committees/relax-ng/spec.html] for information on the RELAX NG 1.0 XML schema format. For a free converter/verifier, see [http://code.google.com/p/jing-trang/].
  
 
<pre>
 
<pre>

Revision as of 22:05, 21 September 2009

MSH (mesh) files define a 3D mesh, to be referenced by MMH files when creating models in the game.

MSH files are defined using XML source files with the extension .msh.xml. These files are run through the GraphicsProcessorMSH.exe program (found in the Dragon Age\Toolset\export_processors directory) to produce binary files that can be used by the game directly.

GraphicsProcessorMSH [-outdir <out-dir>] [-platform <x360,pc,ps3>] [options] [-indir<input-directory> / <input-file>]

Other options include:

-mmdtogff[Undocumented]

msh.xml schema in RELAX NG 1.0 format

See [1] for information on the RELAX NG 1.0 XML schema format. For a free converter/verifier, see [2].

<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <element name="ModelMeshData">
      <attribute name="Name">
        <data type="NCName"/>
      </attribute>
      <attribute name="Version">
        <data type="integer"/>
      </attribute>
      <zeroOrMore>
        <element name="MeshGroup">
          <attribute name="Name">
            <data type="NCName"/>
          </attribute>
          <optional>
            <attribute name="Optimize">
              <data type="NCName"/> <!-- "all", "none", or "indices" -->
            </attribute>
          </optional>
          <optional>
            <attribute name="optimize"> <!-- Appears to be the same as Optimize, apparently both capitalizations are allowed-->
              <data type="NCName"/>
            </attribute>
          </optional>
          <oneOrMore>
            <element name="Data">
              <optional>
                <attribute name="ElementCount">
                  <data type="integer"/> <!-- If semantic is not "indices", this count gives the number of tuples in the CDATA. -->
                </attribute>
              </optional>
              <optional>
                <attribute name="IndexCount">
                  <data type="integer"/> <!-- If semantic is "indices", this count gives the number of integers in the data's CDATA. -->
                </attribute>
              </optional>
              <optional>
                <attribute name="IndexType">
                  <data type="NCName"/> <!-- Every example of this has the value "Index32", without exception. -->
                </attribute>
              </optional>
              <attribute name="Semantic">
                <data type="NCName"/> <!-- "POSITION", "Indices", "TEXCOORD", "TANGENT", "BINORMAL", "NORMAL", "BLENDWEIGHT", "BLENDINDICES" -->
              </attribute>
              <optional>
                <attribute name="Type">
                  <data type="NCName"/> <!-- indicates how many elements and of what type are in the tuples in the CDATA. Values are "Float4" (four floating point numbers), "Float2" (two floating point numbers), "Short4" (four integers) -->
                </attribute>
              </optional>
              <text/> <!-- contains CDATA with tuples of numbers. For example, a Float2 type MSH had this: <![CDATA[0.195959 0.999994 0.195959 0.266686 0 0.266683 0 1. 0.999999 0.999994 1. 0.166668 ]]> -->
            </element>
          </oneOrMore>
        </element>
      </zeroOrMore>
    </element>
  </start>
</grammar>