My Deus Ex Lipsyncing Fix Mod: Making Of In 2021, Joe Wintergreen created a mod for Deus Ex 1 to fix its broken lipsyncing and blinking, which had been problematic since the game's original release. The mod is available for download on ModDB. --- Background and Motivation While playing Deus Ex, Joe noticed abrupt instant snapping in mouth shapes during dialogue, but the specific mouth shapes weren't always consistent. He found little prior discussion or fixes online. Discovered an article with Chris Norden, a Deus Ex coder, discussing the originally elaborate lipsync system pared down for performance reasons. Joe sought to check if he could "un-pare" the feature using UnrealScript (the game's scripting language), since the C++ source code is unavailable. --- Technical Details of Lipsyncing Lipsyncing uses phoneme extraction: identifying sounds (phonemes like "oo", "ah") automatically from sound files and mapping them to mouth shapes (visemes). For reference, Valve's Half-Life 2 adds phoneme timing to its sound files offline, allowing smooth mouth movements during speech. Deus Ex apparently tried to extract phonemes in real-time with no saved data, which was expensive to run and likely led to the simplified shipped result. --- How Deus Ex Handles Lipsync Pre-Unreal skeletal animation, the game uses vertex animation for character heads. There are 7 visemes and one blink animation. The variable nextphoneme is set externally to one of the visemes (A, E, F, M, O, T, U) or X (mouth closed). The UnrealScript then sets the head's animation sequence accordingly, blending between mouth shapes on each tick but only while the character is speaking (bIsSpeaking). --- The Core Problem: Frame Rate Check Bug Joe found that the blending of visemes was not smooth due to a flawed framerate check: The intention: skip blending if framerate is below 20fps. Reality: The condition is reversed, causing instant snapping even on good framerates. 0.1 seconds blend duration is also too fast to look natural. Joe fixed this by: Removing the framerate check (ignoring FPS). Increasing tweentime to 0.35 seconds for smoother blending. --- Remaining Issues and Further Fixes When audio lines end, the mouth snaps shut instead of closing smoothly because blending only runs when bIsSpeaking is true. Joe removed this constraint so lipsync runs continuously, allowing a smooth mouth closing. Blinking was extremely fast and invisible, slowed down to be noticeable. The biggest unresolved problem: the phoneme updates themselves are irregular and infrequent. nextphoneme doesn't update every tick or at a regular rate. This inconsistency limits how smooth lipsync can be despite blending. Modifying this requires C++ source access, which Joe does not have. --- Hypothesis on Original Development Originally, the game probably updated phonemes every tick, allowing faster blends (0.1s). Performance constraints forced a reduction in phoneme update frequency and other optimizations. --- Summary of the Fixed UnrealScript LipSynch Function Updates timers for blinking and lipsync. Blends mouth shapes smoothly regardless of framerate. Closes mouth smoothly at end of speech. Blinks realistically. Uses local tweentime set to ~0.36 seconds for blend duration. Duplicated code exists in multiple classes due to game architecture. --- About Joe Wintergreen Australian video game developer. Worked on many games, mostly credited as "systems designer" or "technical designer". Currently Senior Technical Designer at Riffraff Games. Expert in Unreal Engine. Creates tools, tutorials, and resources. -