1 <?xml version="1.0" encoding="UTF-8" ?>
5 motion-data(*.vmd) on XML
8 License : The MIT License
9 Copyright(c) 2013 MikuToga Partners
13 <!DOCTYPE xsd:schema [
14 <!ENTITY schemaVer "130609A" >
15 <!ENTITY schemaNS "http://mikutoga.sourceforge.jp/xml/ns/vmdxml/130609A" >
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) 2013 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" />
56 <xsd:element ref="tns:flagSequence" />
58 <xsd:sequence> <!-- stage act -->
59 <xsd:element ref="tns:cameraSequence" />
60 <xsd:element ref="tns:luminousSequence" />
61 <xsd:element ref="tns:shadowSequence" />
69 fixed="&schemaVer;" />
75 <xsd:simpleType name="FrameNo" >
82 <xsd:restriction base="xsd:int" >
84 <xsd:minInclusive value="0" />
91 <xsd:simpleType name="MorphFlex" >
94 morph flexible value. [0.0-1.0]
98 <xsd:restriction base="xsd:float" >
99 <xsd:minInclusive value="-0.0" />
101 <xsd:maxInclusive value="1.0" />
108 <xsd:simpleType name="ProjectionAngle" >
111 screen-projection angle(degree).
115 <xsd:restriction base="xsd:int" >
117 <xsd:minInclusive value="-0" />
118 <xsd:maxInclusive value="+180" />
125 <xsd:simpleType name="ColorComponent" >
128 color component value.
132 <xsd:restriction base="xsd:float" >
134 <xsd:minInclusive value="-0.0" />
135 <xsd:maxInclusive value="1.0" />
142 <xsd:simpleType name="DirVecComponent" >
145 direction vector component value.
149 <xsd:restriction base="xsd:float" >
151 <xsd:minInclusive value="-1.0" />
152 <xsd:maxInclusive value="+1.0" />
159 <xsd:simpleType name="ShadowType" >
163 + NONE : no self-shadow
164 + MODE_1 : reduce shadow-quality suddenly at range
165 + MODE_2 : reduce shadow-quality gradually with range
169 <xsd:restriction base="xsd:string" >
170 <xsd:enumeration value="NONE" />
171 <xsd:enumeration value="MODE_1" />
172 <xsd:enumeration value="MODE_2" />
178 <xsd:simpleType name="ShadowRawParam" >
181 shadow range raw value.
183 UI_VALUE = EFFECTIVE_RANGE * 100 ???
184 rawParam = 0.1 - (UI_VALUE / 1.0E+5)
186 UI_VALUE:0 => rawParam:0.1
187 UI_VALUE:8875 => rawParam:0.01125
188 UI_VALUE:9999 => rawParam:1.0E-5
192 <xsd:restriction base="xsd:float" >
194 <xsd:minInclusive value="-0.0" />
195 <xsd:maxInclusive value="0.1" />
202 <xsd:simpleType name="BezPt" >
205 Bezier points coordinates value. [XY:0-127]
209 <xsd:restriction base="xsd:byte" >
210 <xsd:minInclusive value= "0" />
211 <xsd:maxInclusive value="127" />
217 <xsd:complexType name="FrameNumbered" >
224 <xsd:attribute name="frame" type="tns:FrameNo" use="required" />
229 <xsd:complexType name="BezParam" >
232 bezier cubic curve parameters.
233 p0=(0, 0) p3=(127, 127) [implicit points]
237 <xsd:attribute name="p1x" type="tns:BezPt" use="optional" />
238 <xsd:attribute name="p1y" type="tns:BezPt" use="optional" />
239 <xsd:attribute name="p2x" type="tns:BezPt" use="optional" />
240 <xsd:attribute name="p2y" type="tns:BezPt" use="optional" />
245 <xsd:element name="bezier" >
248 bezier cubic curve parameters.
249 p0=(0, 0) p3=(127, 127) [implicit points]
250 P1 and P2 points are required.
256 <xsd:restriction base="tns:BezParam" >
257 <xsd:attribute name="p1x" type="tns:BezPt" use="required" />
258 <xsd:attribute name="p1y" type="tns:BezPt" use="required" />
259 <xsd:attribute name="p2x" type="tns:BezPt" use="required" />
260 <xsd:attribute name="p2y" type="tns:BezPt" use="required" />
262 </xsd:complexContent>
268 <xsd:element name="defLinear" >
271 default linear bezier curve.
272 p0=(0, 0) p1=(20, 20) p2=(107, 107) p3=(127, 127)
278 <xsd:restriction base="tns:BezParam" >
279 <xsd:attribute name="p1x" use="prohibited" fixed= "20" />
280 <xsd:attribute name="p1y" use="prohibited" fixed= "20" />
281 <xsd:attribute name="p2x" use="prohibited" fixed="107" />
282 <xsd:attribute name="p2y" use="prohibited" fixed="107" />
284 </xsd:complexContent>
290 <xsd:element name="defEaseInOut" >
293 default ease-in-out bezier curve.
294 p0=(0, 0) p1=(64, 0) p2=(64, 127) p3=(127, 127)
300 <xsd:restriction base="tns:BezParam" >
301 <xsd:attribute name="p1x" use="prohibited" fixed= "64" />
302 <xsd:attribute name="p1y" use="prohibited" fixed= "0" />
303 <xsd:attribute name="p2x" use="prohibited" fixed= "64" />
304 <xsd:attribute name="p2y" use="prohibited" fixed="127" />
306 </xsd:complexContent>
312 <xsd:complexType name="InterpolationSingle" >
315 has single interpolation curve.
316 If omitted, it means default linear curve.
320 <xsd:choice minOccurs="0" >
321 <xsd:element ref="tns:bezier" />
322 <xsd:element ref="tns:defLinear" />
323 <xsd:element ref="tns:defEaseInOut" />
329 <xsd:complexType name="PosWithInterpolation" >
332 3D-position with XYZ-interpolation curve.
333 If omitted, it means default linear curve *3 [XYZ].
337 <xsd:sequence minOccurs="0" maxOccurs="1" >
338 <xsd:choice minOccurs="3" maxOccurs="3" >
339 <xsd:element ref="tns:bezier" />
340 <xsd:element ref="tns:defLinear" />
341 <xsd:element ref="tns:defEaseInOut" />
345 <xsd:attribute name="xPos" type="xsd:float" use="required" />
346 <xsd:attribute name="yPos" type="xsd:float" use="required" />
347 <xsd:attribute name="zPos" type="xsd:float" use="required" />
352 <xsd:element name="meta" >
355 Meta-information of motion.
357 but, some meta-name has recommended usage.
358 + "generator" (Generator application name)
359 + "siteURL" (about motion creator)
377 <xsd:element name="modelName" >
380 name of motion-model.
394 <xsd:element name="boneMotionSequence" >
397 bone motion data sequence.
405 minOccurs="0" maxOccurs="unbounded" />
409 <xsd:unique name="BoneName" >
410 <xsd:selector xpath="./tns:bonePart" />
411 <xsd:field xpath="@name" />
417 <xsd:element name="bonePart" >
420 bone motion data group by bone-name.
428 minOccurs="0" maxOccurs="unbounded" />
437 <xsd:unique name="BoneFrameNo" >
438 <xsd:selector xpath="./tns:boneMotion" />
439 <xsd:field xpath="@frame" />
445 <xsd:element name="boneMotion" >
454 <xsd:extension base="tns:FrameNumbered" >
457 ref="tns:bonePosition"
458 minOccurs="0" maxOccurs="1" />
460 <xsd:element ref="tns:boneRotQuat" />
461 <xsd:element ref="tns:boneRotEyxz" />
465 </xsd:complexContent>
471 <xsd:element name="bonePosition" type="tns:PosWithInterpolation" >
481 <xsd:element name="boneRotQuat" >
484 bone rotation. (Quaternion parameters)
490 <xsd:extension base="tns:InterpolationSingle" >
491 <xsd:attribute name="qx" type="xsd:float" use="required" />
492 <xsd:attribute name="qy" type="xsd:float" use="required" />
493 <xsd:attribute name="qz" type="xsd:float" use="required" />
494 <xsd:attribute name="qw" type="xsd:float" use="required" />
496 </xsd:complexContent>
502 <xsd:element name="boneRotEyxz" >
505 bone rotation. (YXZ-Euler rotation parameters)
511 <xsd:extension base="tns:InterpolationSingle" >
512 <xsd:attribute name="xDeg" type="xsd:float" use="required" />
513 <xsd:attribute name="yDeg" type="xsd:float" use="required" />
514 <xsd:attribute name="zDeg" type="xsd:float" use="required" />
516 </xsd:complexContent>
522 <xsd:element name="morphSequence" >
525 morphing data sequence.
533 minOccurs="0" maxOccurs="unbounded" />
537 <xsd:unique name="MorphName" >
538 <xsd:selector xpath="./tns:morphPart" />
539 <xsd:field xpath="@name" />
545 <xsd:element name="morphPart" >
548 morphing data group by morph-name.
555 ref="tns:morphMotion"
556 minOccurs="0" maxOccurs="unbounded" />
565 <xsd:unique name="MorphFrameNo" >
566 <xsd:selector xpath="./tns:morphMotion" />
567 <xsd:field xpath="@frame" />
573 <xsd:element name="morphMotion" >
582 <xsd:extension base="tns:FrameNumbered" >
588 </xsd:complexContent>
594 <xsd:element name="cameraSequence" >
604 ref="tns:cameraMotion"
605 minOccurs="0" maxOccurs="unbounded" />
609 <xsd:unique name="CameraFrameNo" >
610 <xsd:selector xpath="./tns:cameraMotion" />
611 <xsd:field xpath="@frame" />
617 <xsd:element name="cameraMotion" >
626 <xsd:extension base="tns:FrameNumbered" >
628 <xsd:element ref="tns:cameraTarget" />
629 <xsd:element ref="tns:cameraRotation" />
630 <xsd:element ref="tns:cameraRange" />
631 <xsd:element ref="tns:projection" />
634 name="hasPerspective"
639 </xsd:complexContent>
645 <xsd:element name="cameraTarget" type="tns:PosWithInterpolation" >
655 <xsd:element name="cameraRotation" >
658 camera-rotation around camera-target
659 with polar-coordinates parameters.
661 xRad = -radian(UI_X) [latitude]
662 yRad = radian(UI_Y) [longitude]
663 zRad = radian(UI_Z) [roll]
669 <xsd:extension base="tns:InterpolationSingle" >
670 <xsd:attribute name="xRad" type="xsd:float" use="required" />
671 <xsd:attribute name="yRad" type="xsd:float" use="required" />
672 <xsd:attribute name="zRad" type="xsd:float" use="required" />
674 </xsd:complexContent>
680 <xsd:element name="cameraRange" >
684 sign was negated from UI_RANGE.
690 <xsd:extension base="tns:InterpolationSingle" >
696 </xsd:complexContent>
702 <xsd:element name="projection" >
706 vertDeg : vertical screen-projection angle by degree.
712 <xsd:extension base="tns:InterpolationSingle" >
715 type="tns:ProjectionAngle"
718 </xsd:complexContent>
724 <xsd:element name="luminousSequence" >
734 ref="tns:luminousAct"
735 minOccurs="0" maxOccurs="unbounded" />
739 <xsd:unique name="LuminousFrameNo" >
740 <xsd:selector xpath="./tns:luminousAct" />
741 <xsd:field xpath="@frame" />
747 <xsd:element name="luminousAct" >
756 <xsd:extension base="tns:FrameNumbered" >
758 <xsd:element ref="tns:lumiColor" />
759 <xsd:element ref="tns:lumiDirection" />
762 </xsd:complexContent>
768 <xsd:element name="lumiColor" >
771 luminous color by RGB color space.
778 type="tns:ColorComponent"
782 type="tns:ColorComponent"
786 type="tns:ColorComponent"
793 <xsd:element name="lumiDirection" >
796 luminous direction by vector.
803 type="tns:DirVecComponent"
807 type="tns:DirVecComponent"
811 type="tns:DirVecComponent"
818 <xsd:element name="shadowSequence" >
829 minOccurs="0" maxOccurs="unbounded" />
833 <xsd:unique name="ShadowFrameNo" >
834 <xsd:selector xpath="./tns:shadowAct" />
835 <xsd:field xpath="@frame" />
841 <xsd:element name="shadowAct" >
850 <xsd:extension base="tns:FrameNumbered" >
853 type="tns:ShadowType"
857 type="tns:ShadowRawParam"
860 </xsd:complexContent>
866 <xsd:element name="flagSequence" >
869 numbered flag sequence.
877 minOccurs="0" maxOccurs="unbounded" />
881 <xsd:unique name="FlagFrameNo" >
882 <xsd:selector xpath="./tns:flagMotion" />
883 <xsd:field xpath="@frame" />
889 <xsd:element name="flagMotion" >
892 numbered motion flags.
898 <xsd:extension base="tns:FrameNumbered" >
902 minOccurs="0" maxOccurs="unbounded" />
909 </xsd:complexContent>
912 <xsd:unique name="IkBoneName" >
913 <xsd:selector xpath="./tns:ikSwitch" />
914 <xsd:field xpath="@name" />
920 <xsd:element name="ikSwitch" >
923 IK ON/OFF switch for each IK-Bone.