Difference between revisions of "MSH"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) m (trang) |
BryanDerksen (Talk | contribs) (a bit of information that was requested) |
||
Line 71: | Line 71: | ||
</start> | </start> | ||
</grammar> | </grammar> | ||
+ | </pre> | ||
+ | |||
+ | == Constants == | ||
+ | |||
+ | Type enum: | ||
+ | |||
+ | <pre> | ||
+ | /// 1 float | ||
+ | DECLTYPE_FLOAT1 = 0, | ||
+ | /// 2 floats | ||
+ | DECLTYPE_FLOAT2 = 1, | ||
+ | /// 3 floats | ||
+ | DECLTYPE_FLOAT3 = 2, | ||
+ | /// 4 floats | ||
+ | DECLTYPE_FLOAT4 = 3, | ||
+ | /// 4-byte color | ||
+ | DECLTYPE_COLOR = 4, | ||
+ | /// 4 unsigned bytes | ||
+ | DECLTYPE_UBYTE4 = 5, | ||
+ | /// 2 shorts | ||
+ | DECLTYPE_SHORT2 = 6, | ||
+ | /// 4 shorts | ||
+ | DECLTYPE_SHORT4 = 7, | ||
+ | /// 4 normalized bytes | ||
+ | DECLTYPE_UBYTE4N = 8, | ||
+ | /// 2 normalized shorts | ||
+ | DECLTYPE_SHORT2N = 9, | ||
+ | /// 4 normalized shorts | ||
+ | DECLTYPE_SHORT4N = 10, | ||
+ | /// 2 normalized unsigned shorts | ||
+ | DECLTYPE_USHORT2N = 11, | ||
+ | /// 4 normalized unsigned shorts | ||
+ | DECLTYPE_USHORT4N = 12, | ||
+ | /// 3d unsigned 10/10/10 format | ||
+ | DECLTYPE_UDEC3 = 13, | ||
+ | /// 3d unsigned 10/10/10 normalized | ||
+ | DECLTYPE_DEC3N = 14, | ||
+ | /// 2 16-bit floats | ||
+ | DECLTYPE_FLOAT16_2 = 15, | ||
+ | /// 4 16-bit unsigned floats | ||
+ | DECLTYPE_FLOAT16_4 = 16, | ||
+ | DECLTYPE_UNUSED = 0xffffffff | ||
+ | </pre> | ||
+ | |||
+ | Usage enum: | ||
+ | <pre> | ||
+ | /// Position | ||
+ | DECLUSAGE_POSITION = 0, | ||
+ | /// Blend weights | ||
+ | DECLUSAGE_BLENDWEIGHT = 1, | ||
+ | /// Blend indices | ||
+ | DECLUSAGE_BLENDINDICES = 2, | ||
+ | /// Normal | ||
+ | DECLUSAGE_NORMAL = 3, | ||
+ | /// Point Size | ||
+ | DECLUSAGE_PSIZE = 4, | ||
+ | /// Texture coordinates | ||
+ | DECLUSAGE_TEXCOORD = 5, | ||
+ | /// Tangent vector | ||
+ | DECLUSAGE_TANGENT = 6, | ||
+ | /// binormal vector | ||
+ | DECLUSAGE_BINORMAL = 7, | ||
+ | /// tessellation factor | ||
+ | DECLUSAGE_TESSFACTOR = 8, | ||
+ | /// PositionT | ||
+ | DECLUSAGE_POSITIONT = 9, | ||
+ | /// color channel | ||
+ | DECLUSAGE_COLOR = 10, | ||
+ | /// fog value | ||
+ | DECLUSAGE_FOG = 11, | ||
+ | /// depth | ||
+ | DECLUSAGE_DEPTH = 12, | ||
+ | /// sample | ||
+ | DECLUSAGE_SAMPLE = 13, | ||
+ | // error/other/unset | ||
+ | DECLUSAGE_UNUSED = 0xffffffff | ||
</pre> | </pre> | ||
[[Category:File types]] | [[Category:File types]] |
Revision as of 22:45, 9 October 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>
Constants
Type enum:
/// 1 float DECLTYPE_FLOAT1 = 0, /// 2 floats DECLTYPE_FLOAT2 = 1, /// 3 floats DECLTYPE_FLOAT3 = 2, /// 4 floats DECLTYPE_FLOAT4 = 3, /// 4-byte color DECLTYPE_COLOR = 4, /// 4 unsigned bytes DECLTYPE_UBYTE4 = 5, /// 2 shorts DECLTYPE_SHORT2 = 6, /// 4 shorts DECLTYPE_SHORT4 = 7, /// 4 normalized bytes DECLTYPE_UBYTE4N = 8, /// 2 normalized shorts DECLTYPE_SHORT2N = 9, /// 4 normalized shorts DECLTYPE_SHORT4N = 10, /// 2 normalized unsigned shorts DECLTYPE_USHORT2N = 11, /// 4 normalized unsigned shorts DECLTYPE_USHORT4N = 12, /// 3d unsigned 10/10/10 format DECLTYPE_UDEC3 = 13, /// 3d unsigned 10/10/10 normalized DECLTYPE_DEC3N = 14, /// 2 16-bit floats DECLTYPE_FLOAT16_2 = 15, /// 4 16-bit unsigned floats DECLTYPE_FLOAT16_4 = 16, DECLTYPE_UNUSED = 0xffffffff
Usage enum:
/// Position DECLUSAGE_POSITION = 0, /// Blend weights DECLUSAGE_BLENDWEIGHT = 1, /// Blend indices DECLUSAGE_BLENDINDICES = 2, /// Normal DECLUSAGE_NORMAL = 3, /// Point Size DECLUSAGE_PSIZE = 4, /// Texture coordinates DECLUSAGE_TEXCOORD = 5, /// Tangent vector DECLUSAGE_TANGENT = 6, /// binormal vector DECLUSAGE_BINORMAL = 7, /// tessellation factor DECLUSAGE_TESSFACTOR = 8, /// PositionT DECLUSAGE_POSITIONT = 9, /// color channel DECLUSAGE_COLOR = 10, /// fog value DECLUSAGE_FOG = 11, /// depth DECLUSAGE_DEPTH = 12, /// sample DECLUSAGE_SAMPLE = 13, // error/other/unset DECLUSAGE_UNUSED = 0xffffffff