Setting up FacePoser

A few people have asked me for help with setting up Faceposer. Ever since the migration to Steampipe, Faceposer has been rather problematic. This guide should help get you up and running.

I’d like to thank Trivvy for inspiring me to finally write this guide. You can find his more condensed version of this information on Reddit here. This guide will go into a bit more detail, but if you find yourself confused, feel free to consult his guide.

Before you Begin
You will need Half-Life 2 along with Episodes One and Two. If you’ve had the same installation for a while (i.e. before Steampipe), you may consider deleting and re-installing these games because the Steampipe migration tended to be imperfect at times. You will also need the ordinary Source SDK (not the Base versions), which is located in the Tools section of Steam.

1. Create a SourceMod
Launch Source SDK from Steam. Change the Engine Version to “Source Engine 2007” and then double-click on “Create a Mod.” Select “Modify Half-Life 2 Single Player.” Follow the instructions on this screen. For the purpose of this tutorial, I called it modproject and set the directory as c:/modproject. Click Next and let Source SDK do its thing. When it’s done, make sure the Current Game is set to “modproject,” and close this. Among other things, this will create a folder in modproject. For me, this folder is located at: C:\Program Files (x86)\Steam\steamapps\SourceMods\modproject.

2. Verify the Environment Variable

The Source tools use a Windows Environment Variable called VProject to set the working folder. We need to make sure this is set. In Windows 8.1, this involves right-clicking on the Start Button and going to System -> Advanced System Settings -> Environment Variables. The process is similar for earlier Windows as well, such as right-clicking on My Computer.

Here, in the top table, “User variables for (username),” you’ll want to scroll the bottom and make sure VProject points to the SourceMods folder we created in Step 1. In my case, it is: C:\Program Files (x86)\Steam\steamapps\SourceMods\modproject.

3. Update Gameinfo.txt
By default, Source SDK produces a pre-Steampipe gameinfo.txt in your SourceMods\modproject folder. We need to update this so it is compatible with Steampipe and points to the right location. This is what mine looks like. Feel free to copy-and-paste this as your gameinfo.txt.


"GameInfo"
{
game "modproject"
title "HALF-LIFE'"
title2 "== episode two =="

type singleplayer_only

FileSystem
{
SteamAppId 420 // GCF for Episode 2

SearchPaths
{
game+mod |gameinfo_path|.
platform |gameinfo_path|.

game_lv hl2/hl2_lv.vpk
game+mod ep2/ep2_english.vpk
game+mod ep2/ep2_pak.vpk
game |all_source_engine_paths|episodic/ep1_english.vpk
game |all_source_engine_paths|episodic/ep1_pak.vpk
game |all_source_engine_paths|hl2/hl2_english.vpk
game |all_source_engine_paths|hl2/hl2_pak.vpk
game |all_source_engine_paths|hl2/hl2_textures.vpk
game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
game |all_source_engine_paths|hl2/hl2_sound_misc.vpk
game |all_source_engine_paths|hl2/hl2_misc.vpk
platform |all_source_engine_paths|platform/platform_misc.vpk

mod+mod_write+default_write_path |gameinfo_path|.
game+game_write |gameinfo_path|.
gamebin episodic/bin

game |all_source_engine_paths|episodic
game |all_source_engine_paths|hl2
platform |all_source_engine_paths|platform

//game |all_source_engine_paths|ep2
//game |all_source_engine_paths|episodic
//game |all_source_engine_paths|hl2
}
}
}

4. Launch your SourceMod
Restart Steam. Now, launch your SourceMod. If all goes well, you should get to a title screen and then you can quit. Congratulations, you’ve set up a mod. Now, let’s get Faceposer working.

5. Before Launching Faceposer
Let’s pre-emptively fix a couple issues.

First, Faceposer is likely going to be missing some icons for its interface. Visit this page and download the Faceposer icons. You’ll want to put the .bmp images in this zip into steam/steamapps/common/Half-Life 2/bin/gfx/hlfaceposer.

Second, if you plan to do lip syncing with Faceposer, you may run into issues if you are on Windows Vista or higher. I recommend downloading Varsity’s Phoneme Extractor. Follow the instructions in the file to set up the included .dll file.

Note: In setting up Varsity’s Phoneme Extractor and actually trying to extract phonemes, you may find an error saying that you need to set the speech recognition mode to English – UK.  You can download this from Microsoft, but the exact procedure varies.  This page describes the process for Windows 8.1.  In Windows 10, you need to go to Settings -> Time & Language -> Region & Language.  Add English (United Kingdom) if it doesn’t already exist.  If it does, go to its Options and donwload the Speech pack.

6. Launch Faceposer!
Go to steam/steamapps/common/Half-Life 2/bin and launch hlfaceposer.exe. Hopefully, it will work correctly and you can start doing choreography! Unfortunately, one thing you’re bound to notice is a nuisance error in the log about a material having a “bad reference count.” I am not aware of a way to suppress this error and it has the unfortunate side effect of making Faceposer’s real-time previews somewhat jittery. Just keep that in mind. You should be able to use Faceposer as normal, but please bear in mind the notes below…

Further Notes

“I can’t open the folders in Load Model.”
Despite showing the sub-folders in [ROOT]/models, you’ll notice that you can’t actually enter them because they “don’t exist.” To fix this (stay with me now, this is pretty strange), you will need to create some dummy folders in your Half-Life 2 /models folder. For example, let’s say we wanted a Citizen. Normally, these would be found in the /humans sub-folder, so we need to create a folder called “humans” in common/Half-Life 2/hl2/models. Within humans, you can add folders called group01, group02, group03 and group03m. Now, restart Faceposer, Load Model, and you should be able to add a Citizen to your scene.

“I can’t compile scenes.image without losing Half-Life 2’s scenes.”
In order for your mod to use the .vcd scenes you create, you need to compile them into a scenes.image file by going File -> Rebuilt scenes.image. The problem is that this will build whatever is in your SourceMod’s /scenes folder, which means all the Valve scenes will be missing!

To fix this, you’ll need to download Valve’s .vcd files and put them in /scenes before rebuilding scenes.image. As far as I know, the only way you can acquire these today is to get them from Valve’s Github, as they are no longer distributed with the game. Now, I’m sure a Github guru can do this in a more efficient way, but what I did was visit Valve’s Source SDK 2013 GitHub and click on the “Download ZIP” button. This will get about 200 MB worth of files, but the ones we’re interested in are located inside the .ZIP in sp/game. Copy all the folders containing “scenes” in the name (ep2/scenes, episodic/scenes, hl2/scenes and lostcoast/scenes) to your SourceMod’s /scenes folder. Now, when you rebuild scenes.image, you’ll compile all of Valve’s scenes as well. This adds a negligible amount of time to the compile.