|
|
|
|
|
Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.
|
|
|
|
ActorXTutorial |
|
|
|
|
|
Licensees can log in.
Interested in the Unreal engine? Check out the licensing page.
Questions about UDN itself? Contact the UDN Staff.
|
|
|
|
|
|
|
|
|
Original author was Richard 'vajuras' Osborne (UdnStaff).
Requirements:
ActorX plugin
3D Studio MAX or Maya
Character Studio plugins
- Skeletal Animation using ActorX
- ActorX
- The PSK file
- The PSA file
- Setting up the Skeleton
- Getting the Animations into Unreal Warfare
- Importing the files through UnrealScript
- Importing the files through UnrealEd
ActorX is a plugin for 3D Studio Max and Maya software. It allows 3D animators to import the mesh (psk file), bone hierarchy, and associated animation data (psa file) into Unreal Warfare. Meshes and Animation data are saved to different files allowing different models to share animations like you would in Character Studio. However, unlike Character studio, all of your characters that you want to share all of the animations must use the same skeleton.
The PSK file
The mesh is exported to a psk file. This file defines the mesh geometry and skeleton. When you export the model, ActorX generates a log file titled X_ModelInfo_(modelname).
The PSA file
This file stores the animation data. When you export the animation, ActorX generates a log file titled X_AnimInfo_(modelname). The log file lists all the sequences that will be imported into Unreal Warfare. Note: if you let ActorX generate the unrealscript file and click the explicit sequence list checkbox, all the sequences will be listed.
When you setup the skeleton, you do not have to rename the bones. As long as the names are unique and are less than 31 characters, Unreal Warfare won't have a problem. Unlike the 3ds2unr tool, ActorX allows characters to be greater than the 256x256x256 bounds.
If your character does not use the biped plugin or you wish to attach additional bones to the biped, you will find ActorX will work with the new bones flawlessly. Attach bones to an existing biped like normal. Create a box to represent the new bone. Next, Select and Link a dummy to the new bone. This will serve as an end-effector. Next, Select and Link the bone to the part of the biped you wish to inherit motion from.
ActorX does enforce one restriction on animators. When you initialize the model with Physique, the model must be setup to be rigid and only use 3 Links. Also, additional features that Character Studio supports such as Bulge and Tendons are ignored by ActorX.
Creating the PSK
ActorX will export the model from the scene that is attached to a biped. It's best to use a frame from an animation to use as the reference pose. Setup the output folder and the mesh file name.
The material names are very important. Each texture must have an index number. For example, if you have a character that uses two textures you probably want to name the materials SKIN0 and SKIN1. In Unreal Warfare, the texture assigned to MultiSkins[0] will be assigned to SKIN0. Below is an example of the material editor in 3D Studio MAX.
When you create the PSK, ActorX will generate the X_ModelInfo log file. The log file details the number of materials in the mesh, vertices, and number of bones in the skeleton. Most importantly, it lists the index numbers the materials will be assigned to in Unreal Warfare.
= materials =
* Index: [ 0] name: SKIN0
Original bitmap: glf.bmp Path: C:\3dsmax4\Scenes\Unreal Tournament\characters\Saurian
- Skin Index: 0
- LOD Bias: 5
- LOD Style: 0
- render mode flags:
* Index: [ 1] name: SKIN1
Original bitmap: glb.bmp Path: C:\3dsmax4\Scenes\Unreal Tournament\characters\Saurian
- Skin Index: 1
- LOD Bias: 5
- LOD Style: 0
- render mode flags:
* Index: [ 2] name: SKIN2
Original bitmap: gla.bmp Path: C:\3dsmax4\Scenes\Unreal Tournament\characters\Saurian
- Skin Index: 2
- LOD Bias: 5
- LOD Style: 0
- render mode flags:
* Index: [ 3] name: SKIN3
Original bitmap: gll.bmp Path: C:\3dsmax4\Scenes\Unreal Tournament\characters\Saurian
- Skin Index: 3
- LOD Bias: 5
- LOD Style: 0
- render mode flags:
ActorX parses the material name to figure out how the engine should render the faces ingame. For instance, the material name SKIN3TWOSIDEDTRANSLUCENT will cause ActorX to define the skin as two sided and translucent.
* Index: [ 3] name: Skin3TWOSIDEDTRANSLUCENT
Original bitmap: ghan3.bmp Path: C:\3dsmax4\Scenes\MODS\characters\Seraphim
- Skin Index: 3
- LOD Bias: 5
- LOD Style: 0
- render mode flags:
- Twosided
- Translucent
- Masked
The Animation Manager component of ActorX allows animators to define and tweak their animations (adjust frame rate, etc).
Description of important fields:
- name - Name of the Animation Sequence. Limit is 31 characters (Name object in UnrealScript).
- groupname - Animation Group. Limit is 31 characters (Name object in UnrealScript).
- rate - Animation Rate, Frames per Second.
ActorX generates script templates you can use in Unreal Warfare. If you decide to use the template, you'll have to place the psa and psk files in your package's Models folder.
PSK and PSA files can be easily imported through UnrealScript. Place the files in your models folder for your package. Next, we can start copy/paste useful bits from the template into the actual unrealscript.
class TestGrunt extends WarCogGrunt;
//This line imports the psk file and sets the Level-Of-Detail
#exec MESH MODELIMPORT MESH=Ryotian MODELFILE=models\ryotian.PSK LODSTYLE=12
#exec MESH ORIGIN MESH=Ryotian X=0 Y=0 Z=55 YAW=192 PITCH=0 ROLL=0
This line imports the model (PSK) and the associated skeleton.
#exec ANIM IMPORT ANIM=ryotianAnims ANIMFILE=models\ryotian.PSA
COMPRESS=1 MAXKEYS=999999
This line imports the animation exported from the ActorX plugin for the specific bone structure/hierarchy used to create the animation. Multiple PSAs can be linked together during runtime for a character- LinkSkelAnim().
#exec MESHMAP SCALE MESHMAP=Ryotian X=0.74 Y=0.74 Z=0.74
Scales the model and imports the mapping.
#exec MESH DEFAULTANIM MESH=Ryotian ANIM=ryotianAnims
This line assigns the imported MeshAnimation as the default animation.
// Animation sequences. These can replace or override the implicit
(exporter-defined) sequences.
#EXEC ANIM SEQUENCE ANIM=ryotianAnims SEQ=run STARTFRAME=0
NUMFRAMES=20 RATE=30.0000 COMPRESS=1.00 GROUP=None
// Digest and compress the animation data. Must come after the sequence declarations.
// 'VERBOSE' gives more debugging info in UCC.log
#exec ANIM DIGEST ANIM=ryotianAnims VERBOSE
//Client-side function that will be called whenever the animation sequence is played.
#exec ANIM NOTIFY ANIM=ryotianAnims SEQ=Run TIME=0.25 FUNCTION=PlayFootStep
This is a sample of some of the animation sequences you will see in your template if you checked the Explicit Animation checkbox option in ActorX. After you complete these steps, you'll find it's possible to create a ukx file that will store the model, skeleton, and animation data.
The psk and psa files can be imported into UnrealEd to create a ukx file instead of using an unrealscript class to import them. UKX files are libraries that store the serialized data imported from PSA and PSK files.
From the Animation Browser, click Import Mesh.
The package name will be the name of the ukx file. After the mesh is imported, load the textures the mesh will use into the texture browser. Next, click Edit->Mesh properties. Under the skin property, you can specify the skins the character will use. Each skin slot refers to the material index assigned to the character. At this point, you can save the package.
From unrealscript, you can later import the ukx file:
#exec OBJ LOAD FILE=..\Animations\StandardSoldiers.ukx PACKAGE=mygame.soldiers
Attachment: | Action: | Size: | Date: | Who: | Comment: |
saurian.jpg | action | 23436 | 24 Dec 2001 - 15:51 | UdnStaff | An example of a character linked to a biped |
|
|