1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5<meta http-equiv="Content-Style-Type" content="text/css" /> 6<link href="../../html/common/main.css" rel="stylesheet" type="text/css" /> 7<title>Combining and Playing Animations</title> 8</head> 9<body> 10<h1>Combining and Playing Animations</h1> 11<p>This section describes how to use the Animation Set features to combine model animations for playback. </p> 12<h2>Prepare the Sample Data</h2> 13<p>The NintendoWare package contains the following sample data, located as shown below. Load this sample data into 3DEditor and <a href="preview.html#connection_viewer">connect to the Viewer</a>.</p> 14<p>%NW4C_ROOT%/SampleData/Graphics/Intermediate/ProgramResource/Male</p> 15<ul> 16 <li><CODE>Male.cmdl</CODE> (Model)</li> 17 <li><CODE>RedFading.cmata</CODE> (Material animation)</li> 18 <li><CODE>Run.cskla</CODE> (Skeletal animation)</li> 19</ul> 20<p class="new_hint">To load the files, select <B>File </B>> <B>Open </B>from the menu or drag & drop the files.</p> 21<h3>Check the Sample Data</h3> 22<p>By connecting to the Viewer, the loaded sample data will display.</p> 23<p>Switch the animation on the Viewer to separately play <CODE>RedFading.cmata</CODE> and <CODE>Run.cskla</CODE>.</p> 24<p><img src="images/animation_check.png" alt="Checking the two animations" /></p> 25<p><a name="viewer_basics" id="viewer_basics"></a></p> 26<h3>Basic Operations of the Viewer (3D Mode)</h3> 27<p>This is how to use the system Controller.</p> 28<table class="toolbar"> 29 <caption> 30 Camera Operations 31 </caption> 32 <thead> 33 <tr> 34 <th>Key Operations</th> 35 <th>Description</th> 36 </tr> 37 </thead> 38 <tbody> 39 <tr> 40 <td>Slide pad</td> 41 <td>The camera rotates around the viewpoint.</td> 42 </tr> 43 <tr> 44 <td>+Control Pad Up/Down</td> 45 <td>Slides along the world y-axis.</td> 46 </tr> 47 <tr> 48 <td>+Control Pad Left/Right</td> 49 <td>Slides along the world x-axis.</td> 50 </tr> 51 <tr> 52 <td>Lower screen (right side 4/5)(Touch panel)</td> 53 <td>Slides in the camera's XY direction.<br /></td> 54 </tr> 55 <tr> 56 <td>Lower screen (left side 1/5)(Touch panel)(up/down)</td> 57 <td>Slides along the world y-axis.<br /></td> 58 </tr> 59 <tr> 60 <td>X Button or Y Button</td> 61 <td>Moves closer toward the look-at point (X Button).<br /> Moves further away from the look-at point (Y Button).</td> 62 </tr> 63 <tr> 64 <td>L Button + Slide pad</td> 65 <td>Slides along a plane parallel to the world XZ plane.</td> 66 </tr> 67 <tr> 68 <td>L Button + Lower screen (right side 4/5)(Touch panel)</td> 69 <td>Tilts the camera.</td> 70 </tr> 71 <tr> 72 <td>L Button + Lower screen (left side 1/5)(Touch panel)(up/down)</td> 73 <td>Slides along the world y-axis.</td> 74 </tr> 75 <tr> 76 <td>L Button + X/Y Button</td> 77 <td>Advances toward the look-at point (the look-at point moves at the same time) (X Button)<br /> Recedes in the opposite direction of the look-at point (the look-at point moves at the same time) (Y Button)</td> 78 </tr> 79 <tr> 80 <td>L Button + START/SELECT Button</td> 81 <td>Resets the camera position to its initial state.</td> 82 </tr> 83 <tr> 84 <td>R Button + A Button</td> 85 <td>Switches the View camera.<br /> When the View camera is switched, the operating cameras and lights also switch. </td> 86 </tr> 87 <tr> 88 <td>R Button + X Button</td> 89 <td>Switches the operating cameras and lights.</td> 90 </tr> 91 </tbody> 92</table> 93<table class="toolbar"> 94 <caption> 95 Animation Operations <br />If a model/scene and animations have been loaded, then the animation can be operated. 96 </caption> 97 <thead> 98 <tr> 99 <th>Key Operations</th> 100 <th>Description</th> 101 </tr> 102 </thead> 103 <tbody> 104 <tr> 105 <td>A Button</td> 106 <td>Starts/stops playback of all displayed model/scene animations. </td> 107 </tr> 108 <tr> 109 <td>B Button</td> 110 <td>Stops all model or scene animations being displayed and resets to frame 0. </td> 111 </tr> 112 <tr> 113 <td>R Button + Y Button</td> 114 <td>Switches the selected model/scene.<br /></td> 115 </tr> 116 <tr> 117 <td>L Button + R Button + X Button</td> 118 <td>Switches the selected model/scene animation.</td> 119 </tr> 120 <tr> 121 <td>L Button + R Button + A Button</td> 122 <td>Starts/stops playback of the selected model/scene animation.</td> 123 </tr> 124 <tr> 125 <td>L Button + R Button + B Button</td> 126 <td>Stops the selected model/scene animation and resets the frame to 0. </td> 127 </tr> 128 <tr> 129 <td>R Button + +Control Pad (Up/Down)</td> 130 <td>Moves the position of the operating cursor.<br /> Moves in the following order: resource name, animation name, animation frame, playback rate. </td> 131 </tr> 132 <tr> 133 <td>R Button + +Control Pad (Left/Right)</td> 134 <td>Changes the operating cursor items.<br /> Items:<br />Resource name: Switches the selected model/scene.<br /> Animation name: Changes the displaying animation.<br /> Animation frame: Steps the model/scene animation forward/backward by the playback-rate number of frames.<br /> Playback rate: Increases/decreases the animation playback rate. </td> 135 </tr> 136 <tr> 137 <td>L Button + R Button + +Control Pad (Left/Right)</td> 138 <td>Increases/decreases the values of operating cursor items for just the selected model/scene.<br /> Items:<br />Animation frame: Steps the selected model/scene animation forward/backward by the playback-rate number of frames.<br /> Playback rate: Increases/decreases the selected model/scene animation playback rate. </td> 139 </tr> 140 <tr> 141 <td>R Button + START/SELECT Button</td> 142 <td>Toggles the looped playback feature on/off for <I>one-time</I> animations.</td> 143 </tr> 144 <tr> 145 <td>Lower Screen (Lower part)(Touch panel)</td> 146 <td>Operates the animation slider bar.<br /></td> 147 </tr> 148 </tbody> 149</table> 150<p class="new_hint"><B>Note:</B> To read about Viewer operations in more detail, select <B>Help </B>> <B>Viewer Help</B> from the 3DEditor main menu.</p> 151<h2>Creating an Animation Set</h2> 152<p>Right-click on <CODE>Male.cmdl</CODE> displayed in File View and select <B>Create Animation Set</B>.</p> 153<p>This opens the dialog for creating an animation set. Enter <I>Run </I>as the name.</p> 154<p><img src="images/animation_set.png" alt="The Create Animation Set dialog box" /></p> 155<p>When you press <B>OK</B>, the animation set named <I>Run </I> gets created in the child hierarchy for <CODE>Male.cmdl</CODE>, so now drag & drop <CODE>RedFading.cmata</CODE> and <CODE>Run.cskla</CODE> to there.</p> 156<p><img src="images/animation_set01.png" alt="Animation files are moved" /></p> 157<p class="new_hint"><B>Note:</B> When you conduct the drag & drop operation a dialog displays to confirm the action. You can perform the operation without this dialog displaying by holding down the Shift key while dragging and dropping. </p> 158<p>Once <CODE>RedFading.cmata</CODE> and <CODE>Run.cskla</CODE> have been moved to the <I>Run </I>animation set, the animation shown in the Viewer switches to <I>Run</I>.</p> 159<p>In the Viewer you can confirm that <CODE>RedFading.cmata</CODE> and <CODE>Run.cskla</CODE> play at the same time.</p> 160<p><img src="images/animation_set02.png" alt="Playback of the set animations" /></p> 161<h3>Playing Skeletal Animations at Same Time</h3> 162<p>Load the following animations into 3DEditor:</p> 163<p>%NW4C_ROOT%/SampleData/Graphics/Intermediate/ProgramResource/Male</p> 164<ul> 165 <li><CODE>RunUpper.cskla </CODE>(Skeletal animation)</li> 166 <li><CODE>WalkLower.cskla</CODE> (Skeletal animation)</li> 167</ul> 168<p>Create a new animation set named <I>RunWalk </I> and then register <CODE>RunUpper.cskla </CODE> and <CODE>WalkLower.cskla</CODE>.</p> 169<p><img src="images/animation_set03.png" alt="Simultaneous playback of skeletal animations" /></p> 170<p>By switching the animation shown in the Viewer to <I>RunWalk</I>, you can confirm that the two skeletal animations play at the same time.</p> 171<h3>Registering an Animation to Multiple Animation Sets</h3> 172<p>This section explains how to register one animation to a number of animation sets.</p> 173<p>While pressing the Ctrl key, click on the animation <CODE>RedFading.cmata</CODE> that is registered in the <I>Run</I> animation set and drag & drop it to the <I>RunWalk </I> animation set.</p> 174<p><img src="images/animation_set04.png" alt="Registering in multiple animation sets" /></p> 175<p class="new_hint">By moving a file while depressing the Ctrl key, you can register a single animation to multiple animation sets.</p> 176<p>By switching the animation shown in the Viewer to <I>RunWalk</I>, you can confirm that a red light blinks (the animation of <CODE>RedFading.cmata</CODE>) while the two skeletal animations play at the same time.</p> 177<h3>Saving Animation Sets</h3> 178<p>When you save <CODE>Male.cmdl</CODE>, the animation sets also get saved, and the next time you open <CODE>Male.cmdl</CODE> the animations sets will be loaded automatically.</p> 179<hr><p>CONFIDENTIAL</p></body> 180</html> 181