Morph Targets
Home Up


Morph Targets

Morph targets appear in a mesh section of a XMF file in between the regular vertex section and the faces.

The following extract is taken from the MORPH section of a sample XMF file that I was given:

Start of a morph section. 

    <MORPH NAME="NoisyTop.Average" NUMBLENDVERTS="473" MORPHID="0">

NUMBLENDVERTS: Equivalent to NUMVERTS, however in the sample some vertices are skipped, so it appears that the morph need not include every vertex.

Morph names are important and follow a specific naming convention. It is not clear whether MORPHID serves a purpose or not.

Start of a morph vertex.

            <BLENDVERTEX VERTEXID="0" POSDIFF="9.61989">

VERTEXID is the ID of the corresponding vertex in the original mesh.

POSDIFF might be the distance between the morphed vertex and the original, however this is pure speculation.

Position, Normal and Texture coordinates

                <POSITION>-60.5201 -23.7794 740.139</POSITION>
                <NORMAL>0.154988 0.851539 0.500859</NORMAL>
                <TEXCOORD>0.229117 0.406772</TEXCOORD>

There is speculation that TEXCOORD may be ignored as an attempt to animate a texture using a morph is reported to have failed.

End of morph vertex


Another sample vertex and end

            <BLENDVERTEX VERTEXID="1" POSDIFF="11.3993">
                <POSITION>-59.9089 -3.08007 709.314</POSITION>
                <NORMAL>-0.948781 0.315742 -0.0110258</NORMAL>
                <TEXCOORD>0.225173 0.427436</TEXCOORD>

Home Up