Skip to content

Render the Classic 3D portrait capture like the client - #85

Merged
voshond merged 3 commits into
mainfrom
unit-4-render-3d-portraits
Nov 9, 2026
Merged

voshond merged 3 commits into
mainfrom
unit-4-render-3d-portraits

Conversation

@voshond

@voshond voshond commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-up to #84. The 3D portrait in UI proof becomes a real headless render of the Forever Classic (SD) human male, framed like the client's SetPortraitZoom(1), instead of the static HD TemporaryPortrait stand-in.

What Changed

  • scripts/portrait-capture: renders the 1.12 model with classic-wow-model-viewer (MIT, three.js) in Playwright's headless Chromium. The model is bald (hairstyle geoset 1, because the library's default hair leaves a scalp gap). Transparency comes from difference-matting a black render against a white one, with the pose frozen so the two match.
  • Framing: FoV and view direction come from the portrait camera (type 0) in the pinned build's humanmale.m2 (FDID 119940, fetched from Wago). The camera aims at the posed head, and the turn and framing are calibrated against an in-game player frame, because the library's Stand pose leans the head differently.
  • The capture is stored once at nas:/volume1/Game/unit-frames/proof-portraits/classic/Male-Human.png (Blizzard art, never committed). Proof fetches it into .proof-art/portraits/. DEVELOPMENT.md and AGENTS.md describe the workflow.

Notes

  • CI can't reach the NAS, so it keeps rendering the HD TemporaryPortrait fallback. Only local proof runs show the capture.
  • The script patches one argument in classic-wow-model-viewer 0.1.0 and fails loudly if that code changes. The 1.12 model files come from the library author's demo CDN (--cdn or PORTRAIT_CDN to change).

UI proof

player

player

player-dead

player-dead

target

target

focus-portrait

focus-portrait

pet-portrait

pet-portrait

workbench-target

workbench-target

scripts/portrait-capture renders the bald 1.12 human male with
classic-wow-model-viewer in headless Chromium, framed like the portrait
camera, with alpha matted from black and white renders. The capture lives on
the NAS next to the other proof portraits.
Takes the field of view and viewing direction from the pinned build's
humanmale.m2 portrait camera, aims at the posed head and calibrates the turn
and framing against an in-game player frame. The pose is frozen so the black
and white renders match.
@voshond
voshond merged commit dd0d879 into main Nov 9, 2026
1 check passed
@voshond
voshond deleted the unit-4-render-3d-portraits branch November 9, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant