Skip to content

Add generated character parts, FFT registration and animated rig export - #21

Open
aldegad wants to merge 9 commits into
mainfrom
plan/parts-rig
Open

aldegad wants to merge 9 commits into
mainfrom
plan/parts-rig

Conversation

@aldegad

@aldegad aldegad commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Generated character parts need to be aligned to their base illustration before they can form a reusable animated rig. Add parts-gen, parts-match, and parts-rig: catalog-driven parallel generation with measured chroma transparency, FFT template registration with explicit acceptance gates, and JSON/HTML/GSAP exports for audio-driven mouth variants, blinking and head sway.

Registration uses an FFT shortlist followed by exact agreement scoring and reports each failure plus composite color error and coverage. The runtime preserves global layer order across transformed groups, hides underlying eyes during closed blinks, and uses exact sample boundaries to prevent lip-sync drift. Partial generation reports retain earlier failures. README, skill instructions and the catalog/runtime contract document the workflow and its limits; public fixtures are synthetic.

Validation: full suite 1,018 passed after merging current main; final blink regression plus all parts tests 21 passed. HyperFrames check passed, and browser forward/backward seeks reproduced the same mouth, eye and group-transform state. Private character assets and video stay outside this public repository. Numeric registration passing does not guarantee facial identity fidelity, and variants inherit default placement rather than receiving an independent fidelity gate.

…g export

New `sprite_gen/parts/` subdomain (plan sprite-gen/parts-rig): a parts catalog
declares each body part's draw order, box, pivot, group and prompt; `parts-gen`
generates every part alone (base + padded crop as refs, chroma-keyed to RGBA,
parallel); `parts-match` registers each part onto the base by pixel agreement,
top-most first so lower parts are scored only where visible, and gates on
colour tolerance + agreement floor + full-composite reproduction; `parts-rig`
exports rig.json, an HTML fragment of absolutely positioned part variants with
group pivots, and deterministic GSAP keys (mouth from the audio RMS envelope,
fixed-cadence blinks, sine head sway). Synthetic-shape tests pin the contract.

Claude-Session: https://claude.ai/code/session_01FDjgrqLHx8qFqBFMKimevD
…dge despill

Registration keeps the candidate's own aspect ratio (a part is never stretched
to its box), searches a wider scale range on a downscaled pyramid level
first, and reads the agreement floor per part from the catalog. Keyed parts
get an edge despill so antialiased rims no longer carry the key hue.

Claude-Session: https://claude.ai/code/session_01FDjgrqLHx8qFqBFMKimevD
…declared composite gate

Registration now computes every offset of every scale (0.50-1.10, step 0.02)
with FFT correlations, shortlists per scale, and re-scores the shortlist with
the agreement objective. A 14-part 1024x1536 character registers in ~25 s
instead of ~6 min. The composite tolerance and coverage floor are declared in
the catalog (composite.tolerance / composite.coverage) rather than hard-coded.

Claude-Session: https://claude.ai/code/session_01FDjgrqLHx8qFqBFMKimevD
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