Dynamic Characters for Maya

From HEWIKI
Jump to: navigation, search
Icon Maya.png

Contents

He advanced.png

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
Max Users - please read the Max Tutorial located at Dynamic_Characters_Tutorial.

Overview

HeroEngine has two types of characters:

Both Character Types can be initially setup using the Hero Character Tools within 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.

Dyn char folder.jpg

This tutorial will walk you through the full creation process of a dynamic character.

Components we will not use in this tutorial are Dynamic Texture Tinting, Texture Blending, or Dynamic Texture Banks.

Specific details on how to stay error free for each export mode are here: Hero Export Guide


Dynamic Character

DynChar part layout.png

Build the Geometry

First thing to do is to build yourself a piece of geometry that resembles some sort of critter in Maya. For this example we'll be using a generic human. Remember to name it and reset transforms and scale back to 0.

* 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)
* Object should be 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 to add additional detail on your own character.

DynChar material.png

Use a HeroMaterial

Next add a HeroMaterial to your Geometry.

Materials are added within Maya using a custom material, the Hero Shader.

If you need more than one Hero Shader, that is acceptable, you can assign a Hero Shader material directly to the appropriate polygons.

Maya statc char rig.png

Build the Skeleton

Some things to keep in mind when building rigs.

* Rig should be placed at origin to ensure ease of use as files pile up.
* Rig should face the positive Z axis in Maya
* Create any needed animation masks using the "Mask editor" on the export panel
* Any locators or extra rigging elements should be hidden before export
* Skeleton is a single root hierarchy.  Joints must be parented to other Joints. No broken hierarchy(joint to locator to joint)


Maya statc char AddSRB.png

Add the SRB

The SRB (Synthetic Root Bone) is used by the engine to keep track of a character location as well as syncing animation.

Detailed information on the SRB can be found on the SRB page.

Also See: Animating_Characters_Tutorial.

You can add a new SRB or delete an existing one, by using the create and delete SRB button on the HeroTools shelf.

Add Animation Masks

Maya statc char Add masks.png
60

Animation Masks are used if you want to play a second animation on part of the rig. A good example is if a character is running and needs to play an impact animation. Since you won't want to stop the character from running, you can play the impact on the upper torso of the character while the lower half continues to run by adding an impact animation mask. Additional information can be found here on the Animation Mask page.


# Select the Anim Channels button from the HeroTools Shelf
# 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 "Tag Selected".
# 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 character export( skeleton file ), not the animation files themselves.


Skin the Geometry to the Skeleton

Make sure all joints have had their scales reset to be uniform 100%. Non uniform scaled joints can cause eventual animation problems in engine. You must have at least 2 joint influencing a vertex. HeroEngine supports up to 4 influences.

When dealing with lots of parts, there are two work flows that we have used while working on Hero's Journey:


Export Your Dynamic Character Skeleton

Dyn skeleton.png
DynChar skel export.png
Last but not least, export your asset through the HeroBlade exporter. Set the mode as Dynamic Character 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 Dynamic Character Skeleton setting on HeroBlade exporter
* Hide any unwanted objects/locators in the background before export
* Do not export any Geometry or Parts with the Dynamic Character Skeleton



Upper body.png

Export Your Dynamic Character Parts

Last but not least, export your asset through the HeroBlade exporter. Set the mode as Dynamic 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.

  1. Hide any unwanted objects/locators in the background before export
  2. Export Parts one at a time either by hiding and unhiding unneeded parts, or by keeping them in separate files
  3. Keep the skeleton viewable, it will get stripped out by the post processor



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, "Gaurd".

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\Gaurd\Gaurd.dat
!
!
Version=2
[PARTS]
  Model=Gaurd.dyc                              
  AnimationSetFolder=Character\Gaurd\animation\          
  Agent=Character\Gaurd\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=Gaurd.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





Upload

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.





Start HeroBlade

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 "Gaurd") 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.

After you enter an area (any area will do), open up the chat panel within HeroBlade. We will use two /henpc commands to get us going. All /henpc commands are given through the chat panel.

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 Gaurd \character\Gaurd\


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 Gaurd


Change your Character's Parts

Possess your character by using the select tool or the move tool and right-click the character. When the menu appears, select Possess Npc.

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.

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.

  1. Dynamic Texture Tinting with .dtb files
  2. Texture Swapping using Dynamic Texture Banks and Texture Layers
  3. Texture Blending
  4. Morphing and skeletal Morphing using the Facegen pipeline
  5. Facial Morphing using the Facegen pipeline
  6. Specialized Hair Rendering
  7. Working With Dynamic Characters in HSL


See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox