Guide: Siege University - 214: Siege Max: Characters

== Introduction ==
This tutorial will cover the basics of exporting a character from gmax™ into Dungeon Siege. The first character we'll show how to prep is a relatively straightforward monster type. We'll be using the Skeleton as an example. 
Monsters in Dungeon Siege don't use the complex system of weapon and armor swapping developed for the Player Characters (like the human, dwarf, and skeleton that you can choose to play in Multiplayer Mode), and are a good starting point for anyone interested in creating characters for the game. 
For the purposes of this tutorial we're assuming that you've already taken the time to learn the basics about creating models, textures, bones, and skinning them. gmax™ comes with a very nice set of basic character tutorials to get you up to speed on these things. We'll be focusing on what's needed to get that character working in Dungeon Siege.
=== What You Need For This Tutorial ===
*Dungeon Siege version 1.1
*Dungeon Siege Tool Kit (includes Siege Editor and Siege Max)
*gmax™ from Discreet®
*A test map you can practice with.
=== What This Tutorial Assumes You Have Already Learned ===
*Siege U: 201 - Templates
*Siege U: 208A - Non Player Characters
*Siege U: 211 - Naming Key
*The basics of modeling and texture mapping
=== What This Tutorial Will Teach You ===
*File placement requirements for your models, textures, and animations
*The modeling standards for Dungeon Siege
*How to export your files to Dungeon Siege
*Animation naming conventions
*Default animation stances
*A list of resources for more information on modeling, texturing and animating
=== Siege Max Setup ===
When Siege Max sets up, it sets up a subfolder in the gmax folder under "...\gmax\gamepacks\Siege Max\Scenes" that contains a folder named "ArtAssets" and one named "Reference Scenes." The ArtAssets folder is the one we'll be looking at for this tutorial, and where you'll be saving your first Dungeon Siege character. 
Let's take a quick look at the contents of ArtAssets to familiarize ourselves with what's there. Inside you'll see the folders "terrain", "objects", and "characters" among others. These are the folders that store the source files for your content. The output files, the ones actually used by Dungeon Siege, will be placed directly into the proper install folders for use by the exporter tools, and ideally you won't need to concern yourself with them much at all. 
Inside each of these subfolders you'll notice a number of sample files, all with seemingly incomprehensible long filenames of strange glyphs and potent symbols of dark magic.. The Dungeon Siege toolset looks at the structure of the filenames of each piece of art in order to determine it's proper place in the overall scheme of the game. Various parts of the tools, and the game itself, rely heavily on the filenames, so it's very important that you learn the naming conventions for each type of content you're working on.
== Naming Conventions ==
Now, I know that we already listed the Siege U: 211 - Naming Key tutorial as "required reading." Chances are, you skipped past that in a gleeful rush to make your character. 
Slow down there bucko, take a deep breath, and read it. Naming conventions for files are key to keeping your characters clean and in their proper place, and in allowing the tools to understand what they are and what they can do. They are also absolutely essential for Dungeon Siege to 'see' your new content and have it to show up in Siege Editor as a usable character.
== Setting Up For Your Character ==
Now that you've read Siege U: 211, and discovered the importance and joy of naming conventions, we need to build the folders to hold all the pieces of content your character will use. 
To begin with, create a custom NNK naming key file for your mod content, for example "WootsMod.NNK". Now, let's assume you're excessively tidy, as are all animators worth their salt, and would like to keep all your content for your new creature in its own subfolder. Follow the instructions in the Naming Key doc to create a 'Tree' for your character. 
You will need to create multiple folders in multiple locations for your character. 
Start by creating a new folder and NNK Tree in the \art\Meshes\Characters folder for your character. For example, you're making a creature called the Nose Goblin, a fierce beast with a powerful long-ranged mucus attack; you would create a folder such as \art\Meshes\Characters\NoseGoblin, and make an appropriate entry for that new Tree level in your custom "WootsMod.NNK" naming key file. 
Follow the same procedures to create a custom folder and naming key for your character's texture under the art\bitmap tree as well. Later on we'll be adding more folders for the animations, and various types of attacks, but for now you only need the mesh and bitmap folders and NNK trees set up.
== Prepping The Mesh ==
As with any complex task, keeping tight to the standards is an absolute must. To create the volumes of art that fill the worlds of Dungeon Siege, we found that standards became a critical part of making clean content and reducing the amount of fixes and rework.
Modeling standards for Dungeon Siege are fairly standard for low-poly games. You need to be very careful about not having polys duplicated on top of each other, seams or cracks between polys, etc. Many tutorials exist on the web already for basic low-poly game modeling... Hunt around, join some community forums -- there's a lot to learn but a lot of great help all over the place.
=== File And Mesh Naming ===
When creating meshes for Dungeon Siege content that doesn't animate, the mesh name is used to determine the correct naming key and what to export. This is so you can have dozens of nodes or items in a single gmax™ file.
Characters work a bit differently. For character gmax™ files, the tools use the filename isntead of the mesh name to determine the export file locations and names. Only one mesh should exist in a character gmax™ file, and it must be named "skinmesh".
This grew from the need to be able to quickly copy an animation to start a variant of it by simply resaving the filename as something new.
In both mesh "m_" and animation "a_" gmax™ character files, you simply need to ensure that your gmax™ filename correctly follows the naming key, and that the mesh is named "skinmesh".Note: Anything that will animate should follow this standard. If you're making a door that opens, or a lever that pulls or some other animating item, treat it exactly as you would a character file. Allow only one mesh per gmax™ file, named "skinmesh", and match the gmax™ filename to the naming key for the item you wish to export.Whenever you name any mesh "skinmesh", you are essentially telling the Siege Max tools to use the .gmax filename whenever it needs to determine the actual name of the exported object.
=== Poly Count ===
Poly count standards for characters are roughly between 200-800 polys, with a definite hope that people will lean on the lower side, as Dungeon Siege combat is usually between large groups of characters at a time.
"Boss" type monsters could be higher in polycount, since they are almost always unique, only one is on screen at a time. These should be kept to a minimum in the game. For this tutorial, we won't be dealing with any of the extra issues related to creating Boss monsters, such a extreme scale and movement issues, and will focus just on a "standard" 200-800 poly monster.
=== Scale ===
Keeping scale consistent throughout your work will really help to reduce confusion. We've used meters as our standard, so you'll likely want to set your scale preferences to match.
==== To set the Scale: ====
# Click Customize on the main menu, and select Preferences from the drop-down.
# Under the General tab, set System Unit Scale to 1 unit = 1.0 Millimeters. Click OK.
# Click Customize on the main menu again, and select Unit Setup. In the Units Setup Dialog, select Metric and set it to Meters.This will ensure that everyone's units and scale are all the same as they make content for Dungeon Siege. 
==== Check the scale of your character: ====
# Set viewport to Front view, using the "F" key, then reset zoom to match your character by hitting CTRL+SHIFT+Z.
# Create a Tape Measure helper object, and line it up with your character.
# A standard bipedal "man-sized" character is roughly 2 meters tall, compare that to the reading in the tape measure helper and adjust your character scale accordingly to fit your design concept.
# Remove the Tape helper when your character is scaled to fit.
=== daVinci ===
The character should be setup in what's called a "daVinci" pose, which is its spine strait up and its limbs out straight, or at a slight angle parallel to the main body from the front view. Modeling a character in an action pose, and then trying to bone and animate it from that, usually leads to a lot more trouble.
Figure 1 - The daVinci pose.
The main reason to making sure a model is created in a daVinci pose is so that its range of motion during animation will be the widest possible before polys begin to stretch or bunch up in bad ways. In addition, daVinci poses are much easier to texture than natural or action poses. In any case, it's a good standard to follow. Save the posing for the animations! 
GPG artists used a slightly modified daVinci, with the legs strait and the feet flat on the ground. In most cases, the daVinci pose will also have the arms flat sticking strait out from the torso at 90 degrees to the spine. This simplifies the process of animating, and since the models are low-poly, you lose very little in terms of range of motion for the limbs. 
=== Textures ===
All textures in Dungeon Siege MUST be sized in a 'power of 2' dimension. So 2x2, 4x4, 64x64, 64x128, 128x64, etc. are all valid sizes, but 117x251 is not. Also, Character textures in Dungeon siege are usually 256x256 pixels in size, although this level of detail is very rarely actually used in the game, due to system requirements and average camera zoom distances. 128x128 sized textures are just as ideal for use in DS in many cases, as most of the time that's the highest resolution that is seen in the game. Textures should be saved in the same folder as your meshes. So character textures are saved in the 'characters' folder. 
=== Mip Levels ===
Some of you may be asking, "What's a Mip Level?" MIP stands for "multum in parvo" which is Latin for "many things in a small place." A Mip map is a collection of scaled down versions of your texture, which are swapped in the video card on the fly based on user preferences for texture resolution, and distance from the camera. 
In Dungeon Siege, character texture Mip levels are selected based on user preference settings and camera zoom, and ramp down strongly by powers of 2 in resolution. 
Mip maps for Dungeon Siege textures are created automatically as part of the Tankbuilder process, so no effort is needed when making custom content, other than understanding that they will affect the appearance of your character in the game, and to create textures ahead of time that work well at lower resolutions. 
Texture details should focus on large patterns, instead of small details. Aim for "realism" through use of low-saturated colors, instead of lots of small details, which could look bad when crunched down by the MIP'ing tech. 
=== Bones ===
gmax™ comes with a set of tutorials on the basics of creating Bones, and skinning them onto the character mesh. Please read and follow these tutorials on your character before proceeding. 
Dungeon Siege characters need very specific bone names in order to export properly through the converters, and interact properly with the game engine. A lot of little things rely on the consistency of these names, so being diligent in following them will eliminate a lot of common problems. 
Figure 2 - Standard bone names and parenting for a bipedal character. 
While the structure of this skeleton doesn't need to be followed exactly, you can have only one spine bone, or four fingers, or even a tail for example, the names should be matched precisely for what pieces you do have. The Pelvis, Hands, and Feet bone names are all used by the tools, and must match the names in the diagram to avoid creating an error in that process.
After creating the skeleton for your character, you'll use the skin modifier to make the bones properly deform the character. gmax™ includes a detailed tutorial on skinning, and other resources are available on the web.
Weighting vertices is a very crucial part of good character animation. Spend a lot of time setting and testing your vertex weighting for your skin, and you'll be a lot happier with the results.Note: The rest of the tutorial assumes you've boned your character, and that the bones are skinned and weighted onto the mesh. Some of the tools within Siege Max will not work if you don't at least have the base bip01_pelvis bone attaches to a character mesh, and have saved the character file out with an acceptable filename. Most errors you will likely encounter initially will be related to improper naming. Take the extra time to ensure everything is named correctly.
=== Bits-n-Pieces ===
Each basic Dungeon Siege character requires some extra pieces to interact with the game, to hold weapons and shields, and tell the engine how fast they move. Assuming you've named you're bones correctly, adding these to your character is a simple matter of running a couple of quick tools.
Siege Max Mesh Modifier: This gmax™ modifier is used to store information as part of your character mesh file that remembers specific mesh needs related to gmax™. It is added like any other gmax™ mesh modifier, by clicking on the Modifier List drop down, under the Modify rollout panel, and choosing the "Siege Max Mesh" modifier from the list. This enables your mesh to store data such as animation event flags, and more custom features we will be addressing in future tutorials.Note: All Siege Max functions, other than adding the Siege Max Mesh modifier, are accessed by right clicking on the mesh. Many of the various tools or functions that make up Siege Max will only appear if all your naming is correct and the correct modifier is applied. If you expect to see a certain function, and it's not there, double check your file and bone naming.Root: The "Root" is a large blue arrow shaped object that rests underneath your character, and is used by the game to 'remember' where your character's actual x & y position is in the world during run-time. It is, in effect, the 'center' of your character as far as the game is concerned, and all of the character's decisions about path-finding and movement will be based on the location of the root.Note: If you animate your character too far off the root, chances are good that at some point it will pass through walls or other characters in the game.Adding the Root:
# Select the Character Mesh
# Right click on the mesh, then select "Siege Max Root Tools" and select the Add/Reset Root Marker tool under the submenu.
Grips: Grips are dummy objects used to set the point where weapons or shields lock to the character. Generally the weapon grip is placed in the right hand and parented to the bip01_r_hand bone, and the shield grip is placed next to and parented to the bip01_l_hand bone. But this isn't a requirement. Dungeon Siege allows equal representation for lefties as well!Note: Parenting the grips can only be done in the mesh-building phase of creating a character. Grips cannot be 're-parented' on the fly in an animation! You can animate the grips, for example to make a 'flipping a dagger' type of fidget animation, but the grip must remain parented to it's original parent bone throughout the animation.In fact, the choice of grip location and parenting when modeling a character is really only limited to how you want the character to work later on.
For example, if you want you could parent the shield grip to the spine bone, for a character that wears his shield on his back. It won't affect how the shield works in the game, if it's equipped it's equipped regardless of location.
To get grips to work properly though, you do need to be careful about their orientation. A weapon or shield will align itself along the axis of the dummy grip. A sword will point 'up' along the z-axis of the grip, and the flat of the blade will follow along the x-axis.
For example, if you wanted to create a thief character that always attacks "backhanded" you would rotate the weapon grip 180 degrees, so that it's z-axis pointed backwards, from the character's perspective, instead of forwards.Note: Make sure that any rotations for grips are done in 'Local' axis mode, so that you have are editing with an accurate display of the Pivot Angle for the item.Another example might be a golem type character that 'mounts' its weapons inside it's arm. In this case you'd simply aim the z-axis of the weapon grip exactly along the z-axis of the arm bone, and parent it to the arm-bone, and recess the grip into the arm mesh itself. Then, when this golem is using a weapon, it'll stick out of the arm and look like part of the golem!
Adding Grips:
# Select the Create tab and then the Helpers subgroup in the gmax™ side panel.
# Click on "Dummy" and then create a small dummy box where you wish your character to use its weapon.
# Select the Modify tab and rename the dummy box to "weapon_grip".
# Select the "Select and Link" button from the main toolbar, and drag a link line from the grip dummy to the bone that will control the weapon.
# Repeat steps 1-4 for the shield grip, naming it "shield_grip".
After you've added the root and the grips, double check to make sure they are correctly aligned and that the character is correctly properly centered over the root object.
== Previewing The Mesh ==
Okay, so you've got your character naming key set up, and it's modeled, textured, boned, skinned, the bits-n-pieces are added on, and you're ready to check it out! 
To Preview a Mesh:
# Select the character mesh.
# Right click on the mesh, and then select "Launch Previewer".
Figure 3 - The AnimViewer window.
This brings up the AnimViewer, a separate program that runs a small portion of the DS engine called 'NEMA', and allows you to view content as it will truly appear in Dungeon Siege.Note: The preview window may stay active during the entire editing session. To update the display, simply reselect "Launch Previewer" and the contents of the AnimViewer will reflect your recent changes.
== Exporting The Mesh And Skeleton ==
After you've successfully previewed your mesh, and made sure everything's okay, you're ready to export it as a game usable object! Don't forget to save your gmax™ file with the proper final file name, as per your Naming Conventions.
"Native" Dungeon Siege mesh files are created with an "ASP" file extension, which stands for Animatable Aspect. The Export tool creates the ASP files for you, saving them to the locations you've specified in your Naming Key Tree by comparing it against the filename for the character gmax™ file.
Editing, copying, or otherwise working directly in or with ASP files isn't advised, you should always work in gmax™ sources and export fresh when you want to make changes.
=== To Export Your Mesh to an ASP file: ===
# Select the character mesh.
# Right click on the mesh, and then select the "Export Mesh."
The exporter will use your NNK setup, and create the proper ASP file in the Dungeon Siege game folder you've prepared. If the folder doesn't exist, it'll prompt for you to create it.Note: During development of a mesh you'll likely want to save several versions of it. Remember that the tools will create the final files based on your gmax™ filename, and might not work if you've used something that isn't listed in your Naming Conventions NNK file. Save various versions of your model by changing your gmax™ file names, and then when you're ready to go, simply re-save as your final "game" file name, and you'll save yourself a lot of confusion.
== Animations ==
Now that you've successfully exported your mesh, you're ready to start creating animations!
But wait, not so hasty, there's a couple more things to do before we get going...
First, you need to set the frame rate for your gmax™ file to match the DS standards, to avoid creating animations that are too problematic for Dungeon Siege to play appropriately.
=== gmax™ FPS Setting ===
With the quantity of animations in Dungeon Siege, we found that reducing the overall amount of keyframes per animation was very helpful in providing clean animations that were quick for the engine to interpret. In order to keep the amount of keyframe data low in our animations, we've set the FPS [Frames Per Second] in our animation data to 12 FPS.Note: This doesn't mean that the engine runs the animations in the game itself with only 12 frames per second!! The in-game engine interpolates between the keyframes smoothly, at whatever FPS the system it's running on can handle. Setting the FPS in gmax™ to 12 only reduces the overall amount of keys available per second of animation in gmax™, keeping the animations clean and lightweight for processing, the animator from over-keying, and allowing the smooth interpolation in the engine to work well.
==== To set the FPS in gmax™ for Dungeon Siege standards: ====
# Near the bottom right hand corner of the gmax™ interface, with the other animation controls, click the Time Configuration icon.
# In the Time Configuration Dialog, set Frame Rate to Custom, FPS to 12, and Time Display to Frames. Setting the Time Display to Frames is important, as otherwise the animator will be able to key in partial frames, allowing way more keyframe data per animation than is necessary for Dungeon Siege characters.
Hint: One thing to keep in mind in your animations, is that the characters are going to be seen mostly at a small scale, as most players tend to have the camera zoomed all the way out. Being too fussy over small details of motion will simply create more keys than are really needed, and create animations that could read "jittery" or odd at game scale. 
Focus on the large motion, testing at the farthest zoom, and try to get away with as few keys as possible. This will improve the performance of your character in the game engine, and likely will make things easier on you as an animator and cleaner in the end product. 
Note: If you experience any problems during animation with bones 'flipping' or over-rotating, you may want to consider changing the rotation controller to one that allows more precise control, such as the Euler XYZ controller, which allows tangent bezier handles for each axis in the track view. There are also a few scripts available on the net that auto-smooth curves for Euler controller key frames. 
If you want to get your animation looking as close to the true output in the Dungeon Siege engine as you can, change to using the Linear rotation and translation controllers. 
For more information on how to change controllers, consult the gmax™ help files.Now you're ready to resave your mesh gmax™ file and start making it move! 
=== Animation Naming Conventions ===
Once again, Dungeon Siege and the Siege Max toolkit work around a very locked down file-naming structure. In the case of animations, we use the filename to indicate the attack style as well as the different motions used by each style.
Dungeon Siege supports 8 different styles of combat, based on the weapon equipped by the character, or hard-coded directions from it's template. This is specified in the filename directly following the character name.
Figure 4 - Animation naming format.
In this layout example, the modeler has already specified a 'mod', 'moddername', 'charactername', and 'fs#' Tree setup in his NNK file, to allow the proper directory structures to work.Note: Setting up the 'fs#" sets for your animations in your custom NNK must be done prior to creating any animations. For further examples, consult the Naming Key Doc and look at examples in the installed NNK files.
==== Attack Style Suffixes: ====
* fs0 - Barehanded, spellcasting, or natural attacks (bite/claw/etc.)*
* fs1 - Single handed weapon
* fs2 - Single handed weapon, plus a shield
* fs3 - Shaft Handled 2-handed weapon (battle-axe, halberd, etc.)
* fs4 - Short Handled 2-handed weapon (swords, etc.)
* fs5 - Staff*
* fs6 - Bow
* fs7 - Crossbows (Note: exotic ranged weapons, flamethrowers, etc., all use the same animation set as crossbows)
* fs8 - Shield only.
==== Animation Type Suffixes: ====
* at - Attack
* dfs - Default fighting stance
* dff - Default fighting stance fidget
* di - Die
* ds - Default stance
* dsf - Default stance fidget
* mg - Magic
* rl - Run loop
* wl - Walk loop
* fl - Fly loop
* rv - Reveal (un-camouflaging from hiding)
So, for example, if your name was "Bob" and your mod was called "GoofMod" and you wanted to make a bow attack for your fancy Winged Monkey critter, the filename would be: a_c_Bob_Goofmod_WingedMonkeyCritter_fs6_at.gmax.
Now, this assumes that you correctly set up the folders in your content path and NNK Naming File to match, so you'd save the file into this folder/sub-folder structure: ...\ArtAssets\animations\bob\goofmod\WingedMonkeyCritter\fs6 for instance.
If you want to have multiples of any given type of animation you simply add a dash and then a 2 digit number for the anim after that. For instance, the suffix for a second attack anim for a claw attack would be "_fs0_at-02". The one for a third magic anim for a staff holder would be "_fs5_mg-03" etc.. Using a dash is important, as an underscore is used by the exporting tool and NNK data to indicate a new subfolder.Note: Only barehanded fs0 anims, and staff fs5 anims, are rigged in the DS engine to handle magic "mg" animations.
=== Creating The Default Stance ===
The first animation you're going to want to make isn't really an "animation" at all. It's a single frame pose of the character in what will be its casual or default stance in the game.
==== Create gmax "_ds" File: ====
# Save/Copy your master mesh file to a new file, using the naming convention for a default stance animation, which is a suffix of "_ds" added after the Custom Identifier and Attack Style Suffix.
For example: You've created the fine mesh known to the world as m_c_mod_WootsMod_NoseGoblin_pos_1.gmax and properly exported him as an ASP file. 
To create an animation file for the NoseGoblin, simply copy the file to the new name a_c_mod_WootsMod_NoseGoblin_fs0_ds.gmax and you're ready to go.
==== Set Anim Time Config: ====
# Near the bottom right hand corner of the gmax™ interface, with the other animation controls, click the Time Configuration icon.
# In the Time Configuration Dialog, set Frame Length to 1.
This sets the anim to only have one frame. It's very important that "stance" animations do not receive extra frames, or keys beyond frame 0.
==== Pose the Character: ====
# The default stance for a character should look natural and rested. It is the pose that will be used for the character when it's not engaged in combat or otherwise turned aggressive for any reason.
# Adjust the character so that it stays mostly over the center root, but doesn't look "twinned" or too symmetrical.
Once you've got a pose that you're happy with, that's it, you're ready to export it.
==== Save gmax™ File and Export Animation PRS: ====
# Save the file, double-checking that you've got the right naming conventions for an "FS0" anim, default pose, such as a_c_mod_WootsMod_NoseGoblin_fs0_ds.gmax.
# Select the Character Mesh.
# Right click on the mesh and select "Export Animation."
You should now have a PRS file of the same name as your character created in the proper folder. This anim is theoretically enough to allow the character to be placed in the game. A default stance is required for every character. But, of course, that's not all we want for all our work, so let's move on, pardoning the pun...
==== Creating The Walk Cycle ====
To make a character move in Dungeon Siege, you'll need an animation known as a "walk cycle." A walk cycle is a looping animation that ends in the exact same pose of the character it began in. At the end of character creation, you'll want to enter the rate of travel of the walk cycle into the character's template, but more on that later.
For now we'll just assume you've figured out the basics of animating a walk cycle on your own, there are many online tutorials and books on the subject, and focus again on how to export it into Dungeon Siege.
==== Create gmax "_wl" File: ====
# Save/Copy your Default Stance file to a new file, using the naming convention for a walk loop animation, which is a suffix of "_wl" added after the Custom Identifier and Attack Style Suffix. Such as "a_c_mod_WootsMod_NoseGoblin_fs0_wl.gmax" if we continue the example from above.
==== Set Anim Time Config: ====
# Near the bottom right hand corner of the gmax™ interface, with the other animation controls, click the Time Configuration icon.
# In the Time Configuration Dialog, set Frame Length to roughly 10-20 frames.
Trying to predetermine the amount of frames needed for a walk loop can be difficult. Don't fret it too much. Use the amount of frames in your scene as a rough guide for how quickstepped or ponderous you want your walk to be, and then try and fill it in the best you can. You can always easily change the amount of frames later on.
A good place to start with is the standard 10-frame walk cycle. Many books on the subject list out the 5 basic 'parts' of each step for a bipedal character, and these can just be plugged in following their suggestions. An excellent book on the subject is "Digital Character Animation", by George Maestri.Note: At any time you can get a good view of your walk cycle as it would appear in the game by bringing up the Previewer. Simply right click and select Launch Previewer.Once you're happy with your walk cycle, and it fits precisely in the amount of frames set up for the scene, you only need to do a few things to get it to work properly in Dungeon Siege.
First you need to set your Root object, the blue arrow that rests under your character, to follow along at the same speed as the main character Bip01_DUMMY object. This is handled via the Root Tools.
==== Setting the Root to Match Speed: ====
# Select the mesh.
# Right click on the mesh, then select the "Siege Max Root Tools" submenu and choose "Add/Reset Root Marker."
# Right click on the mesh, then select the Siege Max Root Tools submenu and choose "Animate Root Marker."
This will add the blue root marker and match its motion to that of the character's BIP01_DUMMY main parent object. The root object is what is used by the game to know the "center" of the character's animation data. Matching it to your character for a walk cycle is what makes the character move appropriately in the engine, if you forget this step your character will 'pop' when he is asked to walk by the game.
After setting your root, you need to add the Loop Events. All walk, run, crawl, hop, or "drag yourself along the ground with your fingertip" animations need to be set up with loop events to work right in the game, otherwise the anim will play once and then the character will stop animating while it moves along!
==== Adding Loop Events to a Walk Loop: ====
# Select the mesh.
# Right click on the mesh, then select the "Siege Max Event Tools" submenu and choose "Add Loop Events."
This should have added two events [flags for the game engine] into your animation. To check them simply do the following:
==== Checking Events: ====
# Select the mesh.
# Right click on the mesh, then select the Siege Max Event Tools submenu and choose "List Anim Events."
A list window should come up showing a layout of all the frames in your animation. Frame 1 should have a "BEGL" event listed, and the last frame should have a "ENDL" event. If they don't, double-check all of your piece and file names to make sure they comply with the conventions, and try again.Note: The walk, run, and fly loops are the only animations that should have Loop Events and their root moved!
==== Save gmax™ File and Export Animation PRS: ====
# Save the file, double-checking that you've got the right naming conventions for an "FS0" anim, walk loop, such as a_c_mod_WootsMod_NoseGoblin_fs0_wl.gmax.
# Select the Character Mesh.
# Right click on the mesh, then select "Export Animation."
=== Creating The Default Fighting Stance ===
By now you should have the basics on the tools to export an animation, so we'll just focus on the specifics for the other essential anims to make a character work.
The DFS anim, or Default Fighting Stance, is a 1 frame long animation, just like the Default Stance we've already made, but this one is posed with the character in an aggressive posture. The pose in the DFS will be the starting frame of the animation for all attacks.
==== To Create the Default Fighting Stance: ====
# Load up your previous Default Stance anim.
# Repose the character aggressively.
# Save the gmax™ file with the correct filename (don't forget to change the suffix to 'dfs'!!).
# Select the mesh and export the PRS file.
==== Creating An Attack Cycle ====
Now to the really fun part, hacking and slashing! Attack animations for Dungeon Siege are used for a great variety of motions, from simple sword swings to lunging worm throat spikes.
The motion itself is completely up to you; however you must remember two things:
* All attacks must start with the Default Fighting Stance pose.
* All attacks must be made to loop cleanly.
By 'looping cleanly' we intend that the animation is made so that it can run in a looped sequence and look natural and smoothly performed. For example, if a monster starts off an attack very slowly, building energy for example, but ends that attack with a quick retraction, then the movement will look wrong when the end of the anim loops back to the beginning..
Once you've got an animation you're happy with, it's time to prep it for export it. Just as with the walk cycle, there are a few special things you need to do with an attack animation for Dungeon Siege to understand it properly.
==== Adding Tracers to an Attack Anim: ====
# Select the mesh.
# Right click on the mesh, then select the "Siege Max Equip Tools" submenu, and choose "Show Tracers."
Note: This actually only displays the tracers in gmax™ for proofing purposes, it doesn't make them show up in game. Check the tracer display to make sure it doesn't pass through the character, and reanimate if you see any problems.
==== Adding Tracer/Swing Events to an Attack Anim: ====
# Select the Mesh.
# Right click on the mesh, then select the "Siege Max Event Tools" submenu, and choose "Open Anim Event Tool."
# Advance to the frame you wish the tracers to begin.
# In the Anim Event Toolkit dialog, doubleclick on "Begin Swing/Cast."
# Advance to the frame you wish the tracers to end.
# In the Anim Event Toolkit dialog, doubleclick on "End Swing/Cast."
# Click "List Critical Events" in the Toolkit to see the events you've added and make sure they're where you want them.
==== Adding Fire Events to an Attack Anim: ====
# Select the Mesh.
# Right click on the mesh, then select the "Siege Max Event Tools" submenu, and choose "Open Anim Event Tool."
# Advance to the frame where the attack should actually "strike" the opponent.
# In the Anim Event Toolkit dialog, doubleclick on "Fire/Strike with weapon."
# Click "List Critical Events" in the Toolkit to see the events you've added and make sure they're where you want them.
Now, just save the gmax™ file with the correct suffixes, and then export the animation.
==== Creating A Death Animation ====
Ahhh, now after all the hard work and love you've put into your fantastic legendary beast, it has met its match: the dreaded Pimply Faced Adventurer! Such is life...and death, in this case. Time to die.
Death animations start with the Default Attack Stance, so let's load that back up to get going. Now, unlike attack cycles, the death anim doesn't loop, so you're free to end it however you wish, again pardoning the atrocious pun. A good guide to follow though is to have the death anim be as fast and furious as possible, and to fall as close to the center root of the character as you can without it looking strange.
The reason for fast death anims is simple, Dungeon Siege is a high combat game, and slow deaths will simply be lost in the chaos. The extra frames won't be any help for overall performance either. Not to mention that a dozen monsters on-screen all performing the same big long melodramatic death animation will look very comical. Gak 'em hard and fierce. It's the only way to go.
The reason for falling close to center is more technical, it's to reduce the chance of the mesh falling inside of walls, hanging off of cliffs in mid-air, etc. Do your best, we know it's not easy.
So, load up your DFS gmax™ file, set your frame count to around 10-12, and animate that death! Don't forget, you can preview at any time during animating by bringing up the Siege Max previewer.
Once you've completed your death anim, you need to assign the death event so DS will understand the right time to 'kill' the character and spawn it's treasure and so forth.
==== Adding Kill Events to a Death Anim: ====
# Select the Mesh.
# Right click on the mesh, then select the "Siege Max Event Tools" submenu, and choose "Open Anim Event Tool."
# Advance to the frame where the character should die, which will indicate either the frame that the character should explode or where it throws off it's treasure.
# In the Anim Event Toolkit dialog, doubleclick on "Die/Explode."
# Click "List Critical Events" in the Toolkit to see the events you've added and make sure they're where you want them.
Now, just save the gmax™ file with the correct "_di" filenamename and export the PRS.
== Templating ==
Please read the Siege University 201 and 208a to learn how to set up a template that will allow you to use your character in the game. Without a template, you won't be able to test your character or place it on any maps; it simply won't show up in Siege Editor.
== Testing ==
Following the Siege Editor tutorials, create a very small map of a handful of flat nodes, and then drop a few of your monster spread around over the map. Save the map and then load it up in the game.
Run around and see how it reacts and fights. You'll likely be surprised by a number of things, but with any luck in only a few rework sessions you'll have a fine new monster to add to the Dungeon Siege Bestiary!
== Conclusion ==
In this tutorial we've taken you through the basic steps of creating a simple 'monster' type character for Dungeon Siege.
We started with an overview of the Naming Key and folder setup, so that your content can be 'seen' by Dungeon Siege and stays in nice clean piles. Then we covered some basics on modeling a character for DS and the requirements involved. After which we moved onto animating your creature with the required set of animations to get it working in game.
Obviously there's a lot more we could cover, but hopefully this tutorial will give you the tools you need to get started.
Most likely along the way something didn't quite follow the tutorial, or you encountered problems unrelated to the specifics of exporting content for DS, such as bad vertex weighting on the bones, mis-parented bones, etc. We sincerely wish we had the energy to cover all these complex topics at length in this tutorial, but there are books full of tutorials out there that don't answer all the possible questions or problems with modeling and animating 3D characters.
Making a 3D character work in a game like Dungeon Siege is a very complex task, don't get frustrated early on! It's going to take a lot of careful work and proofing of every step along the way before you're successful. Keep at it, the end results are more than worth it. Nothing is more exciting to an artist than seeing some idea he or she came up with running around and whacking on things with pointy sticks!