Skip to content

feat: continuous vector eyelid rig for imported avatars - #15

Draft
nkcbuilds wants to merge 1 commit into
feat/timed-blink-qafrom
feat/vector-eyelid-rig
Draft

nkcbuilds wants to merge 1 commit into
feat/timed-blink-qafrom
feat/vector-eyelid-rig

Conversation

@nkcbuilds

Copy link
Copy Markdown
Owner

Purpose

Make real progress toward continuous Live2D-like eyelid motion for a provenance-tracked single-image import. The previous raster lash warps formed exaggerated triangular corners and the drawn eye-sprite fades ghosted/doubled entire eyes.

This is a draft stacked PR targeting feat/timed-blink-qa (#14), which depends on draft #13 → #12 → #11 → #10 → #9. Do not independently merge into main.

Implementation

  • Actual geometry, not opacity timing: a pure Rev2D model transform creates four deformable thin vector eyelid ribbons, two for each eye, driven by the existing exact open/closed eye-mask vertices. The mask continues to clip the iris; the upper/lower strips move continuously with EyeLOpen and EyeROpen.
  • Strict topology checks require the original imported right/left eye mask, independently masked iris part, correct control association, finite, monotonic, converging mesh vertices, both upper/lower raster parts and two valid lash colors. Refuses smile-eye sprite layouts, missing iris occlusion, stale/foreign or already vectorized models.
  • Explicit new CLI: character eyes vectorize <project-dir> --experimental. Verifies original source/spec/model/textures SHA-256 first, revokes existing approval before any derived asset write, validates with the pinned Rev2D engine, creates an additional uniquely named model, writes a fresh provenance record and updates the manifest. Original PNG, texture images, existing model and drawn-eye files stay intact; approval is always false on output.
  • Existing incompatible closed/half whole-eye sprite overlays and extracted upper/lower lash images are only hidden in the derived model, not deleted. Eye-white/iris mask and other expression/mouth/head controls remain. The operation creates a genuine 30fps blink QA video/contact sheets, never auto-approves.
  • New docs/VECTOR_EYELIDS.md, agent workflow, roadmap and MIT sample attribution.

Actual visual result

Native raster lash warps (top) vs real continuous vector strips (bottom), matching six EyeOpen controls

Watch 1.2s/30fps vector-eyelid blink

  • Original extracted upper/lower lash textures were visibly stretched into triangular corners near closed EyeOpen=0.3/0.14. The derived vector strips follow the existing smooth curved occlusion mask and join at a clean closed line. No full-eye opacity blending is involved in the derived model. The style is simpler and not artist-approved.
  • Independently rendered 9 matching engine parameter states, an actual 36-frame 1.2s/30fps synthetic blink, and head/gaze comparisons (AngleX=±8, EyeBallX=±0.2, EyeOpen=0.35). Inspected actual pixels. Other art styles, detailed lashes and speaker video remain untested.
  • Ran normal character eyes vectorize against a separate ignored imported Hana project copy. Source→new rig SHA-256 verification passed; real character inspect confirms approved:false. A second disposable copy with QA-ONLY artificial approval verified that the operation revokes prior approval and leaves the new rig unapproved.
  • A third separate disposable QA copy forced approval only to exercise the renderer: scene new → scene validate → scene render produced a real 3.000s H.264 MP4 at 512×640, 30 FPS, 90 frames, passed FFprobe checker and actual 0/1/2s frames were visually inspected. Source rig never marked approved.

Tests

  • npm run verify: 225 passing tests across 39 files, TypeScript typecheck and build passed.
  • New unit/regression tests: preservation of unrelated rig properties, matching closed upper/lower centerlines, original model immutability, per-eye source color mapping, unsupported smile/malformed mask/missing iris/external binding rejection, no duplicate application.
  • git diff --check clean. Tiny attributed sample video/image included; all generated full models and private temp projects remain ignored.

Limitations / review gate

The vector stroke differs from original hand-painted eyelashes, can lose lashes/texture character, and may not work on 3/4 art or heavily occluded eyes. This is one MIT-licensed character, not proof of universal polished conversion. No automatic approval. Existing upstream avatar poses output from the original model may be outdated after vectorization; use this command's new derived-model blink QA and inspect head/gaze. Rebuilding restores original source rig; keep an independent backup before testing.

Keep this PR and the upstream stack draft until multi-style visual review, editability and release safety are evaluated.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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