This section describes the elements used to define animation 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.
CMDL Side
The animation data are defined in a .cskla file, but you also must set definitions for animation on the .cmdl 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 animation group.
The <GraphicsAnimationGroupDescription> 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 .cmdl file that will be overwritten by the animation(s).
The <AnimationGroupDescriptions> element appears only once inside the <SkeletalModel> element and indicates the start of the definitions of the <GraphicsAnimationGroupDescription> element(s). If there are multiple types of animation groups, then multiple <GraphicsAnimationGroupDescription> elements are defined.
<NintendoWareIntermediateFile> |
CMDL Side
The CMDL side would be defined as shown below for skeletal animation. These definitions make it possible to animate all bones of the skeletal model in the .cmdl file.
<GraphicsAnimationGroupDescription Name="SkeletalAnimation" EvaluationHint="BeforeSceneRendering"> |
CSKLA Side
An animation curve is defined for each animation group in the .cskla file. Here we describe the process for a skeletal animation. Since bones are the application targets of skeletal animation, the <MemberAnimationData> element collects together the animation curves for each 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 indicates the start of the definitions of <MemberAnimationData> element(s). Multiple <MemberAnimationData> elements are defined in order to define animation for multiple bones.
<NintendoWareIntermediateFile> |
CSKLA Side
The CSKLA side would be defined as shown below for skeletal animation. A <MemberAnimationData> element is defined for each bone, and 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