From One Illustration to a Locally Rigged 2D Avatar
RuiC-2D
从单张图片制作可动形象:本地运行的 2D 虚拟形象编辑器,分层绑定 / 网格形变 / 口型与眨眼 / 时间轴动效 / MediaPipe 实时驱动 / OBS 输出,内置大肥鱼1号示例工程。
RuiC-2D documents a workflow from one illustration to a rigged avatar, with manual layer fixes, mesh rigging, lip-sync, local tracking and OBS output.
RuiC-2D is a local 2D avatar editor. README claims: import one front-facing illustration, tool attempts portrait segmentation and facial part layering, result becomes riggable character. Workflow runs on own machine — Node.js 20+ and Python 3.10+ required, no npm install, no account system, no cloud dependency for core editing. Project ships example project 大肥鱼1号 for immediate inspection. Article maps documented workflow from single image to rigged avatar, tracking, and OBS output. Automated steps flagged apart from manual editing. All feature statements below come from repository README; no quality or hardware guarantees added.
Import: automated first pass, manual points as fallback
Step 1 of README's three-step flow: drag PNG, JPG, or WebP onto homepage, or open built-in 大肥鱼1号 example. Image caps at 4096px max edge; working image limited to 2048px. Tool then runs local portrait segmentation and facial feature layering, producing hair, skin, clothing, and facial part layers.
Automation is attempt, not guarantee. README states illustration recognition can fail. Fallback is manual: place three points — left eye, right eye, mouth — then work continues. Contour edits and new parts layer on top of that. Separation matters: segmentation and layering are automated; point correction, contour fixes, and part addition are user edits.
- Automated: portrait segmentation, facial part layering, hair/skin/clothing layer generation
- Manual: three-point eye and mouth placement when recognition fails
- Manual: contour correction, new movable parts along outline
- Limits: single image gives no occluded back or side content; complex art, props, fine hair strands still need correction
Rigging: mesh grid and movable parts
Rig targets head, body, both eyes, mouth, tail, hair strands, plus custom parts like hands or sleeves added along outline. README documents mesh binding: drag eye-white contour and split range, coordinate grid at 5, 10, 25, 50, or 100px, wheel zoom, Alt + drag pan.
Custom part flow is manual: click 新增可动部位, trace outline by clicking, name it, pick fixed end and tip, drag 手动试位置 to test, then tune amplitude and period. 勾选「保存为自动摆动」keeps it as auto-swing on save. After contour changes, click 更新分层与绑定; normal save also checks rebuild need. Parameter validation runs before save; failed rebuild restores last valid project and layers.
- Automated: parameter validation, rebuild check on save, restore of last valid state on failed rebuild
- Manual: contour dragging, custom part tracing, fixed-end and tip selection, amplitude and period tuning
- View aids: original, independent layer, and motion views; grid PNG export
Lip-sync and timeline motion
Audio path: import voiceover under 配音 / 口型. README says lip-sync driven by real volume. Audio formats WAV, MP3, M4A accepted; FFmpeg required on system, conversion to 24kHz mono at import. Timeline double-click adds one blink, body tilt, or tail swing; motion returns to natural state before and after.
For live use, 麦克phone drives mouth. Both audio analysis and camera frames stay in browser per README. Sensitivity adjustable on site. Note: README FAQ flags cached old voice.wav as cause of stale lip-sync — refresh or re-import fixes it.
- Automated: volume-based lip-sync from imported audio, mono conversion via FFmpeg
- Manual: timeline entry for blinks, body tilt, tail swings; sensitivity tuning
- Requires: system FFmpeg for voiceover import
Live tracking and OBS output
Top 直播 tab enables microphone and camera, front-facing calibration, and OBS address copy. Tracking runs on local CPU via MediaPipe Tasks Vision (WASM). README states camera frames and lip audio are not uploaded; background uses Worker clock to dispatch actions. OBS side: add browser source, paste copied address, README suggests 1080 × 1080, keep workbench page open.
This is where automated and manual split again: tracking and action dispatch automated; calibration, browser-source setup, and keeping the page alive are user tasks. README's testing note applies here — camera and mic automation used virtual devices; real hardware permissions, exposure, noise, and tracking feel need user's own check.
- Automated: local MediaPipe face tracking, Worker-clock action dispatch, BroadcastChannel output
- Manual: mic/cam permission, front calibration, OBS browser source at 1080 × 1080
- Privacy per README: service binds 127.0.0.1; only AI image generation sends data out, and only on explicit click
Exports and what each format keeps
Four export targets. `.yxavatar` keeps original image, layers, binding, motions, voiceover, and player — reopens for further edits. `.mavatar` targets Mesh Avatar compatibility, but README notes new fine layers merge back to base image, and new independent part motion needs yxavatar to survive. PNG is current-pose transparent snapshot. WebM is 1080 square, 30fps, with voiceover, alpha preserved.
README verified WebM playback, alpha, and audio in browser; other editing software not verified one by one. Character package unpacks to `python3 -m http.server 8080`, then `/player/player.html?portable=1` plays standalone.
- `.yxavatar`: full re-editable project
- `.mavatar`: Mesh Avatar compatibility with stated motion/layer caveats
- PNG: transparent pose snapshot
- WebM: 1080² / 30fps, alpha, voiceover — format support in target editor needs separate confirmation
Stated boundaries worth reading first
README separates claims from limits cleanly. Portrait segmentation lacks full front/back occlusion understanding; large head turns, raised arms, or tail swings may expose missing pixels that need painting in. AI image generation is optional: activates only when local Codex CLI logged in with `image_generation` enabled; otherwise local painting fills closed-eye, half-closed, and A/半A/I/O mouth shapes. No API keys configured. Without AI, tail keeps existing contour deformation or existing assets — README says it will not fake a hidden tail root.
Licensing split matters for reuse: code MIT; example character 大肥鱼1号 artwork, variants, and voiceover reserved by author — swap in own assets for derivative work, get authorization before commercial use or redistribution of character assets.
- Occlusion: missing regions stay missing until manually painted
- AI route: optional, Codex CLI only, sole data-egress path
- Code MIT; example character assets author-reserved
- Hardware: README points to TEST-REPORT.md; real camera/mic feel unverified by automation
Conclusion
Documented path stays linear: one front-facing PNG in, local segmentation attempt, manual points if it fails, mesh rig with contour and part edits, audio-driven lip-sync, timeline accents, then MediaPipe tracking feeding an OBS browser source. Automation handles segmentation, validation, lip-sync analysis, and tracking dispatch. Human handles points, contours, custom parts, calibration, and OBS setup. README itself flags what is unverified — real hardware behavior, occluded regions, third-party editor format support. Read limits before judging output.
Sources and project page
Similar Projects
Discover other similar projects and AI models.
Add new motions to a Live2D model by editing JSON only, without Cubism Editor, with a browser-based WebUI and docs that let AI coding agents do the work.