Playing animations on entities in the Track View

In most cut-scenes, it is far easier to bring in authored animation on characters and even objects from a DCC tool such as 3ds Max.

To be able to play these animations back in the Track View is a valuable tool as it allows for more customization in what they want to achieve.

Getting ready

You must have created a new cut-scene in a level and added a camera to it.

How to do it...

Let's play some animation on an entity in the Track View:

  1. Add an object of interest to the scene, for the camera to focus on.
  2. In this example, you will add a human character, with a simple animation.

    Note

    For characters in cinematics, an AnimObject is used, as opposed to an AI Entity, for performance reasons. Also, because an AnimObject doesn't have AI, the AI system won't conflict/fight with the Track View system.

  3. Select the AnimObject in the RollupBar and drag it into the level. With the AnimObject selected, click Entity Properties in the RollupBar and set the string of the model to a human character.

    objects/characters/neutral_male/sdk_character_male.cdf

  4. In the Track View, click the Add Selected Node icon. With the AnimObject added, you can now add an animation track to animate the character.
  5. Right-click the entity and on the Add Track menu, click Animation.
  6. Select an animation for the character.
  7. Double-click at frame 0 to add a key in the event track, and then select the key to bring up the Key Properties section.
  8. Then, from the drop-down list, select the standup_tocombat_nw_back_01 animation:
    How to do it...

How it works...

The AnimObject entities can have the animation track, which allows us to add pre-authored animations to the entity in the game. This is preferable for many cut-scenes where AI would be inefficient or difficult to perform the exact same movements at the right times.

It is typical to hide an AI entity and then to unhide the AnimObject version of the AI for the cut-scenes.

There's more...

You may want to know how to set up a looping animation or how to adjust the start time and time scale for the animation on the entity.

Loop animation

Should you want the animation asset to loop on the character, you can simply set the loop Boolean to True. This will loop the asset until told to stop.

Start time

You can manually set a time in the start time dialog to go to a certain frame of the animation. This can be useful for different facial sequences as well as for climbing animations.

Time scale

Using time scale, you can adjust the speed of animation to faster or slower than originally intended. When adjusting the time scale, you will notice that the animation track will extend the length of the selected animation when the loop is not selected.

Time scale

See also

  • Go to the Animating entities in the Track View recipe in this chapter to learn how to animate objects manually
  • You should go to the Creating a new Track View sequence recipe earlier in this chapter to learn how to create new sequences
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.130.199