Facegen Dat File Reference

From HEWIKI
Jump to: navigation, search

FaceGen.dat, like its name implies, is responsible for specifying all of the FaceGen-related files and properties for a character specification. Edit this file any time you create a new base statistic or integrate meshes. FaceGen.dat tells the engine where to find .ctl, .fg, .tri, and .egm files and how they interact with a character's mesh geometry.

Contents

Terms

A SAM (Statistical Appearance Model) encapsulates all of the FaceGen statistical data for one gr2 file (exported mesh), and consists of one or more of the following types of files:

These files are generated by the FaceGen Customizer, and their data describes how vertices in the SAM's gr2 are translated to morph the gr2 into a target shape.

Typically, just a head or face mesh will have a TRI file, for morphs like facial expressions. There may also be rare instances where other meshes use them, like an ear mesh that has a morph for adjusting the "elfness" of your character's ears.

Multiple EGMs are allowed, and often necessary, per SAM. As an example, consider a character that has the default FaceGen head statistic as well as a custom body statistic. What this means is that the final morphed version of the character will be generated internally by the following steps:

  1. Deform the meshes that are affected by the head coordinate.
  2. Using the output of the last step, deform each mesh by the full body coordinate.

Some meshes--like the head--will be affected by both steps. Arms and legs will only be affected by the second step, because they have no influence from the head. This allows the head to retain the nuances of the default head coordinate while still being appropriately sized to the body as a whole.

Example Specification

The following is a bare-bones FaceGen.dat that specifies statistics for a single head mesh for two different types of coordinates: a head and a full-body. The head coordinate has no keywords for any of its controls.

A line that begins with a ! is a comment.

!
! FaceGen Specification
!
[SETTINGS]
  Version=1

[CONTROLS]
{Head}
  File=Character\Dynamic_2\Human\Shared_Geometry\Head\FaceGen\HumanHead.ctl
  DefaultCoord=Character\Dynamic_2\Human\Shared_Geometry\Head\FaceGen\defaultHumanHead.fg

{Body}
  File=Character\Dynamic_2\Shared_Geometry\Female\FaceGen\Body\FemaleHumanoidBody.ctl
  DefaultCoord=Character\Dynamic_2\Shared_Geometry\Female\FaceGen\Body\defaultFemaleHumanoidBody.fg
  Overall Size=path:body;type:shape;min:-1;max:5;labels:smaller,larger;
  Dwarf=skeleton:dwarf
  Elf=skeleton:elf

[SAMS]
!
! head
!
  head.head
     EGM(head)=character\dynamic_2\human\female\facegen\head\head_female.egm
     EGM(body)=character\dynamic_2\human\female\facegen\body\head.egm
     TRI=character\dynamic_2\human\female\facegen\head\head_female.tri
     GR2=character\dynamic_2\human\female\head.gr2
     RecalculateNormals=true

Settings section

The Version number is the only thing that can be set in this section, and should always be set. Current version is 1. In the future, if the format of this file changes, this allows for the code to read files that have not been upgraded yet.

Controls section

This is where each .ctl file is specified, one per base statistic. A .ctl file describes how controls are laid out in .egms and holds the strings for the control names. Each .ctl is specified by its name in braces {}. Properties are then listed after the name. Valid properties are:

SAMs section

This is where you associate a gr2 file (exported mesh) with its corresponding Statistical Appearance Model (SAM).

A new SAM specification starts with the SAM name on its own line. The name shouldn't contain a =. Lines following the name specify properties that apply to the SAM.

Valid properties for each SAM are as follows:

Note: The Body and CustomHead statistics must be created by you from scratch. For each one that you want, you should follow the Base Statistic Initial Setup tutorial (so to have both a Body and CustomHead statistic, you'd have two separate copies of template_directory that you modify appropriately), then integrate all meshes that are affected by the statistic. The resulting .egm files of those integrations would be specified in this section.

Default FaceGen Head Statistic Control Name Reference

(These are listed for keyword purposes, so you don't have to figure them out manually; they go under the Head control)

 Gender (Geometry)
 Age (Geometry)
 Caricature (Geometry)
 Asymmetry (Geometry)
 Brow Ridge - high / low
 Brow Ridge Inner - up / down
 Brow Ridge Outer - up / down
 Cheekbones - low / high
 Cheekbones - shallow / pronounced
 Cheekbones - thin / wide
 Cheeks - concave / convex
 Cheeks - round / gaunt
 Chin - forward / backward
 Chin - pronounced / recessed
 Chin - retracted / jutting
 Chin - shallow / deep
 Chin - small / large
 Chin - tall / short
 Chin - wide / thin
 Eyes - down / up
 Eyes - small / large
 Eyes - tilt inward / outward
 Eyes - together / apart
 Face - brow-nose-chin ratio
 Face - forehead-sellion-nose ratio
 Face - heavy / light
 Face - round / gaunt
 Face - thin / wide
 Forehead - small / large
 Forehead - tall / short
 Forehead - tilt forward / back
 Jaw - retracted / jutting
 Jaw - wide / thin
 Jaw-Neck slope high / low
 Jawline - concave / convex
 Mouth - drawn / pursed
 Mouth - happy / sad
 Mouth - high / low
 Mouth - Lips deflated / inflated
 Mouth - Lips large / small
 Mouth - lips puckered / retracted
 Mouth - protruding / retracted
 Mouth - tilt up / down
 Mouth - underbite / overbite
 Mouth-Chin distance - short / long
 Nose - bridge shallow / deep
 Nose - bridge short / long
 Nose - down / up
 Nose - flat / pointed
 Nose - nostril tilt down / up
 Nose - nostrils small / large
 Nose - nostrils wide / thin
 Nose - region concave / convex
 Nose - sellion down / up
 Nose - sellion shallow / deep
 Nose - sellion shallow / deep
 Nose - sellion thin / wide
 Nose - short / long
 Nose - tilt down / up
 Temples - thin / wide
 Brow Ridge - forward axis twist
 Cheekbones - protrusion asymmetry
 Chin - chin axis twist
 Chin - forward axis twist
 Chin - transverse shift
 Eyes - height disparity
 Eyes - transverse shift
 Face - coronal bend
 Face - coronal shear
 Face - vertical axis twist
 Forehead - forward axis twist
 Mouth - corners transverse shift
 Mouth - forward axis twist
 Mouth - transverse shift
 Mouth - twist and shift
 Mouth-Nose - coronal shear
 Mouth-Nose - transverse shift
 Nose - bridge transverse shift
 Nose - frontal axis twist
 Nose - sellion transverse shift
 Nose - tip transverse shift
 Nose - transverse shift
 Nose - vertical axis twist
 Nose Region - frontal axis twist
 Nostrils - frontal axis twist
 Nostrils - transverse shift

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox