FaceGen Pipeline
Please note: FaceGen licensing is now provided free of cost to HeroCloud Licensees. Once you've looked over this page and are ready to see how deep the rabbit hole goes, please see the FaceGen Customizer page to obtain the Customizer Executable.
FaceGen technology is the key ingredient in the entire character system, and impacts both face and body. HeroEngine uses a blend of it, along with our own modifications, to do body morphing, facial expressions, and head customization. Not all characters need to use FaceGen technology -- sometimes the Parts system is more appropriate.
This document covers setting up your own data.
Contents |
Description
The key to FaceGen is its statistical model. You can create a base line definition of the shape of a character (such as the nude form) and then create any number of morph targets from that. Then, the statistical methods will ensure that every alternate part (clothing, hair, helms, everything) will morph correctly without having to create any morph targets for them. The artist time, computer memory and disk space savings of this over traditional methods cannot be overstated!
It's important to know when exactly you need this system. There is overhead associated with using FaceGen statistics (namely the statistical information that must be generated and loaded) so it is best to utilize this for limited parts of your game design (such as just player characters and NPCs). The hard and fast line is that the FaceGen pipeline is used when a character requires some sort of morphing. Typically this means it's used for player characters, but not for creatures. And always keep in mind that you can have characters that take advantage of the Parts system without using any FaceGen data.
Terms
- A control is a single possible customization morph that can be applied to your character to individualize its appearance. These most often map to sliders in the game GUI, but you can manipulate them anyway your design desires (many, many other possible user interface possibilities exist). If a character is persisted on the server, current control values are stored in that character's _characterAppearance node.
- Each control is defined by two meshes: a mean mesh (the "average" case) and an extreme mesh. Only one extreme mesh is needed per control, as FaceGen automatically calculates offsets in the negative direction.
Tip: If you don't like what FaceGen calculates for the negative direction, you may want to make two controls--one for each extreme--and clamp them both in the [0,10] range. - Controls typically have a range of [-10,10] (where 0 is the mean mesh) although you can pass larger numbers to it in-game and get some extra distortion; this may or may not be acceptable for your purposes.
- Example (Dwarf Body):To build this control, a mean mesh would be needed: in this case, an average-looking human body. This mean mesh would be shared by all controls that affect the body. The extreme mesh would be created by making a copy of the mean mesh and adjusting vertices so that the body is as short and broad as you'd like a dwarf to optionally be.
- Each control is defined by two meshes: a mean mesh (the "average" case) and an extreme mesh. Only one extreme mesh is needed per control, as FaceGen automatically calculates offsets in the negative direction.
- A base statistic is a collection of controls that define some aspect of a character's customization. For example, there's a base head statistic, which covers the ~82 shape controls that come with FaceGen for changing facial features. You may also create other base statistics, like a full-body statistic that covers changes like bicep size, hip width, beer gut, love handles, etc.
- A diff (or difference) morph is like a standard morph target: it uses a fixed 3D displacement on each vertex of a mesh to arrive at a new shape. A stat (or statistical) morph is similar to a diff morph, but the displacements are run through FaceGen's statistical system to adapt the morph to the current statistical shape of the mesh. Stat morphs only process vertices that have nonzero displacements, while diff morphs always encode a displacement for every vertex in the mesh.
- Both diff morphs and stat morphs are mesh-specific, meaning they only apply to the mesh for which they're defined (they don't affect multiple meshes, like controls do). They are accessed from HSL scripts using the facial morph functions, and their states are not persisted to the server, unlike controls.
- The FaceGen SDK readme pdf has the following advice to offer about choosing whether a facial morph should be a diff or a stat:
- "The criterion we used to make a morph a stat morph was whether or not there was a specific target position. This is certainly the case for eye blinks, and when the tongue has to touch the teeth (as in the ‘th’ phoneme). In the default model set we also made the eye movements stat morphs, because we don’t use rotation bones for the eyes and their shape and size can vary greatly. Difference morphs work best for most other situations."
- There are also memory vs. performance considerations to be aware of:
Morph Type | Memory Requirements Per Morph (bytes) | Performance Considerations Per Vertex |
Diff | 10 * numVerticesInMesh | 3 multiplies and 3 additions |
Stat | (16 * numStatMorphVerts) + 4 | 3 subtractions, 3 additions, 3 multiplies, plus 3 multiplies and 3 additions per base statistic control |
- (Typically, numStatMorphVerts will be less than numVerticesInMesh, but as you can see, the cost per-vertex for a stat morph is quite a bit higher than that of a diff morph.)
For more information on terms and concepts, read readme.pdf in the FaceGen SDK and also this page.
Note: template_directory will be used throughout this tutorial to refer to a base statistic's root directory |
Overview
The bulk of the pipeline is cascading, so that performing one step requires you to perform all subsequent steps down the pipe.
- For example, once you integrate meshes, you'll need to
- Add them to the engine before they can be usable and then
- Verify that they look correct within the engine.
Integration and generating cache files each take an amount of time proportional to the number of controls in the base statistic:
- Integration shouldn't be much longer than 30 minutes; significantly less for base statistics with few controls
- Generating cache files takes about 10 minutes per base statistic control
- Run the heavier statistics (like the default FaceGen head ones: 82 controls x 10 minutes = ~14 hours) overnight.
The majority of the FaceGen process is spent integrating meshes and adding the statistics, as this happens every time you add a new character part that needs to be affected by FaceGen.
Base Statistic Initial Setup
This section covers creating your own custom full-body statistic that can be used for body morphing. The same steps apply to creating a custom statistic for any section of your character (for example, a custom head statistic for applying morphs that aren't covered by the default FaceGen statistics, like nonhuman racial morphs).
If you're just looking to take advantage of the extensive head statistics provided by FaceGen for your own head mesh, skip down to generating cache files.
Creating Your Source Meshes
The first step is to create your "mean mesh." This is the base-line character from which all control meshes (aka, morph targets) are derived from. For a human-like character, this would be a character in a root pose with no geometric clothing details. We are just looking for a good volume that represents your character.
Remember that this is simply the statistical model, not the actual render model. Therefore this mean mesh and its accompanied extreme targets do not need materials or skinning data. Your render model will made up of any number of parts and sub-parts and they can have any sort of topology you like (each different from the next). What the mean model is used for is defining the statistical information for how this model will change as morphs are applied and it can then use this information to correctly morph every other renderable mesh regardless of its topology.
Once you have a mean mesh created, you can move on to create an extreme mesh for each control you need in this statistic. Every extreme mesh must have the same vertex count. You can only edit these targets by translating vertices in 3D space; in all other ways, it must be identical to the mean mesh. This means that you cannot change the topology (meaning you cannot add or remove vertices or change the triangle layout in any way). This is the same requirement you'll find in doing morph targets in any other 3D app.
- If the extreme mesh changes the proportions of the model in any way such that bones need to be adjusted to keep the skeleton fit to the mesh, you'll need to modify the skeleton to fit and set up the exported modified skeleton for skeletal morphing for the morph to function properly.
Tip: When you're designing what controls to create in the statistic, keep in mind that each one must be as orthogonal as possible. For example, if one control increases the size of the eyes, then no other control should do that (however another control may increase the slantiness of the eyes, for example). |
Here are some sample full-body extreme meshes:
The dwarf and Lanky controls would also require skeletal morphing to look right--since it changes proportions and size--while the body gut, bulk, and bobblehead controls would not, since it keeps the same general proportion of the mean mesh.)
Steps
- First we'll deal with getting the OBJs out of Max and into the proper directory. It's easiest to author all of your statistical targets in the same scene as your mean mesh. Make sure your mean mesh is at 0,0,0 and its Xforms have been reset so your scale is at a uniform 100. Off to the side I have all of my target meshes, which are simply deformed duplicates of the mean mesh.
Some benefits of using the morpher and keeping all of these in 1 max file are:- Scene management: less files equals less mess
- The ability to preview the combinations that your targets will make
- Ensuring that the vert counts and mapping stay consistent
- Select your mean mesh and from the modifier dropdown select Morpher. Then add your targets to the available empty slots in the Morpher panel.
- After you've added your targets to the mean mesh, hide your target meshes. You do not want to look at these again unless you need to do some edits.
- Now Export the controls one at a time. First, with all the Morphs turned to 0, do file\export selected\OBJ. This first one will be your base mean mesh. Make sure to follow the settings in the following OBJ image. If you modeled in tris, simply change the faces box to tris.
Alternately, you can export your controls as static asset GR2s and change them to OBJ format with the GR2toOBJ.exe converter available on the Account Management System downlod page
- Name them all with a common prefix that describes your base statistic (e.g. a common prefix of morphman_ might result in meshes named morphman_base.obj, morphman_bobblehead.obj, and morphman_bulky.obj)
- Type: Static Asset (because this isn't skinned to anything and only serves as a volume)
- When Exporting, make sure that Move to origin is unchecked
- Export the OBJs to your facegen directory \template_directory\egm\objs
- Export the mesh again with with your first Morph Target on the Morpher set to 100. Name this appropriately.
- Repeat the last step until all morphs are exported. Remember, only one can have influence at a time.
- Source Code Devs: Get
//depot/vendor/singular_inversions/template_directory/...
from Perforce.- Contact the support list to request access to this directory, if it is not already available to your perforce user account.
- HeroCloud Devs: Get
...\ArtPipeline\Templates\...
- Rename template_directory to the name of the base statistic you're creating, like "Full Body" or "Torso."
- Edit the batch file
template_directory\process.bat
- Change the variables logFile, ctlFName, defaultFGName, and gr2toobjdir as needed.
- You probably want to set logFile to be the same as the path to
template_directory
, so you have the generated log file of process.bat in the same place asprocess.bat
. - Make ctlFName and defaultFGName similar to the name of your base statistic.
- Example: For a statistic named Torso, make ctlFName torso.ctl and defaultFGName defaultTorso.fg
- You probably want to set logFile to be the same as the path to
- Change the variables logFile, ctlFName, defaultFGName, and gr2toobjdir as needed.
- Edit the batch file
template_directory\egm\add_morphs.bat
- Replace the string "baseTriMesh" with the name of your mean mesh (without the extension, so "bob.gr2" is just "bob").
- Replace "meshNamePrefix" with the common prefix you put on all of your source mesh names.
- Add the controls to complete the base statistic.
Adding Controls
For each control you want to add, you must have already created an extreme mesh. When you have done so, do the following to add the controls to the base statistic:
- Bring the extreme meshes for the new controls into
template_directory\egm\gr2s
. Make sure they've been fixseamed if need be. - For each control, add a line to
template_directory\egm\add_morphs.bat
using the following pattern (change the things in red):addanimatemorph diff InternalMeanFace.tri extremeMeshName.tri "Display Name of This Control" InternalMeanFace.tri
- If this control changes the proportions of the mean mesh (making it a skeletal morph), the display name of the new control must be the name of the morph (i.e. MorphName, see here for where MorphName comes from).
- If you're specifying the first control, you must also replace the first InternalMeanFace.tri on the line with the name of the mean mesh (with a .tri extension), like so:
addanimatemorph diff meanMeshName.tri firstControlExtremeMeshName.tri "Display Name of The First Control" InternalMeanFace.tri
- There are by default 3 example lines in
add_morphs.bat
; overwrite those before adding new lines.Note: FaceGen requires at least 3 shape controls per base statistic. If you don't have 3 controls, fill the remaining ones with "dummy" controls by using the mean mesh as an extreme mesh.
- Run
template_directory\process.bat
. - Check the end of the log file (it's wherever you set the logFile variable in
process.bat
to) for a line that saysxxx diff morphs converted to EGM modes
- (where xxx is the number of controls you have created for the statistic)
- If xxx is 0 or some other number not equal to how many controls should be in the statistic, check for other errors in the log file.
- If this was the first time generating this base statistic, do the following:
- Create a facegen.dat if it doesn't already exist for this character specification.
- Create a subdirectory in the FaceGen subdirectory named after the statistic (see the EGM property here if you don't know what kind of statistic you're using). This will be referred to as the statistic subdirectory.
- For example, the Head statistic subdirectory for an orc might be
Character\Orc\FaceGen\Head\
- For example, the Head statistic subdirectory for an orc might be
- Upload the generated .ctl and .fg files in
template_directory\ctl\
andtemplate_directory\fg\
, respectively, to the statistic subdirectory you created in the previous step. - Add the new base statistic to facegen.dat in the [Controls] section:
- Add the appropriate statistic name (Head, CustomHead, or Body) in {} to begin the control's definition (this will be the same name as the statistic subdirectory).
- Add paths to the .ctl and the corresponding .fg files in the statistic subdirectory using the File and DefaultCoord properties, respectively.
- In facegen.dat, add any control keywords for the new control(s) as appropriate.
- If this control is for a skeletal morph, the keyword must be named a certain way (see the last step here for details).
- If the control changes the model's proportions, add a skeletal morph for this new control.
- (Re)Generate the cache files for this base statistic.
Here's what you should have after you've created the statistic:
- A .ctl file in
template_directory\ctl
. This tells how controls are laid out in egms. It also holds the strings for the control names. - An InternalMeanFace.tri and InternalMeanFace.egm in
template_directory\egm
. They tell how each control modifies the mean mesh to get its extreme mesh as a result. - A .fg file in
template_directory\fg
. This is a saved version of the statistic that represents having all of the controls set to 0. In other words, applying this coordinate file to a character would give you the mean mesh.
If you're missing any of the above files after completing these steps, check the log file that was output from process.bat
to see what went wrong. Start with the first error you find from the top of the log file and work down from there.
Generate Cache Files
You've created a base statistic (or are using the default FaceGen head statistics), but before you can integrate your part meshes, FaceGen needs to run some heavy calculations to figure out how your mean mesh relates to the extreme meshes. This makes integration much quicker, which is important since that's the step that you run most often.
If you're regenerating cache files because you changed a base statistic in some way, copy the [Integrate] section from the old Customizer project, delete that old project, complete these steps again starting at step 2, and paste the [Integrate] section into the new Customizer project before you move on to the integration step. That way you won't have to set up every mesh for integration all over again.
- If you're using the default FaceGen statistics for the first time, do the following to produce a reference head mesh:
- Open up the highest resolution version of your head mesh that will actually be used in the game.
- Since this version of your head mesh is for reference, remap the entire thing to use a single material to eliminate seams and vertex duplication due to material intersections.
- Import the super-high-poly-reference-mean-face-mesh (the FaceGen mean face) into your modeller (for Max, see these instructions). It is available on the Account Management System download page.
- Translate, rotate, and/or scale the FaceGen mean face as a whole to align it to your head mesh. The goal is to have it overlap the skinned head mesh of your character. It should fit as closely as possible to the character head; the character should actually poke through a bit in places. Don't alter the individual vertices of the FaceGen mean face in any way!
- Skin the FaceGen mean face to the same rig as the head mesh.
- Export the repositioned FaceGen mean face and your head mesh separately using the same settings as for any other dynamic character part.
- Run both of the exported meshes through
GR2ToObj
(you can drag-and-drop them, one at a time, ontoGR2ToObj.exe
).
- Run FaceGen Customizer.
Note: If this is your first time running Customizer on your machine, you'll need to get a site key for the machine. To do this, send the displayed site code to support@facegen.com (use copy and paste to avoid transcription errors). You have to repeat this site code/key procedure for each machine you want to use Customizer on. |
- Create a new project.
- The project name determines what folder will hold the project data (it'll be
projWhateverProjectNameYouEntered
), and the model set name is for your own personal reference. - If you're doing these steps because you changed the base statistic, make sure you delete your old version of the project or else you'll quickly run out of disk space (the cache files are ~98MB per control, so you don't want outdated ones accumulating on your hard drive).
- The project name determines what folder will hold the project data (it'll be
- Import the mean face and registered models.
- If you're using the default FaceGen base statistic, use the resulting obj for the FaceGen mean face that you exported above as the "Re-scaled/Re-oriented mean face" and the obj of your head mesh (also exported earlier) as the "Imported registered models".
- If you're using a custom base statistic, use
template_directory\customizer_1_1\data\InternalMeanFace.tri
for both "Re-scaled/Re-oriented mean face" and "Imported registered models" (you'll probably have to change the file filter in the open dialogs to display .tri files)
- Follow the instructions in the Integration Setup section of this page. Skip the "Obtain neck seam vertices" section if you're not working with the default FaceGen head statistic.
Note: Creating cache files is dependent on the number of controls in the base statistic. There's one cache file generated per control, each one taking 5-10 minutes to calculate and ~100MB of disk space. So the default FaceGen statistics--with 80 controls--take ~7-14 hours and ~9GB. Custom base statistics, however, tend to be much more lightweight as they have fewer controls. Note that these files, while very large, are not distributed to the end user and are only used by FaceGen for doing its internal analysis during part integration. - Integrate any meshes you have that are affected by this statistic.
Integrate Meshes
As its name implies, a base statistic is just the "base"--or springboard--to actually generating the statistics for individual meshes: it tells a mesh what it has to conform to. For each mesh that can be deformed by the base statistic, you need to generate statistics and feed those results into the engine. Generating these mesh statistics is called integration. For example, if we had a base body statistic, integrating a gauntlet mesh would result in a set of statistics that allow the gauntlet to automatically scale properly when you make your character bulkier. This is the most-travelled section of the FaceGen pipeline.
Note: If you're just integrating because of regenerating cache files, make sure you've copied the [Integrate] section from your old Customizer project file into this new one and then skip to step 4. |
- Fixseam the meshes to be integrated.
- Using GR2ToObj, convert all of the meshes to be integrated into obj files, and put them somewhere.
- If you haven't already done so, create a master directory for gr2 -> obj conversion of parts:
- Create a directory with
GR2ToObj.exe
andgranny2.dll
in it. - Grab
\\depot\HeroEngine\MAIN\GR2ToObj\GR2ToObj\Release\runOnAllGR2.bat
from Perforce and put it in the same directory. - Make a subdirectory named
gr2s
.
- Create a directory with
- Put all of your gr2s for integration into whatever directory structure you want within the
gr2s
folder.- If you're going to use the FaceGen layout helper (it's recommended if you're integrating several meshes at a time), make the subdirectories of the
gr2s
folder identical in structure to the layout of your meshes in the repository (see the layout helper prerequisites section for an example).
- If you're going to use the FaceGen layout helper (it's recommended if you're integrating several meshes at a time), make the subdirectories of the
- Execute
runOnAllGR2.bat
and you'll have the obj equivalents in anobjs
subdirectory, with the directory structure of yourgr2s
folder maintained within that.
- If you haven't already done so, create a master directory for gr2 -> obj conversion of parts:
- Use HeroBlade to automatically generate a layout file for your Customizer project.
- Use the generated Customizer layout file to modify the Customizer project file.
Note: Make sure Customizer is closed before modifying the project file. - Open the file generated in the last step in
OutputDirectory\customizerLayouts\
. It'll have the same name as the character specification you're working on (i.e. Human_Male.layout if the character specification is Human_Male.dat). - Open the corresponding Customizer project file in
CustomizerDirectory\projYourProjectName
.- It should be named like your project directory, but without the proj, i.e.
YourProjectName.fgprj
- It should be named like your project directory, but without the proj, i.e.
- Copy and paste the generated layout file contents into the [Integration] section of the Customizer project file. You'll have to hand-merge the
ModelMorph
lines of existing meshes that have morphs, as the layout helper isn't able to generate those lines.- If the Customizer project file doesn't have an [Integration] section, add a line with the text
[Integration]
on it and then paste the entire contents of the layout file starting on the next line. - If you do any hand editing of the file, pay attention to the model numbers; if you have duplicates, Customizer will get confused and some meshes will be skipped.
- If the Customizer project file doesn't have an [Integration] section, add a line with the text
- Open the file generated in the last step in
- Run FaceGen Customizer.
- Read the instructions for model integration here for some background.
- Open the project in Customizer.
- Click the Geometry Integration button.
- Make sure that none of the models you just added have a "skip" in the Skip column.
- To assign neck seam vertices (only when integrating with the default FaceGen head statistic) or diff or stat morphs to a model, select the model and click the Change button (see Assign Neck Seam Vertices and Animation Morphs under the Geometry Integration section here for details).
- Click the Start Integration button to generate the statistics for the meshes.
- Add the resulting statistics to HeroEngine.
Add Statistics to HeroEngine
After you've integrated meshes, you actually need to tell the engine to use the resulting statistics with their corresponding .GR2 files (the exported assets from Max/Maya). To do this, you'll need a dynamic character and a primed facegen.dat file. Once you have those, do the following steps to hook up your statistics from integration:
- Copy all of the .egm files (and .tri files for those meshes that have diff or stat morphs) in the
csamYourProjectName
subdirectory of your Customizer project folder (projYourProjectName
) into the appropriate statistic subdirectories of your FaceGen subdirectory. - Use HeroBlade to automatically generate a [SAMs] section for your facegen.dat.
- If you've already used the FaceGen layout helper when you integrated the meshes you're hooking up, you can skip this step because the [SAMs] section has already been generated.
- Open one of the generated layout files in
OutputDirectory\facegenDatLayouts\
in your favorite text editor. - Do the following for the newly integrated meshes that have the combination of statistics specified by the layout file you just opened:
- Find them in the generated layout file (the SAM name will be in the form
slotName.partName
). - Copy them into the [SAMs] section of facegen.dat.
- Add any TRI (if the part includes a diff or stat morph) or RecalculateNormals properties, since the layout helper doesn't take care of those.
- Find them in the generated layout file (the SAM name will be in the form
- Repeat steps 3 and 4 for each layout file you exported.
- Make sure everything looks okay in HeroBlade.
Test
Once you finish adding the most recent batch of statistics to HeroEngine, you should run HeroBlade to ensure things are working properly. Check for the following:
- Are the parts accessible using
GetAllPartsForSlot
, or in your character manager?- If not, there's something wrong with the .par file.
- You may have forgotten to specify the part, or you may have some rules that are hiding the slot or substituting the part with something else.
- Check the Errors panel in HeroBlade.
- If not, there's something wrong with the .par file.
- Do the parts match up at the seams?
- If not, there are two possible reasons for the discrepancy:
- You didn't fixseam them properly (or at all).
- HeroEngine can't find the statistics, so the part isn't being deformed by its coordinates, while an adjacent part is. Check facegen.dat and ensure the following:
- The .gr2 path matches with the file referenced by the part in the .par.
- The statistics have been uploaded to the repository in the places referenced by the appropriate SAM.
- If not, there are two possible reasons for the discrepancy:
- Is the part properly deforming when you use
SetFaceShapeControlValue
with an applicable control?- If it's not deforming at all, make sure you've added statistics for the part, that the paths are correct, and that you've uploaded the files to the places referenced by facegen.dat.
Miscellaneous
Automatically Generating SAM and Customizer Layouts With HeroBlade
HeroBlade has the ability to automatically export both a project file for FaceGen Customizer and a prefilled [SAMs] section of facegen.dat so that hand-editing of those text files is kept to a minimum. This is extremely time-saving when your artists start cranking out content, requiring you to add several parts at once. It also cuts down on all sorts of errors associated with tedious editing of text, including copy-and-paste errors.
The helper works by looking at the location of each mesh in the repository (based on the paths provided in the .par file and then generates the following:
- A FaceGen Customizer project file that looks for an obj version of the mesh in a similar place under a directory you specify (the Base OBJ Directory).
- So
\Character\Dynamic_2\Human\Male\gauntlet.gr2
will be searched for atBaseObjDirectory\Human\Male\gauntlet.gr2
- So
- A facegen.dat [SAMs] section that generates the necessary EGM and GR2 properties.
- The EGM properties assume that the .egm files are located in a subdirectory named
FaceGen\coordName\
under where the .gr2 is located.- So the statistics for body morphing of a leg located in
Character\Dynamic_2\Human\Male\leg.gr2
would be assumed to beCharacter\Dynamic_2\Human\Male\FaceGen\Body\leg.egm
.
- So the statistics for body morphing of a leg located in
- The EGM properties assume that the .egm files are located in a subdirectory named
Prerequisites
There are a couple of requirements to meet before you can take advantage of HeroBlade's automatic generation of FaceGen layouts:
- The meshes to be processed must already be parts so HeroBlade knows what it's working with.
- Since the meshes' integration statistics aren't yet added, they won't deform properly with the rest of the character when body morphing is used and so it's not really a good idea to do this in a live production world.
- The meshes also need to have the
.OBJ
versions of themselves arranged locally in a hierarchical structure identical to that of their location in the repository, beginning at the\Dynamic
folder level.- So
\Character\Dynamic_2\Human\Male\gauntlet.gr2
will be searched for atObjDirectory\Human\Male\gauntlet.gr2
- It works out best if you do this hierarchical layout of your gr2s at the
gr2->obj
conversion level. Place your gr2s in a hierarchy of subdirectories under the location ofGR2ToObj
(see image). When you userunOnAllGR2.bat
, it'll automatically duplicate the hierarchy in theobj
files it outputs.
- So
Steps
|
Create a Minimal Facegen.dat
- Create a directory somewhere on the repository to hold your FaceGen-related data for this character specification, referred to from this point on as the FaceGen subdirectory. It makes sense to make a subdirectory under your character specification folder and name it FaceGen, i.e.
Character\Orc\FaceGen\
.- Create a subdirectory in the FaceGen subdirectory named after the statistic (see the EGM property here if you don't know what kind of statistic you're using). This will be referred to as the statistic subdirectory.
- For example, the Head statistic subdirectory for an orc might be
Character\Orc\FaceGen\Head\
- For example, the Head statistic subdirectory for an orc might be
- If you're using the default FaceGen statistics (the Head statistic), copy the controls file and default face coordinate into the statistic subdirectory:
- Copy si.ctl from FaceGen Modeller into the statistic subdirectory. Feel free to rename si.ctl as you see fit.
- Generate a default face coordinate from si.ctl using
BlankFgCoord.exe
and upload this .fg file to the statistic subdirectory.
- (For a custom base statistic, this will be done later when you add your controls.)
- Create a subdirectory in the FaceGen subdirectory named after the statistic (see the EGM property here if you don't know what kind of statistic you're using). This will be referred to as the statistic subdirectory.
- Create a text file named Facegen.dat in the FaceGen subdirectory.
- Add a line like the following to your dynamic character specification (.dyc) file that tells it where to find the file you just made in the last step:
FaceGen=pathToFaceGenSubDirectory\facegen.dat
- Fill the Facegen.dat you just made with the minimal amount of information necessary.
- Add the [Settings] section with the version number as the only property in it.
- Add the [Controls] section.
- If using the default FaceGen statistic, do the following (otherwise, this information will be covered when you add controls for your custom base statistics here and so right now your [Controls] section will just have the header):
- Add a {Head} line to begin the control's definition.
- Add paths to the .ctl and the corresponding .fg files in the statistic subdirectory using the File and DefaultCoord properties, respectively.
- Add any control keywords as appropriate (see Default FaceGen Head Statistic Control Name Reference for the control names to choose from).
- If using the default FaceGen statistic, do the following (otherwise, this information will be covered when you add controls for your custom base statistics here and so right now your [Controls] section will just have the header):
- Add the header to the [SAMs] section, but leave the rest of the section blank.