Facegen

About facegen.

What is Facegen?

Facegen is data generated with the Creation Kit that defines an NPC’s appearance, specifically of its head. It consists of a mesh and a texture named after the NPC’s Form ID.

For example, the Form ID for Serana’s NPC record is 02002B6C. Her appearance is defined in this record which the Creation Kit uses to generate facegen data for her.

Serana

Her facegen thus consists of:

  • \meshes\actors\character\facegendata\facegeom\dawnguard.esm\00002b6c.nif
  • \textures\actors\character\facegendata\facetint\dawnguard.esm\00002b6c.dds

This is what you see when you preview the mesh in NifSkope:

Serana

Black Face Bug

The infamous “black face bug” is what occurs when facegen assets are either missing (the above mentioned texture and/or mesh cannot be found), or mismatched (the mesh does not match the head parts defined in the record). When the facetint texture is not loaded, NPC’s faces will simply appear dark brown or black.

Mismatched facegen typically happens when using a mod that modifies the appearance of an NPC in a plugin and contains new facegen data based on those modifications, but the plugin is then overwritten by another. This can be fixed with a very simple conflict resolution patch forwarding the first plugins’s appearance changes and merging them with whatever the second plugin does.

Managing Facegen Assets

Facegen assets are regular assets that adhere to overwrite rules in the Mod Organizer 2 mod order. They can be installed as loose files or packed into BSAs in which case loose facegen files overwrite BSA-packed ones.

As you can see from the file paths for facegen assets, you need to be careful when renaming plugins that contain new NPCs or changing their Form IDs. Doing so would break all facegen associated with the plugins or forms, and you would have to either rename the folder or files.

Regenerating Facegen

Facegen needs to be regenerated when:

  1. Changes to Head Parts, Tint Layers, etc, were made in the NPC’s record.
  2. New meshes for head parts (hair, eyes, mouth) were installed.
  3. New textures for tint masks (make up, war paints, dirt overlays) were installed.

New head part or tint mask assets will not cause the black face bug, but they will also not appear on NPCs until their facegen is regenerated with those assets installed.

Autogenerated Facegen

The Creation Kit likes to generate facegen even when a plugin made no changes that require it. Fortunately, SSE Creation Kit Fixes already disables this in its INI file:

[CreationKit_FaceGen]
DisableAutoFaceGen=true

I recommend leaving autogeneration disabled and manually exporting facegen when it is truly necessary.

Custom Facegen

I recommend regenerating and exporting facegen for all NPCs (vanilla and mod-added) as one of the final steps in building a setup. This will apply higher-quality assets to NPCs’ faces which can go a long way toward increasing quality and consistency. It is also not particularly complicated or time-consuming.

If you are using NPC overhauls, I still recommend regenerating facegen for the remaining NPCs as they rarely cover all NPCs in the vanilla game, and certainly not those added by other mods. You can either delete overlapping facegen or simply make sure that your facegen output is being overwritten by whichever mods you installed.

You can find instructions on how to regenerate facegen here.

Last modified April 12, 2024