Defining Visibility Animation

Overview

This page describes the elements used to define visibility animations to meshes.

Defining Animation on the CMDL Side

The animation data are defined in a .cmdla 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).

XML Hierarchical Structure

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>
<GraphicsContentCtr>
<Models>
<SkeletalModel>
<AnimationGroupDescriptions>
<GraphicsAnimationGroupDescription>

Actual Definitions on the CMDL Side

The .cmdl side would be defined as shown below for visibility animation. These definitions make it possible to animate all meshes in the .cmdl file.

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

Actual Definitions on the CMDLA Side

The .cmdla side would be defined as shown below for visibility animation. A <MemberAnimationData> element is defined for each mesh, and the target mesh is defined by the <Path> element of the child hierarchy. The <BoolAnimation> element shown below defines a visibility animation. Elements that are not animated are omitted.

<MemberAnimationData>
<Path>Meshes[(mesh ID)].IsVisible</Path>
<BoolAnimation>
<BoolCurve PreRepeatMethod="None" PostRepeatMethod="None" StartFrame="0" EndFrame="80" DefaultValue="false">
<Keys>
<BoolKey Frame="0" Value="true" />
<BoolKey Frame="20" Value="false" />
</Keys>
</BoolCurve>
</BoolAnimation>
</MemberAnimationData>

CONFIDENTIAL