This section describes the elements used to define animations for skinning models and the hierarchical structure of scenes. As explained in Defining a Scene's Hierarchical Structure, all nodes in the intermediate format are defined as bones. For this reason, the targets of animation are the bones. In this section, we use the term skeletal animation to refer to this animation of bones.
The animation data is defined in a .cskla
file, but you must also define the animation in the .cmdl
file for the model data to which the animation data will be applied. The intermediate format can handle skeletal animations and other animation types, such as material animations and visibility animations. Each type of animation is called an animation group.
The <GraphicsAnimationGroupDescription>
element is defined to clearly indicate which animation groups to apply to a model. This element contains information about the animation group type, the timing to use when applying the animation, and references to the elements inside the .cmdl
file that are overwritten by the animation.
The <AnimationGroupDescriptions>
element appears only once inside the <SkeletalModel>
element, and indicates the start of the definitions of the <GraphicsAnimationGroupDescription>
elements. If there are multiple types of animation groups, then multiple <GraphicsAnimationGroupDescription>
elements are defined.
<NintendoWareIntermediateFile> |
The CMDL file would be defined as shown below for a skeletal animation. These definitions make it possible to animate all bones of the skeletal model in the .cmdl
file.
<GraphicsAnimationGroupDescription Name="SkeletalAnimation" EvaluationHint="BeforeSceneRendering"> |
An animation curve is defined for each animation group in the .cskla
file. Here we describe the process for a skeletal animation. Bones are the targets of the skeletal animation and a <MemberAnimationData>
element is used to specify an animation curve for a single bone. This element defines the references to the bones in the .cmdl
file and the actual animation curves.
The <MemberAnimationDataSet>
element appears only once inside the <SkeletalAnimationData>
element and specifies the start of the definitions for the <MemberAnimationData>
elements. Multiple <MemberAnimationData>
elements are defined in order to define animation for multiple bones.
<NintendoWareIntermediateFile> |
The CSKLA file is defined as shown below for skeletal animation. A <MemberAnimationData>
element is defined for each bone. The target bone is defined by the <Path>
element of the child hierarchy. The next <TransformAnimation>
element defines a translation animation. The translation animation includes the <RotateVector3Animation>
element representing the rotation, the <TranslateVector3Animation>
element representing the position and the <ScaleVector3Animation>
element representing the scale. Elements that are not animated are omitted.
<MemberAnimationData> |
CONFIDENTIAL