Animation

Animation Group Descriptor

Each collection of one type of animation is called an animation group, and the setting information for that group takes the form of the animation descriptor. The animation target attributes and blend operation names are output to <GraphicsAnimationGroupDescription>.
Models and other animation targets possess sets of groups.
Animations are stored as individual resources by saving them as separate groups in the file.

Animation descriptors listed under <Model> and <SkeletalModel> elements

Skeletal animation

The following is a model with skeletal animation targeting all bones.

<GraphicsAnimationGroupDescription Name="SkeletalAnimation" EvaluationTiming="AfterSceneCulling">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="CalculatedTransform">
<Path>Skeleton.Bones["*"].AnimatedTransform</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>

If the animation target was only the one bone named Bone1, the <Path> would look like this:

<Path>Skeleton.Bones["Bone1"].AnimatedTransform</Path>

For now, please configure your settings for all bones, as was done in the example above.

Model (visibility) animation

Models that include model (visibility) animations are handled as follows.

<GraphicsAnimationGroupDescription Name="VisibilityAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Bool">
<Path>IsVisible</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool">
<Path>Meshes["*"].IsVisible</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool">
<Path>IsBranchVisible</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool">
<Path>MeshNodeVisibilities["*"].IsVisible</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>

Material Animation

The following is a model with material animation targeting all materials.

<GraphicsAnimationGroupDescription Name="MaterialAnimation" EvaluationTiming="AfterSceneCulling">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Emission</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Ambient</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Diffuse</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Specular0</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Specular1</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant0</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant1</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant2</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant3</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant4</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].MaterialColor.Constant5</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].TextureMappers["*"].Sampler.BorderColor</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Int">
<Path>Materials["*"].TextureMappers["*"].Texture</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor">
<Path>Materials["*"].FragmentOperation.BlendOperation.BlendColor</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector2">
<Path>Materials["*"].TextureCoordinators["*"].Scale</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float">
<Path>Materials["*"].TextureCoordinators["*"].Rotate</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector2">
<Path>Materials["*"].TextureCoordinators["*"].Translate</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>

Animation descriptors listed under the <Camera> element

Camera animation

<GraphicsAnimationGroupDescription Name="CameraAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Transform" IsBinarized="true">
<Path>Transform</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>ViewUpdater.TargetPosition</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ViewUpdater.Twist</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>ViewUpdater.UpwardVector</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>ViewUpdater.ViewRotate</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ProjectionUpdater.Near</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ProjectionUpdater.Far</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ProjectionUpdater.Fovy</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ProjectionUpdater.AspectRatio</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>ProjectionUpdater.Height</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>

Animation descriptors listed under the <Light> element

<FragmentLightCtr> (Fragment Light) Animation Descriptors

<AnimationGroupDescriptions>
<GraphicsAnimationGroupDescription Name="LightAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Transform" IsBinarized="true">
<Path>Transform</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Ambient</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Diffuse</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Specular0</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Specular1</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>Direction</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>DistanceAttenuationStart</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>DistanceAttenuationEnd</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool" IsBinarized="true">
<Path>IsLightEnabled</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>
</AnimationGroupDescriptions>

<AmbientLightCtr> (Ambient Light) Animation Descriptors

<AnimationGroupDescriptions>
<GraphicsAnimationGroupDescription Name="LightAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Transform" IsBinarized="true">
<Path>Transform</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Ambient</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool" IsBinarized="true">
<Path>IsLightEnabled</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>
</AnimationGroupDescriptions>

<VertexLightCtr> (VertexLight) Animation Descriptors

<AnimationGroupDescriptions>
<GraphicsAnimationGroupDescription Name="LightAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Transform" IsBinarized="true">
<Path>Transform</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Ambient</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>Diffuse</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>Direction</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>DistanceAttenuationConstant</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>DistanceAttenuationLinear</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>DistanceAttenuationQuadratic</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>SpotExponent</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>SpotCutoffAngle</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool" IsBinarized="true">
<Path>IsLightEnabled</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>
</AnimationGroupDescriptions>

<HemiSphereLightCtr> (Hemispherical Light) Animation Descriptors

<AnimationGroupDescriptions>
<GraphicsAnimationGroupDescription Name="LightAnimation" EvaluationTiming="BeforeWorldUpdate">
<MemberInformationSet>
<AnimationMemberDescription BlendOperationName="Transform" IsBinarized="true">
<Path>Transform</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>GroundColor</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="RgbaColor" IsBinarized="true">
<Path>SkyColor</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Vector3" IsBinarized="true">
<Path>Direction</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Float" IsBinarized="true">
<Path>LerpFactor</Path>
</AnimationMemberDescription>
<AnimationMemberDescription BlendOperationName="Bool" IsBinarized="true">
<Path>IsLightEnabled</Path>
</AnimationMemberDescription>
</MemberInformationSet>
</GraphicsAnimationGroupDescription>
</AnimationGroupDescriptions>

Rules for Outputting Animation Curves

For bones influenced by skinning, an animation curve whose value does not change is not output if the value is the same as in the .cmdl file (i.e., the value is the same as the bind pose).

For bones which are not influenced by skinning, even animation curves with values that do not change are output if settings have been configured for items like keys, IKs and constraints.

For an animation curve with unchanging value, data are only output for one <LinearFloatKey>, as shown below:

<XSegmentsFloatCurve PreRepeatMethod="None" PostRepeatMethod="None" StartFrame="0" EndFrame="0">
<Segments>
<LinearFloatSegment>
<Keys>
<LinearFloatKey Frame="0" Value="0" />
</Keys>
</LinearFloatSegment>
</Segments>
</XSegmentsFloatCurve>

In the case of skeletal animation, <MemberAnimationData> is not output for bones for which animation curves for Translate, Rotate and Scale are not all output.
However, for bones influenced by skinning, if settings have been configured for items like keys, IKs and constraints, then <MemberAnimationData> without animation curves is output, as shown below. In this state, the values in the .cmdl file are used for all translations, rotations and scaling.

<MemberAnimationData>
<Path>Skeleton.Bones["Bone1"].AnimatedTransform</Path>
<TransformAnimation />
</MemberAnimationData>






CONFIDENTIAL