1<html> 2<head> 3<title>Defining Material Animation</title> 4<link rel="stylesheet" href="../css/mainpage.css" type="text/css"> 5<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6</head> 7 8<body> 9 10<h1>Defining Material Animation</h1> 11 12<h2>Overview</h2> 13<p> 14This page describes the elements used to define animations to materials. The animation targets are the material's colors, the SRT of the UV coordinates, and the texture patterns. 15</p> 16 17<h2>Defining Animation on the <CODE>CMDL</CODE> Side</h2> 18<p> 19The animation data are defined in a <CODE>.mata</CODE> file, but you also must set definitions for animation on the <CODE>.cmdl </CODE>side for the model data to which the animation data will be applied. The intermediate format can handle skeletal animation as well as a number of other kinds of animation including material animation and visibility animation. Each kind of animation is called an <I>animation group</I>. The <CODE><GraphicsAnimationGroupDescription></CODE> element is defined in order to clearly indicate which animation group(s) to apply to a model. Contained in this element is information about the animation group type(s), the timing with which the animation(s) will be applied, and the reference to the element(s) inside the <CODE>.cmdl</CODE> file that will be overwritten by the animation(s). 20</p> 21 22<h3>XML Hierarchical Structure</h3> 23<p> 24The <CODE><AnimationGroupDescriptions></CODE> element appears only once inside the <CODE><SkeletalModel></CODE> element and indicates the start of the definitions of the <CODE><GraphicsAnimationGroupDescription></CODE> element(s). If there are multiple types of animation groups, then multiple <CODE><GraphicsAnimationGroupDescription></CODE> elements are defined. 25</p> 26<table> 27<tr><td> 28<pre> 29<NintendoWareIntermediateFile><br> 30 <GraphicsContentCtr><br> 31 <Models><br> 32 <SkeletalModel><br> 33 <AnimationGroupDescriptions><br> 34 <GraphicsAnimationGroupDescription><br> 35</pre> 36</td></tr> 37</table> 38 39<h2>Actual Definitions on the <CODE>CMDL</CODE> Side</h2> 40<p> 41The CMDL side is defined as shown below for material animation. These definitions make it possible to animate all materials in the <CODE>.cmdl</CODE> file. 42</p> 43 44<table> 45<tr><td> 46<pre> 47<GraphicsAnimationGroupDescription Name="MaterialAnimation" EvaluationTiming="AfterSceneCulling"><br> 48 <MemberInformationSet><br> 49 <AnimationMemberDescription BlendOperationName="CalculatedTransform"><br> 50 <AnimationMemberDescription BlendOperationName="RgbaColor"><br> 51 <Path>Materials["*"].MaterialColor.Emission</Path><br> 52 </AnimationMemberDescription><br> 53 <AnimationMemberDescription BlendOperationName="RgbaColor"><br> 54 <Path>Materials["*"].MaterialColor.Ambient</Path><br> 55 </AnimationMemberDescription><br> 56 <AnimationMemberDescription BlendOperationName="RgbaColor"><br> 57 <Path>Materials["*"].MaterialColor.Diffuse</Path><br> 58 </AnimationMemberDescription><br> 59 <AnimationMemberDescription BlendOperationName="RgbaColor"><br> 60 <Path>Materials["*"].MaterialColor.Specular0</Path><br> 61 </AnimationMemberDescription><br> 62<br> 63 .... omitted .....<br> 64<br> 65 <AnimationMemberDescription BlendOperationName="Int"><br> 66 <Path>Materials["*"].TextureMappers["*"].Texture</Path><br> 67 </AnimationMemberDescription><br> 68 <AnimationMemberDescription BlendOperationName="RgbaColor"><br> 69 <Path>Materials["*"].FragmentOperation.BlendOperation.BlendColor</Path><br> 70 </AnimationMemberDescription><br> 71 <AnimationMemberDescription BlendOperationName="Vector2"><br> 72 <Path>Materials["*"].TextureCoordinators["*"].Scale</Path><br> 73 </AnimationMemberDescription><br> 74 <AnimationMemberDescription BlendOperationName="Float"><br> 75 <Path>Materials["*"].TextureCoordinators["*"].Rotate</Path><br> 76 </AnimationMemberDescription><br> 77 <AnimationMemberDescription BlendOperationName="Vector2"><br> 78 <Path>Materials["*"].TextureCoordinators["*"].Translate</Path><br> 79 </AnimationMemberDescription><br> 80 </AnimationMemberDescription><br> 81 </MemberInformationSet><br> 82</GraphicsAnimationGroupDescription><br> 83</pre> 84</td></tr> 85</table> 86 87<h2>Defining Texture Patterns on the CMATA Side</h2> 88<p> 89Texture pattern animation is defined as an enumerated list of references to textures and the animation of that index. Multiple <CODE><TexturePattern></CODE> can be defined in the <CODE><TexturePatterns></CODE> element. 90</p> 91 92<h3>XML Hierarchical Structure</h3> 93<table> 94<tr><td> 95<pre> 96<NintendoWareIntermediateFile><br> 97 <GraphicsContentCtr><br> 98 <Animations><br> 99 <MaterialAnimationData><br> 100 <MemberAnimationDataSet><br> 101 <MemberAnimationData><br> 102</pre> 103</td></tr> 104</table> 105 106<h2>Actual Definitions on the CMATA Side</h2> 107<p> 108The CMATA side is defined as shown below for material animation. Separate <CODE><MemberAnimationData></CODE> are defined for each color, for the Translate, Scale and Rotate of the UV coordinates, and for the texture patterns, and the target bones are specified by the child hierarchy's <CODE><Path></CODE> element. 109</p> 110<li> 111<ul>Animations are defined for colors by <CODE><RgbaColorAnimation></CODE> elements.</ul> 112<ul>Animations are defined for the Translate and Scale of the UV coordinates by <CODE><Vector2Animation></CODE> elements.</ul> 113<ul>Animation is defined for the Rotate of the UV coordinates by the <CODE><FloatAnimation></CODE> element.</ul> 114<ul>Animations are defined for texture patterns by <CODE><IntAnimation></CODE> elements.</ul> 115<p> 116Elements that are not animated are omitted. 117</p> 118 119<table> 120<tr><td> 121<pre> 122<MemberAnimationDataSet><br> 123<br> 124 <!-- Animation of colors--><br> 125 <MemberAnimationData><br> 126 <Path>Materials[(material name)].MaterialColor.Emission</Path><br> 127 <RgbaColorAnimation><br> 128 <RSegmentsFloatCurve PreRepeatMethod="None" PostRepeatMethod="None" StartFrame="0" EndFrame="60"><br> 129 <Segments><br> 130 <HermiteFloatSegment><br> 131 <Keys><br> 132 <HermiteFloatKey Frame="0" Value="0" InSlope="0.000824074" OutSlope="0.000824074" /><br> 133 :<br> 134 </Keys><br> 135 </HermiteFloatSegment><br> 136 </Segments><br> 137 </RSegmentsFloatCurve><br> 138 </RgbaColorAnimation><br> 139 </MemberAnimationData><br> 140<br> 141 <!--Animation of UV coordinates--><br> 142 <MemberAnimationData><br> 143 <Path>Materials[(material name)].TextureCoordinators[0].Translate</Path><br> 144 <Vector2Animation><br> 145 <XSegmentsFloatCurve PreRepeatMethod="None" PostRepeatMethod="None" StartFrame="0" EndFrame="50"><br> 146 <Segments><br> 147 <HermiteFloatSegment><br> 148 <Keys><br> 149 <HermiteFloatKey Frame="0" Value="0" InSlope="0.00162963" OutSlope="0.00162963" /><br> 150 :<br> 151 </Keys><br> 152 </HermiteFloatSegment><br> 153 </Segments><br> 154 </XSegmentsFloatCurve><br> 155 </Vector2Animation><br> 156 </MemberAnimationData><br> 157<br> 158 <!--Animation of texture patterns--><br> 159 <MemberAnimationData><br> 160 <Path>Materials[(material name)].TextureMappers[0].Texture</Path><br> 161 <IntAnimation><br> 162 <SegmentsFloatCurve PreRepeatMethod="None" PostRepeatMethod="None" StartFrame="0" EndFrame="5"><br> 163 <Segments><br> 164 <StepFloatSegment><br> 165 <Keys><br> 166 <StepFloatKey Frame="0" Value="0" /><br> 167 :<br> 168 </Keys><br> 169 </StepFloatSegment><br> 170 </Segments><br> 171 </SegmentsFloatCurve><br> 172 </IntAnimation><br> 173 </MemberAnimationData><br> 174<br> 175</MemberAnimationDataSet><br> 176</pre> 177</td></tr> 178</table> 179 180<hr><p>CONFIDENTIAL</p></body> 181</html> 182