Facial animation import/export tool for Mafia: The City of Lost Heaven and Hidden & Dangerous 2.
MAXScript utility for 3ds Max that works with .dat facial animation files used by the LS3D engine.
- Import/export
.datfacial animation files - Real-time preview through Morpher modifier
- 6 facial parameters: mouth, jaw, lips, eyelids, eyes, brows
- Batch import multiple files sequentially
- Replace or insert animation modes
- Segment export with custom frame range
- 3ds Max (tested on 2014-2026+)
- Max4dsTools (Import/Export Characters)
- DTA Unpacker (Unpack TABLES/DAT /DABING)
- Set frame rate to 25 FPS(Mafia) or 50 FPS(H&D2) via Time Configuration
- Import a character model using Max4dsTools
- Run
LS3D_FaceAnim.msvia Scripting → Run Script - Select the mesh with Morpher modifier
- Click SETUP to configure face parameters
- Unpack TABLES/DAT or /DABING folder using DTA Unpacker
- Click IMPORT to load a
.datfile
Each .dat file contains per-frame facial animation data.
Engine playback rate:
- Mafia 25 FPS (40ms/frame)
- H&D2 50 FPS (20ms/frame)
All values are bytes (0–255).
Header: uint32 frameCount + uint32 soundEntries (8 bytes)
Frame: 6 parameter bytes + 2 unused bytes (8 bytes per frame)
| Byte | Parameter | Description |
|---|---|---|
| B0 | MouthExpr | Mouth expression blend |
| B1 | JawOpen | Jaw open amount |
| B2 | LipsMood | Lip mood (frown/smile) |
| B3 | Eyelids | Eye openness |
| B4 | EyesBrows | Eyes/brows master influence |
| B5 | BrowExpr | Brow expression |
Parameters control 10 morph channels across three groups (mouth, eyes, brows).
Weights within each group always sum to 1.0.
No separate left/right control.
- kirill_mapper (komarovs_mappers)
- Claude (Anthropic)