Dynamic Characters Tutorial
- MAYA USERS - Please see the Dynamic Characters for Maya.
- This is an advanced level tutorial for artists, explaining how to create Dynamic Characters for HeroEngine. Before working through this page, you may wish to read the Dynamic Character Primer
HeroEngine has two types of characters:
- Static Characters can be considered as 'fixed' characters as they have no swappable parts and are exported with the geometry and skeleton together.
- Dynamic Characters can be considered as 'modular' characters as they have some combination of swappable parts, tintable textures, and/or swappable textures banks. Their skeleton is exported separately from the geometric parts.
Both Character Types can be initially setup using the Hero Character Tools within 3ds Max or Maya, then have updates exported using Hero Export. This tutorial will walk you through the full creation process of a static character. Specific details on how to stay error free for each export mode are here Hero Export Guide.
It is required that character files go inside the Character/Dynamic_2 folder, but you may create subfolders in anyway you like.
When using the Hero Character Tools, each character will get a set of folders in a folder based on the Character name.
For Static Characters, the tool creates a .dat file, the character's mesh and skeleton file, a maps folder with any applied textures copied over, and an animation folder with a template animation agent script in it, as well as a placeholder idle animation file.
For Dynamic Characters, a parts folder will also be created and the selected mesh exported there as a mesh file in addition to the Static Characters setup. with the skeleton file containing just the skeleton and no mesh. Meshes for Dynamic Characters should be exported as parts and saved in the parts folder.
This tutorial will walk you through the full creation process of a dynamic character. The example will be the Lightless from Hero's Journey. The Lightless use the parts system as its dynamic component.
There is now a Max Script that will create this basic folder structure, as well as the text files needed for a dynamic character. You can still do this all by hand, or you may choose to edit whatever the tool generates, whichever better suits your needs.
For a static character, the tool will create your character's named folder with .dat file, a .dyc file, a template .par file, a maps folder, an animations folder with a template animation agent script in it, and a parts folder.
- For instructions on using this tool, see: Character Tools
Are available on the Account Management System download page
Build the geometry
Name your new creature geometry, and make sure it is clean:
- transforms and scale should be reset
- Polys are single sided
- Pivot point should be placed where you want it relative to the object. For characters, this means origin (0,0,0)
- Each part should be one (1) single mesh
- Plan, Plan, Plan, and Plan some more on how you want your parts to be broken down.
This character does not have vertex paint on it; however feel free to use the vertex paint modifier to get additional detail on your own character.
Use a HeroMaterial
Next add a HeroMaterial to your Geometry.
Materials are added within 3ds Max using a custom material, the HeroMaterial. If you need more than one HeroMaterial that is acceptable, you can assign a multi-sub object material with as many hero sub materials as you want, or you can just assign individual HeroMaterials directly to the appropriate polygons. This is a common setup for a static creature. It uses a diffuse .dds texture as well as a normal map .dds with the specular derived from the alpha channel.
Build the skeleton
- Rig should be placed at origin to ensure ease of use as files pile up.
- Rig should face the negative Y axis in max (the default direction of biped)
- Rig's root node should be named Bip01 and its local X axis should face the world negative Y(forward)
- Create any needed animation masks using the "Mask editor" on the export panel
- Biped nubs and footsteps node should be hidden
- Skeleton is a single root hierarchy. Bones must be parented to other bones. No broken hierarchy(bone to helper to bone)
- Any helper objects or IK's should be hidden before export
Add the SRB
Add Animation MasksAnimation Mask page.
- Select the Mask Editor button at the bottom of the HeroBlade Exporter
- Type a name into the input field - Impact in this example - and click add
- Select the channel from the now created list in the same window and click apply to all.
- Close Mask Editor
- Select each bone and adjust to the desired weight. Values are between 0 and 1 with 1 being 100% of the channel on and 0 being completely off.
- Note Animation Masks only need to be created in the initial skeleton export, not the animation files them selves
Skin the Geometry to the Skeleton
Make sure all bones have had their scales reset to be uniform 100%. Non uniform scaled bones can cause eventual animation problems in the engine. With your character geometry selected either use the Skin Modifier or Physique. Only add the bones you actually need to drive geometry to the modifier. The reason for this is because GPU cards can only handle 73 bones per mesh. You must have at least 2 bones added in the envelope list. Leave the Skin or Physique modifier uncollapsed at the top of the stack.
When dealing with lots of parts, there are two work flows that we have used while working on Hero's Journey:
- The first is to have each part in its own 3ds Max file. This keeps your max file lightweight, but has some drawbacks when going back to tweak various parts.
- The second and current method is to keep all parts in the max scene or to at least keep like parts in the scene sets. Then as parts are exported, all that is necessary is to unhide the part being exported, while keeping the rest hidden. This allows material changes and things of that nature to become less of a headache. And it is easier to keep track of one parts file, rather than a few dozen.
Export Your Dynamic Character SkeletonHeroBlade exporter. Set the mode as Skeleton and make sure that post processing is always on. Export unhidden is the most common way of exporting whatever is currently viewable in your view port. Remember to hide any unwanted helper or rigging objects. They will only add weight and confusion to your file.
- Export using the Skeleton setting on HeroBlade exporter
- Hide any unwanted objects/helpers in the background before export
- Do not export any Geometry or Parts with the Dynamic Character Skeleton
Export Your Dynamic Character Parts
Last but not least, export your asset through the HeroBlade exporter. Set the mode as Character Part and make sure that post processing is always on. Export unhidden is the most common way of exporting what is viewable in your view port. Remember to hide any unwanted helper or rigging objects. They will only add weight and confusion to your file.
- Export using the Character Part setting on heroblade exporter
- Hide any unwanted objects/helpers in the background before export
- Export Parts one at a time either by hiding and unhiding unneeded parts, or by keeping them in separate files
- Keep the skeleton viewable, it will get stripped out by the post processor
- Rinse and Repeat this process until all of your parts are exported.
Animate your Character
A guide for animating your Character can be found in the Animating Characters Tutorial
Create set up files
Set up a .DAT
A .dat file tells HeroEngine about your Character Specification. It has information such as where the character's skeleton and animations are located. It is usually easiest to just copy one of the sample character's .dat files, and edit it to suit your new character, rather than building a .dat file from scratch.
The .dat file needs to have the same name as the character folder that it resides in. In this example Hero's Journey case, "lightless".
Notice that with a dynamic character, the model line points to a .dyc file instead of the skeleton. This is because dynamic characters can have skeletal morphing which requires the declaration of multiple skeleton files.
More information on the .dat can be found on the Character Spec page.
! ! Character Specification for Character\lightless\lightless.dat ! ! Version=2 [PARTS] Model=lightless.dyc AnimationSetFolder=Character\lightless\animation\ Agent=Character\lightless\animation\lightless.aas Behavior=PlayerCharacter2 Gender=Male
Set up a .DYC
A .dyc file tells HeroEngine about where the skeleton and parts files are located. The .dyc file becomes more involved when dealing with skeletal morphing and adds a few extra lines in for the additional skeletons.
Version=1 [SETTINGS] Skeleton=skeleton.(file extension) PartsSpec=lightless.par
Set up a .PAR
- Main page: Parts Files
A .par, or Parts File, is used to tell HeroEngine about what parts your character is currently wearing, and what parts could possibly be used as alternatives.
Detailed information on the nuts and bolts of a .par file is located on the Parts Files page
Until you've gone through the Animating Characters Tutorial and done all the appropriate work, you will not be able to move on. Once you have done all the appropriate animations and associated files, continue forward.
Now that your Character is exported and your animations are all done, it's time to upload your resulting character_skeleton file, .dds textures, .dat file, .dyc file, .par file, animation files, .aas animation agent script, animationset.dat file, and animation sequence .asq files using the Repository Browser. Then, you can add your asset into HeroEngine.
Register Character Specification
The remainder of the character pipeline takes place in the HeroBlade client. After all the appropriate files have been uploaded, register the character's specification with HeroEngine to let it know that the spec (in this case the Hero's Journey "lightless") exists. After the Character Specification is created, you can make as many instances of that character as you like, or use whatever systems your scripters come up with, to move characters around.
Since we need to register the character first, we will add a specification to HeroEngine.
Enter the following into the chat panel. spec is short for specification.
/henpc add spec lightless \character\lightless\
Create an Instance of your Character
Now that the character is registered with HeroEngine, you can make an instance of it in the world.
Enter the following into the chat panel
/henpc create lightless
Change your Character's Parts
Now that you've possessed your character, hold down control+shift and click in the upper left pixel of the viewport. This brings up the Hot Spot Menu, where you can select the No Frills Character Manager, probably under the CCS tab.
- Now, just use some experimentation to see how things work with changing parts.
- When you are finished, close the Character Manager.
Most of the Dynamic Character options are available here to tamper with.
Additional Dynamic Options
If you would to add any of the following features to your dynamic character, please follow the appropriate links below. Remember any combination of these features can be used for a dynamic character.