|
|
|
Unreal File Anatomy
The files that Unreal Tournament uses for Skeletal Animation come in two flavors. This plugin exports both (or neither or either ... it's all up to you):
- .PSK - the Structural file containing the polygons, vertices, materials and a list of available bones as well the weights which define how each bone effects each vertex.
- .PSA - the Animation file containing the list of Bones (again) and where each of those bones needs to move to produce the various animations.
Breaking things up like this separates the static stuff (what the model looks like) from the dynamic stuff (what it does). This also allows you to re-use the animation files for another omdel ... provided you keep the same set of bones.
|
Unreal Pieces Parts
Before we get too far into this, let me just state that the following isn't meant to be the end-all be-all of Unreal File Format definitions. If you want some real detailed information, consult the Tutorial page at Tutorial page at EpicKnights.com - there you can find some links there to some real meaty Epic-originated information.
What this is meant to do, is assist you in getting your models prepped in LightWave for a successful Unreal Export. That said, there various pieces parts of an Unreal Model live by a set of rules (You experts will notice that I've omitted a few things for simplicity.):
- Geometry:
An Unreal model is made up of Polygons and Bones.
- Polygons:
Each polygon has 3 points. Each polygon must have a single valid Material applied to it.
- Vertices:
Each Vertex is assigned to at least 1 polygon.
- Material:
A Material represents a set of polygons which all have the same surface characteristics (environment mapped, double sided, etc).
- Textures:
A Texture comes from an external image file. Each image corresponds to a given Material, so you need - at most - 1 MAterial in your mesh for each different Image file you wsh to apply
- Skeleton:
The Skeleton is built from a tree of bones. Each bone manipulates the position of a set of 0 or more vertices. More than 1 bone may effect a given vertex. Each bone may have - at most - 1 parent. Bones with a parent move as expected - within their parent's coordinate system.
A few of these parts don't quite map directly over to Lightwave. For those we need to take a little creative liscence.
|
Unreal Pieces Parts in Lightwave 3D
- Material:
Each Texture UV map in your lightwave model will translate over to an Unreal Material. Unreal seems to have the capacity for overlapping Materials (i.e. more than 1 Material for a given polygon) and since Lightwave Surfaces cannot overlap, and UV maps can, I chose to use the latter. For now, give the model a single surface, so we can apply textures for preview. The picture at right shows a model that has 4 different Materials defined - in LightWave, each is represented by a different UV map, and when they get to Unreal, each wil be capable of accepting a separate image texture. Note that these Material defintions have no effect on the bone effects.
- Textures:
Using UV maps also allows us to preview textures on our model in LightWave. Through the Surface Editor, you can hook Images to a Surface and 'wrap' them based on the UV map coordinates. The Material Flag page explains how you need to name each UV map so you can control the properties of the Material they turn into.
|
- Skeleton:
Each Bone in a LightWave model maps over to a Bone in Unreal. In order for the effects of these bones to be predictable we have to apply some rules. All Bones must be set up to work by WeightMap only (the pic at right shows what needs to be checked off on Layout's Bone Properties panel) - this takes the LightWave bone range effects out of the equation for now. Do not use any of the joint compression or limitee range stuff. Which vertices are effected by which bone is defined by applying WeightMaps. For this reason, each vertex in the model must have at least 1 weightmap applied to it. CAVEAT:Currently I'm not checking that strength value, so keep it at 100% so things look right.
|
|