Facegen Tools
The information on this page has been deprecated.. It is provided for informational purposes only. |

- Facegen Tools for HeroEngine is a group of scripts that automates much of the tedious process that is involved with the FaceGen process. You can access FaceGen Tools from the Character Tools utility panel in 3ds Max in older versions of the Art Pipeline. In Max 2012 and newer this tool became entirely inoperable due to changes in Max and is no longer included.
Prerequisites
Please note, Facegen Tools is an old tool that was created for the Hero's Journey team, and was never fully completed or attended to be used outside of the Hero's Journey game team. It's not available in Maya nor is it supported by the Hero Engine team.
Facegen is a very intense art pipeline that can take several hours per character with one dedicated team member that does nothing but troubleshoot the Technical Art aspect of Facegen. It is not recommended to be utilized in a game project if someone can not be dedicated to Facegen. Furthermore, Facegen can become a performance burden if not used within a strict budget. It was used for morphing a character body's height and weight in Hero's Journey. It was later discussed among the members of the team that it would be have been easier and cheaper to just make fixed character heights and swap out the character models and rigs when a player picks a preset height, instead of a slider that blends the multiple models.
Before setting up a FaceGen Dynamic Character, it is required that you have a solid understanding of dynamic characters with HeroEngine. This is the Beta version of this tool so it may have some kinks, please refer to the Facegen documentation on this wiki if you need further explanation of any given step. There are a few things this doesn't do yet. It does not copy your completed .egm, .ctl or .fg files, and it only sets up morphs as skeletal morphs.
UPDATE: 3ds Max 2009 users, if you get an MAXScript runtime error, please see the FaceGen FAQ page to resolve this known issue.
In the following steps, we will:
- Locate a character on the art server
- Create a FaceGen and HGMtoOBJ directories
- Export the control meshes and prep them for FaceGen customizer
- Run FaceGen customizer to create the base statistic to be used later in parts integration.
- Export any needed skeletal morphs
- Convert parts for FaceGen integration on existing parts for the character(or add new ones)
- Run FaceGen parts integration
- Create and edit a facegen.dat file for the character.
- Upload the new character files
Step 1: Prepping you Control Morphs .max file
The objects that are shown in your viewport will be scanned for FaceGenTools control meshes panel. The meshes respect traditional morphing rules.
- Meshes must have the same topology, face count, and vertex count.
- They must have 100% uniform scale
- The pivot point should be in the same location relative to each model. For example at the feet of each model.
- These do not need to be skinned or textured, they are only being used to create a statistical volume.
FaceGen requires at least three morphs ( a base mesh and two targets ) in order to run. If you only have one target, simply duplicate one of them and make it a dummy.
Step 2: Setting up FaceGenTools Settings Panel
- Upon opening FacgenTools with a new character, the settings tab (left most tab), should be blank.
- Press the Game Root Directory button to browse and select the games Root Directory. This is generally HJ or HE, however it depends on your game set up. If you are not sure, please consult with whomever set up your art server.
- Use the Character button to load up your character. Much like with HeroEngine, browse to the directory that your characters .dat file resides in. This should be the root folder for the character.
- Type a name in the text box that you would like to use to name your FaceGen and HGMtoOBJ directories.
- Press the FaceGen Directory button to browse to a directory where you would like your facegen customizer project to go. This must go through a mapped drive.
- Press the HGMtoOBJ Directory button to browse to a directory where you would like your HGMtoOBJ files to go. This must go through a mapped drive.
- Press the skeletons folder button to locate the directory where all of your .max file skeletons are for the character.
- NOTE There should be one skeleton per .max file and it must be prepped for export as a dynamic character skeleton.
- Bone counts and hierarchies must be identical for skeletons. DO NOT scale any bones, use bone edit or figure mode to adjust bones.
After the Settings Panel is complete it should look something like the next two images.
Step 3: Setting the Control Morphs
The Control Meshes tab scans the viewport for geometry that can be used as a control morph and places it in the list. For each control morph, you must select a skeleton and a keyword.
- A control morph can be selected 3 different ways, whichever the user is most comfortable with.
- 1 - select the object in the viewport
- 2 - select the Row from the displayed list on the control meshes panel
- 3 - select an object from the drop down box just beneath the display list
- Below the list is an area for editing the current Control Morph. When you make changes here, you will see it reflected in the list.
- You must choose a base mesh. To do this check the box next to the desired control mesh.
- NOTE The keyword for the base mesh must be "basehuman"
- NOTE Do not use the word "model" in your mesh names, this will cause a conflict with how the tool parses information.
Press the Set Up Character button to start set up. This will do the following.
- Edit your characters .dyc file
- Add and create a facegen directory with facegen.dat file
- Export each control mesh to the HGMtoOBJ directory we specified in step 2.
- After the meshes are converted in the HGMtoOBJ directory, the new converted .obj's will be referenced by the facegen directory we set up.
- Process.bat(located in the facegen DIrectory) will automatically run to get some information to facegen.
Step 4: Run Facegen Customizer to create Base Statistics
Go to the facegen root directory that you specified in step 2. Open the customizer_1_1 folder that is inside your Facegen Directory that was specified in step 2. Run customizer.exeFirst time users of FaceGen Customizer, please see FaceGen_Customizer for license information.
After opening the Customizer,
- select New Project. Enter a name for you project and model set name. These are usually the same name. .
- Choose the data directory for the customizer project. This directory must be with in your characters FaceGen directory that was set in FaceGen tools. On the settings panel in FaceGen tools, the line at the bottom of the FaceGen project section that says FaceGen Path is the exact path where the customizer project should be located.
- For example if the my facegen project data is called "Goldman_fgprj", then the Goldman_fgprj directory would be at the same level as the customizer_1_1 directory ( the customizer.exe is in here ).
- Browse to the InternalMeanFace.tri file
- The InternalMeanFace.tri file is located in the data folder of your facegen projects exact path.
Q;\autofacgenProjTests\Goldman\Customizer_1_1\data\internalMeanFace.tri
- Add this same file under the Imported Registered Models section
- Once both .tri files are loaded, check the model that is shown in the Customizers viewport. It should resemble your base mesh.
- Press the next button until you get to the create cache panel.
- Press the Start Setup button.
- This will create a .dca file for each control morph that you have. This is the volume statistic that will be used to integrate parts later on.
- NOTE each .dca file consumes about 100 MB of storage space and can take anywhere from 20 minutes to overnight to run. The length of time it takes depends on how many control meshes you have and how detailed they are.
- When it is done, shut down customizer.
Step - 5 Export new parts or convert existing parts for integration
For existing parts, do the following: Now we need to take any existing parts for the character, convert them to .obj and run them through the customizer. Existing parts are likely: part files that are already exported and loaded up and the dynamic character skeleton.- Open up the max file where your control meshes are set up.
- On the Convert Existing Parts tab, there is a list of parts that are associated with your character. The default directory is the parts directory listed in your .par file. You can add or remove any additional parts paths except for the default path. The parts directories in the drop down menu at the top of the panel are the source paths for the parts.
- Select which parts you want to run by clicking the check box next to each part.
- After all the appropriate parts are selected, Press the Copy selected Files and Convert button.
The Following will occur:
- This will copy the files from your character's parts directory and convert it to an OBJ in the HGMtoOBJ directory.
- Edit the customizer .fgprj file.
- Edit the facegen.dat file.
For new parts do the following: New Parts are parts that have never been exported before.
- Open up a .max file with your character parts in it.
- For new parts, use the Export and Convert New Parts tab instead
- FaceGenTools will scan the scene for parts and add them to the list view.
- The parts directory at the top of the panel is the destination directory since our parts are located in the scene.
- Select which parts you wish to export by clicking the checkbox next to the desired parts.
- After all the appropriate parts are selected, press the Copy selected files and convert button
The Following will occur:
- Export the new part to the parts directory
- Copy the files from your characters parts directory and convert it to an OBJ in the HGMtoOBJ directory.
- Edit the customizer .fgprj file.
- Edit the facegen.dat file.
- This will NOT add the part to your .par parts file. This must still be done manually for the time being.
Step - 6 Run Facegen Customizer Parts integration
The parts now need to run through integration in order to conform to the control meshes.- Open up FaceGen Customizer.
- Select Load Project and load the project we set up earlier.
- After Loading up the project, go directly into Geometry Integration by pressing the Geometry Integration button.
- There should be a list of parts under Model Name. Make sure that none of the parts are set to skip. You can toggle Skip on or off by clicking in the white space in the Skip column.
- Press the Start Integration button to start the integration process.
- Each part will now be run against the base statistic that was created by the control morphs.
- A .egm file will be created for each part. They are located in the csam folder in the project directory, not the EGM folder.
- after running Geometry Integration, go back to your max scene and press the Copy FaceGen Files to Character button on either the Convert Existing Parts tab or the Export and Convert New Parts tab. This will copy the .fg file, the .ctl file, and the correct .egm files to your characters facegen folder.
Step - 7 Upload all the files
- Open up the repository browser and upload all of your characters new files:
- All the new skeletons
- All the new parts
- Be sure to manually add them to your .par file if they are new parts
- Inlcuded the new facegen folder with the the facegen.dat in it
- Re-upload the .dat and .dyc files for your character
- Run HeroBlade
- Create an instance of your character and possess it.
- From the hotspot menu ( click the upper left corner of the viewport while holding ctl + shift ), select the skeletal morphing tool for testing the morphs.
- NOTE if your basemesh does have the keyword basehuman, this will not work. This can be edited in the .dyc file manually if you need to.