Advanced Models SDK

3D Studio Max and ActorX

Relevance

This page is relevant to:
Modellers exporting Unreal Tournament models from 3D Studio Max using ActorX

Requirements for this Tutorial

: This tutorial was based on separate tutorials provided by Laura Smith and Richard 'vajuras' Osborne. I don't actually have 3DS Max, so I can't confirm or deny most of this info. --Psychic_313
[Image: The Saurian model from UT mod GODZ]

The character shown above was created for the GODZ fighting game addon for Unreal Tournament. The model was created by The Lamb and skinned by Disector. Finally, it was animated by yours truly [vajuras] using the ActorX plugin for 3D Studio MAX R4. This is the fifth character I have imported into Unreal Tournament using Actor X. It's a very simple plugin to use but my hope is to also cover some of its more advanced features.

What is ActorX?

Actor X is a plugin for animators that allows us to bind our models to a biped/bone hierarchy and allows the importation of actual skeleton and the data (animation) associated with it. If you desire to just use the Epic Animations, ActorX makes that possible. All you have to do is go get the skeletons Epic used (they are available at epicknights downloads section), and bind your mesh to it. This means all you need to do is import a small PSK file, which Actor X produces, into UT.

However, if you wish to use original animation with your model, you probably want to go ahead and use your own biped. All animations are saved independantly of your model to a psa file. PSA files store raw bone-animation data. PSAs can theoretically be used by other models that do not use the skeleton you used to create it- however, the model will probably look really distorted. Unlike bip files used by 3ds max, psa files are specific to the skeleton you used to produce it. We will review other circumstances that can cause mesh distortion as well.

3DS Max model requirements

Scaling

There are no special requirements for scaling (all those who've used older Unreal tools and suffered from the 256x256x256 limit can breathe a sigh of relief at this point). It may be easiest to work in Unreal scale, which is 16 units:1 foot. This will translate over to Unreal 1:1 without further scripting. However, you can scale the model later with #exec commands.

The Model

Animation sequences

If you're making a player model with Advanced Model Support, you must have all the animations specified in the AMS animation list, and the group names (see later) must also be the same as those in the list.

If you're working on a larger mod, the programmer resonsible for that part of the mod should be able to tell you what sequences and group names they need.

All the animations should be in the same file, one after another. The order and precise number of frames are not important as long as 1-frame sequences only ever have one frame, and multi-frame sequences have three or more frames.

The Textures

TRANSLUCENT - this will allow translucency that is controlled by UnrealScript.

TWOSIDED - this will make your material two-sided (so it's visible from both sides). This is ideal for bits of a model which have no thickness, such as a cloak, as you can get away with fewer polygons.

MASKED - this will make areas with colour 0 transparent. Masked materials are automatically two-sided too. Unconfirmed: to make masking work on non-Glide renderers, you need to make the entire material masked, for example using only SKIN00.MASKED with no SKIN00 areas.

UNLIT - this makes the area unaffected by ambient light. If it's dark, it will always look dark regardless of its surroundings; if it's light, it will always appear light regardless, and will appear to glow in the dark (this can be a cool effect for things like glowing eyes).

MODUL - modulated (what does this do?)

ENVIRO or MIRROR - environment mapped (shiny). The environment-mapping texture is taken from the Actor's UnrealScript Texture variable.

NOSMOOTH - don't apply bilinear filtering (could be used for really sharp lines or pixellation, like a model of a computer screen).

In order to use one of the above flags, the texture name should look like "SKIN00.TWOSIDED". After the dot you type the flag you want to use. Use either all upper or all lower case letters.

Fitting the Skeleton Inside the Mesh

Yep, everyone's favorite part. Your first step is to fit your biped inside of your mesh. You can do this part like normal. You do not have to rename the bones or anything. Notice I've placed two extra bones in the head area. These boxes will be used to help me animate the character's mouth. You'll find the average model will not require you to add any bones. However, since this guy has an animatable mouth, we probably should animate that too, huh? In order to add extra bones to your biped, all you have to do is create a box primitive and Select and Link the bone to the bone in the hierarchy you want it to inherit motion from. For Saurian's jaw bones, I linked them to the Head object. When you right click on the new bone, go to Properties. The parent for the bone should indicate the correct parent bone. Lastly, I linked dummy objects to my new jaw bones to serve as end-effectors.

Saurian with some linked bones

As far as I can tell, the normal restrictions that 3ds2unr enforces doesn't seem to apply to ActorX. For instance, I never bother scaling down my characters anymore. Violating the old 256x256x256 bounds seems to be alright. I always find myself adjusting the scale of the character in the UnrealScript code anyway.

Select your mesh and apply the Physique Modifier. In the popup, make sure you set the Vertex Assignment to Rigid and Blending to 3 Links. Click the Initialize button.

Physique popup

Okay, you know the drill for this part. Go ahead and assign those vertices to the correct bone. If you did a really exceptional job fitting the biped inside the mesh however, you should not have reassign too many vertices. At this point, I always tend to get really excited, cause the character is always just one step away from getting into Unreal Tournament....

Using Actor X

Now that you have wrestled with Physique and got your character running around to perfection, we can start getting him ready for Unreal Tournament. The first step is to export the skeleton for your character. If it will be using a preexisting animation base (psa) that already exists in UT, then this may be your final step.

Go to Utilities->ActorX. Click the browse button and choose a folder. Now, type in the name of the character into the mesh name text field.

ActorX

When you export the skeleton/mesh pose (PSK) to Unreal Tournament, I highly recommend choosing a frame from one of the model's animations. If you don't, you mesh may end becoming distorted. Next, ensure that all the materials for your mesh are properly named. Go to the Material Editor and hit the Get Material button. Once your multimaterial is loaded, go ahead rename all the materials to the texture naming format ActorX requires. For instance, for normal, one sided textures name your materials Skin0 -> SkinX. SKIN0 is the very first material. Keep the names in sequential order. This way, it's easy to figure out which bitmap goes to what material in Unreal.

When you hit the Save mesh pose button the PSK file will be generated. Also, ActorX will generate a log file named after your model. So, Saurian's log file is named X_ModelInfo_saurian. Let's look at what the log tells us:

 Unreal skeletal exporter - Model information for [saurian.psk] 

 Skin faces:   2034
 Skin vertices:   1061
 Skin wedges (vertices with unique U,V):   1451
 Total bone-to-vertex linkups:   2577
 Reference bones:     52
 Unique materials:      4

 = materials =
 * Index: [ 0]  name: SKIN0  
   Original bitmap: SNAPF.bmp  Path: C:\UnrealTournament\Godz\Disector\skinz\Komodron
    - Skin Index:  0
   - LOD Bias:    5
   - LOD Style:   0
   - render mode flags:
 * Index: [ 1]  name: SKIN1  
   Original bitmap: SNAPB.bmp  Path: C:\UnrealTournament\Godz\Disector\skinz\Komodron
    - Skin Index:  1
   - LOD Bias:    5
   - LOD Style:   0
   - render mode flags:
 * Index: [ 2]  name: SKIN2  
   Original bitmap: SNAPA.bmp  Path: C:\UnrealTournament\Godz\Disector\skinz\Komodron
    - Skin Index:  2
   - LOD Bias:    5
   - LOD Style:   0
   - render mode flags:
 * Index: [ 3]  name: SKIN3  
   Original bitmap: SNAPL.bmp  Path: C:\UnrealTournament\Godz\Disector\skinz\Komodron
    - Skin Index:  3
   - LOD Bias:    5
   - LOD Style:   0
   - render mode flags:

The one thing I always pay attention to is the Skin Index property. Make sure they increment from 0 -> X. For my character, I have 4 textures. So, the number increments from 0 -> 3.

When the model is ready for export to the PSK file, you will have to rename all of your sub-materials (I'm assuming your character uses more than 1 skin but it should not matter). Anyway, below is a visual example of ensuring your materials are in sequential order.

ActorX

Notice how the material names are titled SKINx

From this point on, if you will be using the Epic animations, you can probably get away with the Milkshape 3D compiling instructions as the #exec script is probably the same. If you are doing original character animation for your character, you'll need to export that too...


Previous page

Starting a project

Next page

Back to index


AMSDK compiled by Simon `Psychic_313' McVittie, http://www.pseudorandom.co.uk
This page by Laura Smith, Richard 'vajuras' Osborne and Simon McVittie