Showcase: character model export with runtime-composed skin textures #28

Open
opened 2026-11-28 02:20:43 +00:00 by github-bot · 0 comments
Owner

@⁠nineforge0 on GitHub · 2026-11-28 02:19 UTC · original

First open-source character export with face textures from RPF9

forge9 v0.2.0 can now export character models with skin textures that the game composes at runtime, using the new --bind flag to manually resolve texture bindings that aren't stored in the archive's drawable records.

The problem

Character heads in the RAGE engine bind zero textures in their drawable data. The face skin is composed at runtime from a face library (entries tagged with baseSkinTone values skin_00..skin_04) in the ped texture catalog. No file in the readable archives maps a head to its face — the binding happens in code.

The solution

forge9 model --bind diffuse=HEXKEY --bind bump=HEXKEY force-attaches texture keys to every material that lacks that parameter. Combined with the ped texture catalog analysis, this lets us identify candidate face textures and bind them manually:

forge9 model packs.rpf 144/48 -o lucia_head.glb \
  --textures ttdb_peds_*.ttpf \
  --dedup textures.rpf \
  --bind diffuse=45d4caa0625ec055 \
  --bind bump=953715153d75447c

Results

  • High-detail head: 8,983 vertices, 2/2 texture refs resolved, embedded diffuse and normal maps
  • Legacy model: fully textured low-detail character (face, hair, outfit, skin), 7/10 refs resolved
  • Full character: 9 parts across 3 packs, 33/59 texture refs resolved (clothing colors are runtime-composed via material-ID)

What we learned

Finding Detail
Face format Pre-baked 1024×1024 BC1/BC5, not layered at runtime
Skin tone system baseSkinTone tag with values skin_00..skin_04
Pack structure Player parts span packs 144 (body/head), 119 (hands), 149 (teeth)
Ped-meta entry 143 130 parts, 0 texture variations; variations are in entry 5
Clothing colors Bound to black placeholder; real color is runtime material-ID
Hair Single-triangle stubs at LOD 0; likely strand/card rendering

Open research

  • The face-to-head binding (which face texture goes on which head) is not in any readable archive
  • Clothing diffuse colors need the material-ID color palette decoded
  • Hair rendering pipeline is unknown (strands? cards? compute?)

See docs/head_composite.md and docs/psin_format.md for the full technical references.

**@⁠nineforge0** on GitHub · 2026-11-28 02:19 UTC · [original](https://github.com/nineforge0/forge9/issues/28) ## First open-source character export with face textures from RPF9 forge9 v0.2.0 can now export character models with skin textures that the game composes at runtime, using the new `--bind` flag to manually resolve texture bindings that aren't stored in the archive's drawable records. ### The problem Character heads in the RAGE engine bind **zero textures** in their drawable data. The face skin is composed at runtime from a face library (entries tagged with `baseSkinTone` values `skin_00`..`skin_04`) in the ped texture catalog. No file in the readable archives maps a head to its face — the binding happens in code. ### The solution `forge9 model --bind diffuse=HEXKEY --bind bump=HEXKEY` force-attaches texture keys to every material that lacks that parameter. Combined with the ped texture catalog analysis, this lets us identify candidate face textures and bind them manually: ```bash forge9 model packs.rpf 144/48 -o lucia_head.glb \ --textures ttdb_peds_*.ttpf \ --dedup textures.rpf \ --bind diffuse=45d4caa0625ec055 \ --bind bump=953715153d75447c ``` ### Results - **High-detail head**: 8,983 vertices, 2/2 texture refs resolved, embedded diffuse and normal maps - **Legacy model**: fully textured low-detail character (face, hair, outfit, skin), 7/10 refs resolved - **Full character**: 9 parts across 3 packs, 33/59 texture refs resolved (clothing colors are runtime-composed via material-ID) ### What we learned | Finding | Detail | |---------|--------| | Face format | Pre-baked 1024×1024 BC1/BC5, not layered at runtime | | Skin tone system | `baseSkinTone` tag with values `skin_00`..`skin_04` | | Pack structure | Player parts span packs 144 (body/head), 119 (hands), 149 (teeth) | | Ped-meta entry 143 | 130 parts, 0 texture variations; variations are in entry 5 | | Clothing colors | Bound to black placeholder; real color is runtime material-ID | | Hair | Single-triangle stubs at LOD 0; likely strand/card rendering | ### Open research - The face-to-head binding (which face texture goes on which head) is not in any readable archive - Clothing diffuse colors need the material-ID color palette decoded - Hair rendering pipeline is unknown (strands? cards? compute?) See [docs/head_composite.md](docs/head_composite.md) and [docs/psin_format.md](docs/psin_format.md) for the full technical references.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 02:20:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.