animated-svg-character-rigging

/home/avalon/.hermes/skills/creative/animated-svg-character-rigging/SKILL.md · raw

Animated SVG Character Rigging

Use this when a user wants a person/character turned into an SVG illustration or animated SVG, especially when the request mentions joints, scaffolding, puppet-style body parts, or pose-driven dance/motion.

Goal

Create a stylized, readable SVG character built from segmented body parts with explicit joint pivots, then animate it in a way that survives common SVG renderers.

  1. Extract pose structure first - If the source is an image, use vision to identify:

  2. Choose a simplified body decomposition - Separate into:

  3. Build the SVG around local joint origins - Author each body part in a local coordinate system where the joint sits at or near (0,0). - Nest child parts inside parent groups:

  4. Prefer nested positioned groups + animateTransform for motion - For compatibility, avoid relying on CSS animation of SVG groups when those groups also have inline SVG transform attributes. - This task revealed a real failure mode: some renderers effectively dropped or mis-composed the base transform, causing the figure to render mostly off-screen. - Safer pattern:

<g id="character-wrap" transform="translate(450 815)">
  <animateTransform attributeName="transform" type="translate" additive="sum" ... />
  <animateTransform attributeName="transform" type="rotate" additive="sum" ... />

  <g transform="translate(-100 -56) rotate(-30)">
    <animateTransform attributeName="transform" type="rotate" additive="sum" ... />
    <!-- upper arm -->
    <g transform="translate(-34 -176) rotate(-8)">
      <animateTransform attributeName="transform" type="rotate" additive="sum" ... />
      <!-- forearm -->
    </g>
  </g>
</g>
  1. Center the whole character intentionally - After drawing, check the character's effective bounds against the viewBox. - Align the figure with the scene anchor (for example, a ground shadow ellipse under the feet/center of mass). - If a render shows only a corner of the character, suspect transform composition or viewBox mismatch before rewriting the art.

  2. Validate with static raster QA - Render the SVG to PNG using a local rasterizer if available. - This is useful for checking:

  3. Run design QA on the render - Ask vision to check:

Renderer compatibility lessons

Avoid this fragile pattern

Prefer this pattern

Common failure modes

1. Character mostly off-screen

Symptoms: - only a corner of the figure is visible - background looks correct - the subject is absent from the intended ground/shadow area

Checks: - top-level character group translation - transform order - CSS vs inline transform conflicts - viewBox not covering actual character coordinates

Fixes: - move the top-level character group down/right into the active viewport - replace CSS-transform-driven motion with nested groups + animateTransform - keep the scene anchor (like an oval shadow) fixed and align the figure above it

2. Static render looks too dark / unreadable

Symptoms: - body merges into the sky/background - details disappear in Telegram or raster previews

Fixes: - increase contrast between subject and background - avoid very dark fills against dark skies - add lighter skin tones, highlights, or outline separation

3. Rig markers feel disconnected

Symptoms: - joints look like floating dots - scaffold lines do not describe anatomy

Fixes: - ensure every joint corresponds to an actual pivot - visually align rig lines through limb centers - keep pelvis, shoulders, elbows, knees, and ankles readable

Output checklist

Good defaults

Notes