UDN
Search public documentation:
AnimBrowserTutorial
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
Animation Browser Tutorial (.UKX Creation)
Document Summary: A guide to using the Animation Browser. Document Changelog: Last updated by Tom Lin (DemiurgeStudios?), document creation. Original author was Tom Lin (DemiurgeStudios?).Making .UKX Files
Creating .UKX's is the final step for character artists working in the Unreal Engine. They combine the skeletal mesh rigging (.PSK) with the animation files (.PSA) and link back to the texture files, as well (.UTX). When you're finally finished, you'll have just a .UKX and a UTX file. This document will provide the user with a step-by step guide to creating a working .UTX file, as well as the process for getting a `quick and dirty' version of a character model into a game. For more in-depth information about the options and capabilities of the animation browser, go to this doc: AnimBrowserReference.Preparation
Before you dive into the animation browser, it's a good idea to make sure that you have all the required bits that go into it. If you are missing pieces, all is not lost - the beauty of the .UKX format is that incomplete or rough material can be changed or added to, without having to go through the entire creation process again. Here is what you'll want to have on hand:- .UTX file with appropriate textures
- .PSK file with character model and rigging
- .PSA file with character animations
The Animation Browser
When you first launch Unreal, the texture browser will already be opened for you. The animation browser is accessible from the same location - just click the `Animations' tab to open it up. It is also possible to open it with the `View' drop down menu from the main Unreal window.Importing the Model and Rig (.PSK)
This is very straightforward. Go to `File' > `Mesh import' in the animation browser. Locate your .PSK file, then import it into the browser. You could also use the mesh import button in the toolbar. When you select the .PSK, you'll see a window like this one. There are a few fields here that could use some explanation.- Package: This will be the name of the .UKX file itself, which can hold many different models and their associated animations. For example, if I were making a military game, I could have put the rifleman, scout, and sniper models in one .UKX file, under the overriding package name, "Soldiers." A non-existing package name will result in the creation of a new one.
- Group: You cannot group items in a .UKX file. Ignore this field. It is advised that separate .UKX files be used if you need to group your models.
- Name: This is what your individual models will be called once they are imported into the .UKX file. In other words, this will be the Sniper/Scout/Rifleman, who resides within the larger Soldiers package. Note that it is possible to name two models with the same name, if they are in different packages. For example, `Scout' in package `AmericanTroops.UKX' and `Scout' in package `RussianSoldiers.UKX.' Confusing, but possible.
Importing the Animations (.PSA)
The next step is to import the suite of animations that will be linked to the model. Use the Import/Append animation buttons or go to `File' > `Animation import' and find the .PSA file that corresponds to your model. You'll see an import window open up.- Package: Make sure that the package name is correct, it should be the same name you just used when you imported your .PSK.
- Name: This is the name of your animation set. In theory, you could organize your animations for specific models with multiple .PSA's - but in practice, this is never done. It's common practice to have just one set that is extremely large, with all the possible animations for a model contained within.
- Merge sequences into existing: This option lets you append new animations to an existing list. If you don't have an existing list of animations for a model, don't have this option checked, it will generate an error.
- Overwrite existing sequences: This is pretty obvious. If you've tweaked an animation, make sure to have this checked on re-import.
Linking the Mesh and Animation
So you have your mesh and your animation, both loaded and ready to go. Before you can play the animations, there is one last step. In the `Edit' menu choose `Linkup anim and mesh' to (you guessed it) link the animations to the mesh. If this worked correctly, you should see the model snap into the first frame of your selected animation. Once this is done, you can hit the `Play' button at the bottom of the window to see the animation in action.Texture Assignment
Upon importing your model, you may find that it doesn't have the right texture on it - it's got that grayish default texture on instead. Fixing this is pretty simple. First of all, go to the texture browser and open the appropriate .UTX file. Click on the desired texture (or if you have several materials, any of them will do) so that you see a border appear around it in the browser window. With the texture still selected, go back to the animation browser. On the right side of the window, there are a number of tabs - select the first one, `Mesh.' At the bottom of the window you'll see `Skin,' which will open up to a list of the different material IDs that are contained in your model. Click one of the ID numbers and then click the `Use' button that appears. You should see your model update with the previously selected texture from the material browser. It's possible that you may choose the wrong texture for the material ID you've got selected. In this case, simply go back to the texture browser, select the correct skin and reassign it.Minor Tweaks
The animation browser is crammed full of useful functions, ranging from notifies to setting collision to attachments. Going through all of these is beyond the scope of this document, for a more complete listing and explanation, see the AnimBrowserReference doc. In this section, some of the more common introductory complaints will be addressed.Rotating the Mesh
It's common for skeletal meshes to come in rotated incorrectly. The `front' viewport in 3D Studio Max doesn't correspond to what Unreal calls the front view, for instance. Luckily, this is fairly easy to correct. In the `Mesh' tab on the right there is another `Mesh' section. If you open it up, you will see that you can expand `Rotation' to expose independent `Pitch,' `Roll' and `Yaw' values. To rotate about the Z-axis, use the Yaw value. The values that Unreal is using to rotate aren't simple degrees, unfortunately - you'll have to put the rotation amounts in Unreal Units (URUs).- 45� : 8192 URUs
- 90� : 16384 URUs
- 180� : 32768 URUs
- 360� : 65536 URUs