1 <?xml version="1.0" encoding="UTF-8" ?>
5 motion-data(*.vmd) on XML
8 License : The MIT License
9 Copyright(c) 2011 MikuToga Partners
13 <!DOCTYPE xsd:schema [
14 <!ENTITY schemaVer "110820" >
15 <!ENTITY schemaNS "http://mikutoga.sourceforge.jp/xml/ns/vmdxml/110820" >
20 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
22 targetNamespace="&schemaNS;"
23 xmlns:tns ="&schemaNS;"
25 elementFormDefault="qualified"
31 MikuMikuDance motion-data(*.vmd) on XML.
32 License : The MIT License
33 Copyright(c) 2011 MikuToga Partners
38 <!-- ROOT element for motion -->
39 <xsd:element name="vmdMotion" >
50 minOccurs="0" maxOccurs="unbounded" />
52 <xsd:sequence> <!-- model motion -->
53 <xsd:element ref="tns:modelName" />
54 <xsd:element ref="tns:boneMotionSequence" />
55 <xsd:element ref="tns:morphSequence" />
57 <xsd:sequence> <!-- stage act -->
58 <xsd:element ref="tns:cameraSequence" />
59 <xsd:element ref="tns:luminousSequence" />
60 <xsd:element ref="tns:shadowSequence" />
68 fixed="&schemaVer;" />
74 <xsd:simpleType name="FrameNo" >
81 <xsd:restriction base="xsd:int" >
83 <xsd:minInclusive value="0" />
90 <xsd:simpleType name="MorphFlex" >
93 morph flexible value. [0.0-1.0]
97 <xsd:restriction base="xsd:float" >
98 <xsd:minInclusive value="-0.0" />
100 <xsd:maxInclusive value="1.0" />
107 <xsd:simpleType name="ProjectionAngle" >
110 screen-projection angle(degree).
114 <xsd:restriction base="xsd:int" >
116 <xsd:minInclusive value="-0" />
117 <xsd:maxInclusive value="+180" />
124 <xsd:simpleType name="ColorComponent" >
127 color component value.
131 <xsd:restriction base="xsd:float" >
133 <xsd:minInclusive value="-0.0" />
134 <xsd:maxInclusive value="1.0" />
141 <xsd:simpleType name="DirVecComponent" >
144 direction vector component value.
148 <xsd:restriction base="xsd:float" >
150 <xsd:minInclusive value="-1.0" />
151 <xsd:maxInclusive value="+1.0" />
158 <xsd:simpleType name="ShadowType" >
162 + NONE : no self-shadow
163 + MODE_1 : reduce shadow-quality suddenly at range
164 + MODE_2 : reduce shadow-quality gradually with range
168 <xsd:restriction base="xsd:string" >
169 <xsd:enumeration value="NONE" />
170 <xsd:enumeration value="MODE_1" />
171 <xsd:enumeration value="MODE_2" />
177 <xsd:simpleType name="ShadowRawParam" >
180 shadow range raw value.
182 UI_VALUE = EFFECTIVE_RANGE * 100 ???
183 rawParam = 0.1 - (UI_VALUE / 1.0E+5)
185 UI_VALUE:0 => rawParam:0.1
186 UI_VALUE:8875 => rawParam:0.01125
187 UI_VALUE:9999 => rawParam:1.0E-5
191 <xsd:restriction base="xsd:float" >
193 <xsd:minInclusive value="-0.0" />
194 <xsd:maxInclusive value="0.1" />
201 <xsd:simpleType name="BezPt" >
204 Bezier points coordinates value. [XY:0-127]
208 <xsd:restriction base="xsd:byte" >
209 <xsd:minInclusive value= "0" />
210 <xsd:maxInclusive value="127" />
216 <xsd:complexType name="FrameNumbered" >
223 <xsd:attribute name="frame" type="tns:FrameNo" use="required" />
228 <xsd:complexType name="BezParam" >
231 bezier cubic curve parameters.
232 p0=(0, 0) p3=(127, 127) [implicit points]
236 <xsd:attribute name="p1x" type="tns:BezPt" use="optional" />
237 <xsd:attribute name="p1y" type="tns:BezPt" use="optional" />
238 <xsd:attribute name="p2x" type="tns:BezPt" use="optional" />
239 <xsd:attribute name="p2y" type="tns:BezPt" use="optional" />
244 <xsd:element name="bezier" >
247 bezier cubic curve parameters.
248 p0=(0, 0) p3=(127, 127) [implicit points]
249 P1 and P2 points are required.
255 <xsd:restriction base="tns:BezParam" >
256 <xsd:attribute name="p1x" type="tns:BezPt" use="required" />
257 <xsd:attribute name="p1y" type="tns:BezPt" use="required" />
258 <xsd:attribute name="p2x" type="tns:BezPt" use="required" />
259 <xsd:attribute name="p2y" type="tns:BezPt" use="required" />
261 </xsd:complexContent>
267 <xsd:element name="defLinear" >
270 default linear bezier curve.
271 p0=(0, 0) p1=(20, 20) p2=(107, 107) p3=(127, 127)
277 <xsd:restriction base="tns:BezParam" >
278 <xsd:attribute name="p1x" use="prohibited" fixed= "20" />
279 <xsd:attribute name="p1y" use="prohibited" fixed= "20" />
280 <xsd:attribute name="p2x" use="prohibited" fixed="107" />
281 <xsd:attribute name="p2y" use="prohibited" fixed="107" />
283 </xsd:complexContent>
289 <xsd:element name="defEaseInOut" >
292 default ease-in-out bezier curve.
293 p0=(0, 0) p1=(64, 0) p2=(64, 127) p3=(127, 127)
299 <xsd:restriction base="tns:BezParam" >
300 <xsd:attribute name="p1x" use="prohibited" fixed= "64" />
301 <xsd:attribute name="p1y" use="prohibited" fixed= "0" />
302 <xsd:attribute name="p2x" use="prohibited" fixed= "64" />
303 <xsd:attribute name="p2y" use="prohibited" fixed="127" />
305 </xsd:complexContent>
311 <xsd:complexType name="InterpolationSingle" >
314 has single interpolation curve.
315 If omitted, it means default linear curve.
319 <xsd:choice minOccurs="0" >
320 <xsd:element ref="tns:bezier" />
321 <xsd:element ref="tns:defLinear" />
322 <xsd:element ref="tns:defEaseInOut" />
328 <xsd:complexType name="PosWithInterpolation" >
331 3D-position with XYZ-interpolation curve.
332 If omitted, it means default linear curve *3 [XYZ].
336 <xsd:sequence minOccurs="0" maxOccurs="1" >
337 <xsd:choice minOccurs="3" maxOccurs="3" >
338 <xsd:element ref="tns:bezier" />
339 <xsd:element ref="tns:defLinear" />
340 <xsd:element ref="tns:defEaseInOut" />
344 <xsd:attribute name="xPos" type="xsd:float" use="required" />
345 <xsd:attribute name="yPos" type="xsd:float" use="required" />
346 <xsd:attribute name="zPos" type="xsd:float" use="required" />
351 <xsd:element name="meta" >
354 Meta-information of motion.
356 but, some meta-name has recommended usage.
357 + "generator" (Generator application name)
358 + "siteURL" (about motion creator)
376 <xsd:element name="modelName" >
379 name of motion-model.
393 <xsd:element name="boneMotionSequence" >
396 bone motion data sequence.
404 minOccurs="0" maxOccurs="unbounded" />
408 <xsd:unique name="BoneName" >
409 <xsd:selector xpath="./tns:bonePart" />
410 <xsd:field xpath="@name" />
416 <xsd:element name="bonePart" >
419 bone motion data group by bone-name.
427 minOccurs="0" maxOccurs="unbounded" />
436 <xsd:unique name="BoneFrameNo" >
437 <xsd:selector xpath="./tns:boneMotion" />
438 <xsd:field xpath="@frame" />
444 <xsd:element name="boneMotion" >
453 <xsd:extension base="tns:FrameNumbered" >
456 ref="tns:bonePosition"
457 minOccurs="0" maxOccurs="1" />
459 <xsd:element ref="tns:boneRotQuat" />
460 <xsd:element ref="tns:boneRotEyxz" />
464 </xsd:complexContent>
470 <xsd:element name="bonePosition" type="tns:PosWithInterpolation" >
480 <xsd:element name="boneRotQuat" >
483 bone rotation. (Quaternion parameters)
489 <xsd:extension base="tns:InterpolationSingle" >
490 <xsd:attribute name="qx" type="xsd:float" use="required" />
491 <xsd:attribute name="qy" type="xsd:float" use="required" />
492 <xsd:attribute name="qz" type="xsd:float" use="required" />
493 <xsd:attribute name="qw" type="xsd:float" use="required" />
495 </xsd:complexContent>
501 <xsd:element name="boneRotEyxz" >
504 bone rotation. (YXZ-Euler rotation parameters)
510 <xsd:extension base="tns:InterpolationSingle" >
511 <xsd:attribute name="xDeg" type="xsd:float" use="required" />
512 <xsd:attribute name="yDeg" type="xsd:float" use="required" />
513 <xsd:attribute name="zDeg" type="xsd:float" use="required" />
515 </xsd:complexContent>
521 <xsd:element name="morphSequence" >
524 morphing data sequence.
532 minOccurs="0" maxOccurs="unbounded" />
536 <xsd:unique name="MorphName" >
537 <xsd:selector xpath="./tns:morphPart" />
538 <xsd:field xpath="@name" />
544 <xsd:element name="morphPart" >
547 morphing data group by morph-name.
554 ref="tns:morphMotion"
555 minOccurs="0" maxOccurs="unbounded" />
564 <xsd:unique name="MorphFrameNo" >
565 <xsd:selector xpath="./tns:morphMotion" />
566 <xsd:field xpath="@frame" />
572 <xsd:element name="morphMotion" >
581 <xsd:extension base="tns:FrameNumbered" >
587 </xsd:complexContent>
593 <xsd:element name="cameraSequence" >
603 ref="tns:cameraMotion"
604 minOccurs="0" maxOccurs="unbounded" />
608 <xsd:unique name="CameraFrameNo" >
609 <xsd:selector xpath="./tns:cameraMotion" />
610 <xsd:field xpath="@frame" />
616 <xsd:element name="cameraMotion" >
625 <xsd:extension base="tns:FrameNumbered" >
627 <xsd:element ref="tns:cameraTarget" />
628 <xsd:element ref="tns:cameraRotation" />
629 <xsd:element ref="tns:cameraRange" />
630 <xsd:element ref="tns:projection" />
633 name="hasPerspective"
638 </xsd:complexContent>
644 <xsd:element name="cameraTarget" type="tns:PosWithInterpolation" >
654 <xsd:element name="cameraRotation" >
657 camera-rotation around camera-target
658 with polar-coordinates parameters.
660 xRad = -radian(UI_X) [latitude]
661 yRad = radian(UI_Y) [longitude]
662 zRad = radian(UI_Z) [roll]
668 <xsd:extension base="tns:InterpolationSingle" >
669 <xsd:attribute name="xRad" type="xsd:float" use="required" />
670 <xsd:attribute name="yRad" type="xsd:float" use="required" />
671 <xsd:attribute name="zRad" type="xsd:float" use="required" />
673 </xsd:complexContent>
679 <xsd:element name="cameraRange" >
683 sign was negated from UI_RANGE.
689 <xsd:extension base="tns:InterpolationSingle" >
695 </xsd:complexContent>
701 <xsd:element name="projection" >
705 vertDeg : vertical screen-projection angle by degree.
711 <xsd:extension base="tns:InterpolationSingle" >
714 type="tns:ProjectionAngle"
717 </xsd:complexContent>
723 <xsd:element name="luminousSequence" >
733 ref="tns:luminousAct"
734 minOccurs="0" maxOccurs="unbounded" />
738 <xsd:unique name="LuminousFrameNo" >
739 <xsd:selector xpath="./tns:luminousAct" />
740 <xsd:field xpath="@frame" />
746 <xsd:element name="luminousAct" >
755 <xsd:extension base="tns:FrameNumbered" >
757 <xsd:element ref="tns:lumiColor" />
758 <xsd:element ref="tns:lumiDirection" />
761 </xsd:complexContent>
767 <xsd:element name="lumiColor" >
770 luminous color by RGB color space.
777 type="tns:ColorComponent"
781 type="tns:ColorComponent"
785 type="tns:ColorComponent"
792 <xsd:element name="lumiDirection" >
795 luminous direction by vector.
802 type="tns:DirVecComponent"
806 type="tns:DirVecComponent"
810 type="tns:DirVecComponent"
817 <xsd:element name="shadowSequence" >
828 minOccurs="0" maxOccurs="unbounded" />
832 <xsd:unique name="ShadowFrameNo" >
833 <xsd:selector xpath="./tns:shadowAct" />
834 <xsd:field xpath="@frame" />
840 <xsd:element name="shadowAct" >
849 <xsd:extension base="tns:FrameNumbered" >
852 type="tns:ShadowType"
856 type="tns:ShadowRawParam"
859 </xsd:complexContent>