Teeth and tongue follow the head's jaw shape keys (#392) #479

Manually merged
github merged 1 commit from github-bot/gh-479 into gh-pr/479/base 2026-11-27 17:16:48 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 17:04 UTC · original
holdmysocks:teeth-jaw-392 → master · +301 −1 · 4 files · 1 commits · merged 2026-11-27 17:14 UTC

Follow-up to #392: the teeth and tongue now open with the jaw.

Problem
The face network moves only the head's skin. The lower teeth, the tongue and the head's inner-mouth vertices are skinned to the bones under FB_Jaw, and the game poses that joint in code. So a jaw-open shape key dropped the chin, but the lower teeth stayed shut against the upper teeth.

What this does (new jawkeys module, used by outfit exports)

  • In the jaw keys, the bony chin (the head vertices below and in front of the lower teeth) moves rigidly.
  • Each head key is fitted on the chin as a turn about the FB_Jaw joint. The jaw is a hinge, so the turn is preferred. When no turn fits, the key is fitted as a shift instead, for a jaw pushed forward or back.
  • A key is used when the fit leaves less than 30% of the chin's motion unexplained and the chin moves at least 1 mm.
  • Every vertex under FB_Jaw gets that motion, scaled by its skin weight there:
    • the teeth and tongue get a shape key of the same name;
    • the head's inner-mouth vertices get the motion added to the head's own key.
  • The report lists the fits under jaw_keys, with both residuals and the parts that took the keys.
  • This applies only when the outfit includes a teeth part (--add teethmodular_fr1, or _mr1 for men).

Checked on three heads

jaw open face_039 forward face_037 back face_034 sideways face_038 / face_040
player_story000_00 turn 16.6° 6.9 mm 5.1 mm turn 4.4° / 4.3°
cs_artim turn 16.6° 6.6 mm 4.4 mm turn 5.0° / 4.8°
cs_billy turn 14.5° 5.6 mm 3.7 mm turn 3.2° / 3.3°
  • Residuals are 0.01–0.29. Lucia's forward key is almost a pure shift (residual 0.01).
  • The first 40 network inputs line up across the three heads.
  • Side cut-aways rendered in Blender at full jaw open: with these keys, the lower teeth and gums turn down with the chin and stay behind the lower lip. Without them, the teeth stay shut.
  • Unit tests cover the turn fit, the shift fit and the small-motion cutoff.

Not covered

  • The real jaw angle per key is set by game code. This fits the angle from the skin, so it is close but not exact.
  • Facial clips still do not play on the head keys: the map from controls to network inputs is not in the shipped files.
  • The viewer's Expression panel moves only the head. Its teeth do not follow yet.
**@⁠holdmysocks** on GitHub · 2026-11-27 17:04 UTC · [original](https://github.com/holdmysocks/SixNG/pull/479) `holdmysocks:teeth-jaw-392` → `master` · +301 −1 · 4 files · 1 commits · merged 2026-11-27 17:14 UTC Follow-up to #392: the teeth and tongue now open with the jaw. **Problem** The face network moves only the head's skin. The lower teeth, the tongue and the head's inner-mouth vertices are skinned to the bones under `FB_Jaw`, and the game poses that joint in code. So a jaw-open shape key dropped the chin, but the lower teeth stayed shut against the upper teeth. **What this does** (new `jawkeys` module, used by `outfit` exports) - In the jaw keys, the bony chin (the head vertices below and in front of the lower teeth) moves rigidly. - Each head key is fitted on the chin as a turn about the `FB_Jaw` joint. The jaw is a hinge, so the turn is preferred. When no turn fits, the key is fitted as a shift instead, for a jaw pushed forward or back. - A key is used when the fit leaves less than 30% of the chin's motion unexplained and the chin moves at least 1 mm. - Every vertex under `FB_Jaw` gets that motion, scaled by its skin weight there: - the teeth and tongue get a shape key of the same name; - the head's inner-mouth vertices get the motion added to the head's own key. - The report lists the fits under `jaw_keys`, with both residuals and the parts that took the keys. - This applies only when the outfit includes a teeth part (`--add teethmodular_fr1`, or `_mr1` for men). **Checked on three heads** | | jaw open `face_039` | forward `face_037` | back `face_034` | sideways `face_038` / `face_040` | |---|---|---|---|---| | player_story000_00 | turn 16.6° | 6.9 mm | 5.1 mm | turn 4.4° / 4.3° | | cs_artim | turn 16.6° | 6.6 mm | 4.4 mm | turn 5.0° / 4.8° | | cs_billy | turn 14.5° | 5.6 mm | 3.7 mm | turn 3.2° / 3.3° | - Residuals are 0.01–0.29. Lucia's forward key is almost a pure shift (residual 0.01). - The first 40 network inputs line up across the three heads. - Side cut-aways rendered in Blender at full jaw open: with these keys, the lower teeth and gums turn down with the chin and stay behind the lower lip. Without them, the teeth stay shut. - Unit tests cover the turn fit, the shift fit and the small-motion cutoff. **Not covered** - The real jaw angle per key is set by game code. This fits the angle from the skin, so it is close but not exact. - Facial clips still do not play on the head keys: the map from controls to network inputs is not in the shipped files. - The viewer's Expression panel moves only the head. Its teeth do not follow yet.
The jaw bone that carries the lower teeth, tongue and inner mouth is
posed by game code, so the face network's jaw keys dropped the chin and
left the teeth shut. Each head key is fitted on the bony chin as a turn
about FB_Jaw (or a shift when no turn fits); outfit exports give the
teeth and tongue a shape key of the same name, add the motion to the
head's inner-mouth vertices, and list the fits under jaw_keys.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 17:09:16 +00:00
github-bot changed target branch from master to gh-pr/479/base 2026-11-27 17:16:47 +00:00
github manually merged commit a2da53e394 into gh-pr/479/base 2026-11-27 17:16:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.