UDN
Search public documentation

ImportingAnimationsTutorial
Licensees can log in.

Red links require licensee log in.

Interested in the Unreal engine?
Check out the licensing page.

Questions about UDN itself?
Contact the UDN Staff

Importing Animations Tutorial

Document Summary: A tutorial on how to get mesh animations into the Unreal Engine from PSA files, as well as placing SkeletalMesh Actors in a level.

Document Changelog: Created and updated by James Golding.

Introduction

This document serves as an introduction to the Unreal Engine 3 art pipeline, as it applies to animations. Most attention will be directed toward features and procedures particular to the new engine. Features that have not changed in the new engine are discussed in detail elsewhere in UDN.

Exporting Content

In Unreal Engine 3, Animation sequences are exported from Maya or MAX using the ActorX plugin.

Getting Content Into the Engine

Importing Animations

In Unreal Engine 3, PSA files are imported as a number of AnimSequence in an AnimSet object. AnimSets appear in the Generic Browser in the same way as materials or static meshes.

animsetinbrowser.jpg

Creating a new AnimSet

Before you can import a PSA file, you will need to create an AnimSet for them. There are several ways to create a new AnimSet:

  • In the Generic Browser, right click on the background and choose New AnimSet. Enter the name you want for your new AnimSet, and the package you want to put it in.

newanimsetcontext.jpg

  • From the File menu in the Generic Browser, select New, and then choose AnimSet in the Factory combo box. Enter the name for the new AnimSet and the package.

newanimsetfactory.jpg

  • If you already have the AnimSetViewer open you can select New AnimSet from the File menu. Again, enter the new name for the AnimSet and the package file to put it in.

ASV_newanimset.jpg

Opening the AnimSetViewer

You use the AnimSetViewer tool to import PSA files into an existing AnimSet. To open the tool you can:

  • Double-click on the AnimSet in the Generic Browser or select 'AnimSet Viewer' from the its context menu. It will open the AnimSetViewer selecting that AnimSet and find a suitable SkeletalMesh from those loaded to play it on.
  • Double-click on a SkeletalMesh or select 'AnimSet Viewer' from its context menu. If your AnimSet can be played on the selected mesh it will be in the AnimSet combo box on the left.

Importing Your PSA File

Once the AnimSet you wish to import your animations into is selected, select Import PSA from the File menu. Then select the PSA file(s) you wish to import and press OK. You should see the new sequences added to the sequence list box on the left.

When you have a new AnimSet, the first animation you import defines the 'track table' for the AnimSet. All subsequent animations you import will be conformed to this table. If you import a PSA file which contains a track which is not in the target AnimSet track table, it will offer to expand the track table to include this new name with the message:

Extra track (...) found in PSA but not in AnimSet. 
Would you like to add this track to all existing animations using the selected SkeletalMesh reference pose?

Because all AnimSequences in an AnimSet must have the same number of tracks, it must also 'create' a track for all existing AnimSequences in the set. It does this using the reference pose of the selected SkeletalMesh. Conversely, if you try and import a PSA which is missing a track that is in the table of the target AnimSet you will get the message:

Could not find needed track (...) for this AnimSet. 
Would you like to use the selected SkeletalMesh reference pose to create the track?

This will create a new track for that AnimSequence using the reference pose of the selected SkeletalMesh.

Using The AnimSetViewer

You can view different skeletal meshes by choosing them from the combo box in the top left. The box shows all currently loaded SkeletalMeshes. It will try and play the selected AnimSet on the new skeletal mesh, but if this is not possible it will generate a warning.

The AnimSet combo will show you all the AnimSets that can be played on the selected SkeletalMesh.

You can play a sequence by selecting the sequence in the list box on the left. The number to the right of each sequence is the number of frames.

The bottom of the screen shows information about the currently selected SkeletalMesh, AnimSet and AnimSequence. It also shows you the current preview position in the animation (in seconds).

There are number of tools in the AnimSetViewer that allow you to rename, delete etc. the selected AnimSequence. Remember though that the game code will refer to animations by name, so changing their name may break your game!

Placing Skeletal Mesh Actors In A Level

It is now quite easy to place a Skeletal Mesh Actors in a level.

  • Select the SkeletalMesh in the Generic Browser.
  • Right click in the level, go to 'Add Actor' and choose 'Add SkeletalMesh'. You should see your mesh appear in the level.

The easiest way to play an animation on it is to use a Matinee action and an Animation Control track. See the Matinee User Guide for more information.

Useful Console Commands

show bones - shows bones locations used to render skeletal mesh.