UDN
Search public documentation:

ImportingAnimationsTutorial
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Animation > Importing Animations Tutorial
UE3 Home > Animators > Importing Animations Tutorial

Importing Animations Tutorial


Overview


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 AnimSetEditor

You use the AnimSetEditor 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.

When importing an animation that has been used to create an Additive one (by being either a Target Pose or a Base Pose), then the editor will prompt the user to rebuild the related Additive Animations automatically. This is a new feature as of December 09 QA build. If you have just upgraded, and your animations don't have the necessary references, you can run the FixAdditiveReferences commandlet to attempt to rebuild them.

Find out more about Additive Animation there: AnimationOverview#AdditiveAnimation

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!