On this page |
|
In the animation workflow, users can add characters and animation to a scene, transfer animation to characters through motion retargeting, and play back scene animation. The animation scene, along with the characters and other scene elements, are organized in the packed character format.
An example file that demonstrates the animation workflow is available here.
Basic animation scene setup ¶
The following is the basic workflow for adding a character to a scene, performing animation, and playing back the animation:
character
subnet
In our example, the character
subnet contains a set of character elements (skeleton, shape, rig). We can view the contents of this node in the rig tree view:
-
Select the
character
node in the network editor. -
Open the rig tree view. At the top of a pane, click the New Tab icon, and select New Pane Tab Type ▸ Animation ▸ Rig Tree.
-
From the Type drop-down menu, select Packed Folders. We have the following packed folder structure:
/ -- Base.rig -- Base.shp -- Base.skel
The APEX Scene Add Character SOP adds the character elements to a character (.char) folder in the packed character format. This character is then added to the animation scene.
-
Specify a name for the character:
-
On the APEX Scene Add Character SOP, update the Character Name parameter.
or
-
Rename the APEX Scene Add Character SOP, which will update the Character Name parameter by default.
-
-
Select the APEX Scene Add Character SOP,
add_character
, in the network editor. In the rig tree view, we have:/ -- character.char/ -- Base.rig -- Base.shp -- Base.skel
The animate state on the APEX Scene Animate SOP allows you to display, pose, and animate the characters in a scene. To enter the animate state, select the APEX Scene Animate SOP, turn on its display flag, and click Animate on the left toolbar.
Note
The animation in the scene can be played back on this SOP only while in the animate state. Once you exit the animate state, the animation cannot be played back. To play the animation outside of the animate state, use the APEX Scene Invoke SOP.
The APEX Scene Invoke SOP allows you to play back the animation in the scene:
-
Select the APEX Scene Invoke SOP and turn on its display flag.
-
Click Output All Character Shapes, which finds all the characters in the scene and merges their shapes together.
-
Press Play on the playbar to see the animation on the character.
Add multiple characters to a scene ¶
Bring multiple characters into an animation scene using an APEX Scene Add Character SOP for each character:
-
On each of the APEX Scene Add Character SOPs, specify a name for the character in the Character Name parameter.
-
On the APEX Scene Invoke SOP, click Output All Character Shapes to display all the characters in the scene.
Note
If you add a character into a network that already has an APEX Scene Invoke SOP, you need to click Output All Character Shapes for the new character to be displayed in the viewport.
Setup for the Electra test geometry ¶
-
Put down an Electra Test Geometry SOP in the network editor.
-
On the Electra SOP, set Output to APEX Scene. This outputs Electra in an animation scene.
-
Select the Electra SOP and click Animate on the left toolbar to enter the animate state. An APEX Scene Animate SOP will automatically be placed after the Electra SOP:
To play back your animation:
-
Add an APEX Scene Invoke SOP:
-
Select the APEX Scene Invoke SOP and turn on its display flag.
-
On the APEX Scene Invoke SOP, click Output All Character Shapes.
-
Press Play on the playbar to see the animation.
Add multiple Electras to a scene ¶
To add multiple Electra characters to a scene, use an APEX Scene Add Character SOP for each Electra:
-
On the Electra SOPs, set Output to APEX Character.
-
On each of the APEX Scene Add Character SOPs, specify a name for the character in the Character Name parameter.
-
On the APEX Scene Invoke SOP, click Output All Character Shapes.
Import existing animation onto a character ¶
If you already have existing animation, you can use the APEX Scene Add Animation SOP to import the animation onto a character:
In the Rig Path parameter, specify the rig to put the animation on by selecting from the Rig Path drop-down menu. In our example, we set Rig Path to /character.char/Base.rig
.
The animation is added to the scene in the form of channel primitives. Channel primitives are animation curves that are stored along with the geometry and are optimized for use in the animate state.
In the animate state, you can see the animation that is added to the character. The animation data is available in the animation editor graph view as curves that you can edit. To perform additional animation on top of the imported animation, you can pose the character in the animate state, or manipulate the channel data directly in the animation editor.
To work in the animation editor:
-
Enter the animate state.
-
In the viewport, select the controls on the character. Channel data for the controls will be added to the channel list, and you can interact with them in the animation editor graph view.
Add animation to a character ¶
You can add animation to a character by extracting the character’s skeleton control hierarchy, and using the Rig Pose SOP to pose the character and add keyframes.
In this example, the animation is not added back into the scene:
Extracts the control hierarchy of the skeleton:
-
Turn on Extract From Folder.
-
Specify the rig in Graph Geometry Path. In our example, we set Graph Geometry Path to
/character.char/Base.rig
. -
Specify the controls to extract in the Group parameter. If you leave the Group parameter as the default, the entire control hierarchy on the rig is extracted.
Use the Rig Pose SOP to pose the character and set keyframes. To see the character while posing, set up the APEX Scene Invoke SOP (below) and turn on its display flag.
Updates the skeleton controls with the animation performed on the Rig Pose SOP. The APEX Control Update Parms SOP is used together with the APEX Control Extract SOP to update the controls on the skeleton.
Play back the animation on the character:
-
Select the APEX Scene Invoke SOP and turn on its display flag.
-
Click Output All Character Shapes to display all the characters in the scene.
-
Specify the rig to put the animation back onto in the Animation Target parameter. In our example, we set Animation Target to
/character.char/Base.rig
. -
Press Play on the playbar to see the animation on the character.
Add additional animation on top of the Rig Pose animation ¶
To add additional animation on top of the Rig Pose animation, we first save the Rig Pose animation as channel primitives, and add these channel primitives into the scene. We can then perform additional animation using the APEX Scene Animate SOP:
Creates a MotionClip from the skeleton animation.
Channel Primitives from MotionClip SOP
Creates channel primitives from the MotionClip and adds a keyframe on every MotionClip pose.
Adds the animation from the channel primitives onto the character.
In the animate state, you can see the Rig Pose animation on the character. The animation data (from the channel primitives) is available in the animation editor graph view as curves that you can edit.
If too many keyframes are added by the Channel Primitives from MotionClip SOP, use the Reduce Resample tool on the animation toolbar to reduce the number of keyframes:
-
Select the control(s) in the animate state.
-
In the animation editor graph view, select the keys.
-
Adjust the Reduce Resample tool slider.
Retarget animation onto a character ¶
The APEX Control Extract SOP extracts the skeleton control hierarchy of a character and outputs a KineFX skeleton. We can then use any of the KineFX SOPs to modify the transforms of the skeleton, and put the updated transforms back onto the skeleton using the APEX Control Update Parms SOP.
We can use this workflow to retarget animation onto a character in a scene:
How-to ¶
To... | Do this |
---|---|
Test the state of the scene |
Use the APEX Scene Invoke SOP to test out the state of the scene:
|
Add keyframes only on the key poses when creating channels from a MotionClip |
Add a MotionClip Extract Key Poses SOP after the MotionClip SOP in this setup. |
Save a scene to a file |
|
Use a scene file |
|