Additive animation
IntermediateDesigner Additive animation is the process of combining animations using difference clips (also known as additive animation clips). Walk animation. The rightmost animation is the Idle animation. The two animations in the center are the Walk and Idle animations respectively, but have the Reload animation added to them. Walk, Idle, and Reload. Additionally, we can add the Reload animation to other suitable animations (eg Crouch, Strafe or Run). This helps keep the memory budget and number of animations low.
Difference clips
difference clip describes the difference between two animation clips: a source and a reference. Reload animation above, which we want to add to other animation clips. This is our source clip (S). Because the Reload animation mainly involves the arms, it will blend well with animations that don’t involve the arms (such as idling and crouching). We can use one of these animations — let’s say the Idle animation — as our reference clip (R). difference clip (D). The difference clip encodes the difference between the source and reference clips. We can express it as D = S - R. other animations. If the animation you add it to is sufficiently similar to the original reference clip, then the animations blend effectively. For example, you could use it to add the reload animation to any animation that doesn’t use the arms, such as crouching.
Note
Additive animations should use the same skinned mesh and skeleton.
Create a difference clip
- Asset View (at the bottom by default), click Add asset and select Animations > Animation. A browser dialog opens.
- Cancel. Game Studio asks if you want to create an animation without a source file.
- Yes. Game Studio adds a new empty animation asset to the Asset View.
- ReloadAdditive.
- Asset View (bottom pane by default), select the animation asset you created.
- Property Grid (on the right by default), add the Source animation clip. This is the animation you want to apply to other animations.
Note
not the animation asset that references it. Animation files are usually saved in the Resources folder. - Type, choose Difference Clip.
- Reference, specify the animation you want to use as your reference clip. This is the animation Xenko references to create a difference clip.
Mode from the drop-down menu.
Animation creates a difference clip from the entire source animation, referencing it frame by frame.
- FirstFrame creates a difference clip from only the first frame of the source animation, as a still pose.
- Skeleton, specify a skeleton for the difference clip. This should be a skeleton that works for all the animations you want to blend with the difference clip. In most cases, you should use the same skeleton you used for the source and reference animations.
- Preview the animation in the Asset Preview,specify a Preview model suitable for the animation.
Note
The Asset Preview shows only the source animation you specify in the difference clip.Use an additive animation
You can use additive animations with animations that use the same skeleton and skinned mesh. - Asset View (in the bottom pane by default), click Add asset.
- Scripts > Animation Start. AnimationStart is a startup script you can use to load animations into your model, including additive animations. For more information, see Animation scripts.
- Recompile your project to apply the changes.
- scene view, select the entity you want to animate.
Note
To animate an entity, the entity must have a model component. - Property Grid (on the right by default), click Add component and choose Animations. Game Studio adds an animation component to the entity.
- Add component and choose the Animation Start script. The script lets you customize a list of animations to be loaded into your entity.
- Animation Start properties, next to Animations, click (Add).
- Clip, specify the source animation you set in the difference clip.
- Add to Animations, click (Add).
- Clip, specify the reference animation you set in the difference clip.
- Blend Operation, select Additive.
-
See also
- Animation index
- Import animations
- Animation properties
- Set up animations
- Preview animations
- Animation scripts
- Procedural animation
- Custom blend trees
- custom attributes
