Communitygithub.com

physical-world-motion

从任意提示词做接近商用水准的代码动效短片。按读题、定风格、先规划再写代码、自审自修的流程工作;世界靠材质和光成立时走 Canvas/WebGL 出片管线,核心是文字/数据/界面系统或要对打 Remotion 参考实现时再走 Remotion。在用户要做动效、短片、动画、行业广告、展示片、纯代码视频或 Remotion 时使用。

physical-world-motion 是什么?

physical-world-motion is a Claude Code agent skill that 从任意提示词做接近商用水准的代码动效短片。按读题、定风格、先规划再写代码、自审自修的流程工作;世界靠材质和光成立时走 Canvas/WebGL 出片管线,核心是文字/数据/界面系统或要对打 Remotion 参考实现时再走 Remotion。在用户要做动效、短片、动画、行业广告、展示片、纯代码视频或 Remotion 时使用。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/W3967/physical-world-motion-skill/tree/HEAD/physical-world-motion

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Physical World Motion

Goal: From any prompt, follow a single method to read and verify requirements, then select an output pipeline. The final output should look like real footage or a top-tier studio—with camera positions, shot scales, and a sense of being watched—not like a templated layer composition or an "animated poster."

The difference usually isn't aesthetic but behavioral: sticking to each prompt item, turning adjectives into design decisions, first defining what this style looks like in the real world, choosing a directorial approach before coding, building a unified system, and revising until it passes.

This file contains only the process and hard standards. Pipeline commands, inspection scripts, and quality recipes are in pipelines.md. Do not copy recipes or default project appearances into new films.

Priority

When rules conflict, follow this order:

  1. Prompt Original Text: Every number, beat, copy, and prohibition is valid. The last third of a long prompt is as important as the beginning.
  2. Visual Quality & Craft: First define what this style is in the real world, then build according to that physical world. Materials, light, camera position & lens, lens feel, motion blur, and the hook moment are mandatory.
  3. Coherence: True morphing, identity preservation, and physically plausible motion.
  4. Rhythm & Sound.
  5. Accounting & Checking: Checklists and scripts serve the four items above; they cannot replace them.

Tools and examples provide mechanisms only, not appearances. It is forbidden to bring neutral defaults from helper functions (empty boxes, stick figures) or any example/film's subject, color palette, or composition unchanged into a new film.

Invocation

  • If creative direction is given, start immediately; fill gaps in Stage 1 and record them in "Interpretation." When no creative direction is given, reply only with: "Please provide a one-sentence creative idea or a complete prompt."
  • New prompt = new film; start fresh (create a new project directory if a file environment exists). Only modify older code when the user explicitly says to revise the previous version.
  • If only prompt / expansion: Complete Stage 2 and output a full brief, then stop.
  • Chat environment: Output code blocks in Stage 7. With files and terminal: Write files, render, run auto-checks, inspect still frames, fix issues, then deliver.

Stage 0 — Reading the Prompt: Three Checklists

  • S (Requirements): One line per value or instruction from the prompt, quoted verbatim. Include duration, aspect ratio, colors, fonts, copy, counts, angles, positions, time, easing, prohibitions, loop or end, characters, and storyboard beats. For truncated prompts, complete them based on tone and density of the last complete paragraph; mark added lines with S##*.
  • X (Transformations): Each "becomes/forms/gathers/spreads" written as source → target · mechanism · start-end seconds · what is conserved.
  • E (Elements): Each element to be drawn falls into a category (text, object, character, scene, data, UI, transition, texture & light, sound) with structural features, dimensions/coordinates, and motion. Characters also need character sheets and named poses. For each scene, append a layer table from back to front.

When two lines conflict, keep the more specific one and explain in the Interpretation. Constants, components, and beats in the code must be traceable back to checklist IDs.

Stage 1 — Filling Gaps

Only fill what the prompt didn't write; do not overwrite existing checklist lines. Default starting points (effective immediately after writing):

  • Aspect ratio 1920×1080; 60fps for motion-heavy, 30fps for calm or character scenes.
  • One idea ~15 seconds; showreel or brand film ~30 seconds. Loops must be seamless; stories/ads must have a definitive final frame.
  • Structure first. Stories/ads use "opening-development-twist-resolution" or "setup—turn—landing," with the hook on the twist or landing; loops use a periodic structure, don't force a conclusion, the hook is the peak of that loop. Don't force a "every 10 seconds" pattern. Rhythm follows emotion (calm 60–90 BPM, brand 110–128, burst 128–140). Planned pauses and breathing room are allowed.
  • One motif runs throughout. First define the directorial approach for this physical world and write it as values: shot scale, camera position, focal length, who is watching. Only lock to a frontal view if necessary (e.g., a composition that only works from one angle); do not default to a frontal poster.
  • 3–5 colors with assigned roles; one font with personality, heaviest and largest for the thematic text.
  • Distinguish diegetic sound (heard in the world) from music. Default to having music or ambient sound, but silence can be a tool (breathing room, tension, emphasis) and must be specified; if the user explicitly requests complete silence, comply.

Stage 2 — Defining the Style: Design Brief

First write: What this style is in the real world, then build according to that physical world. For example: collage is thick paper on a table, not flat layers; clay is hand-molded material with fingerprints, macro feel, and stop-motion look. This sets the upper limit of visual quality, not a decorative preamble.

Choose only one style source: if the prompt specifies a style, derive everything from the checklist; if only a medium or feeling is given (ink, newspaper, Swiss poster), you may reference recipes or design seeds and then adapt; if only a lighting idea is given, synthesize a new set (recipes and seeds are not the default look). New synthesis follows four steps: tie the subject to a material world (at most plus one contrast world); audience and mood determine energy (rhythm, easing, density); write the brief as values; every choice must trace back to the subject or prompt.

The brief must be written as values, not adjectives, and must include these six mandatory items:

  1. Materials: What material each element is made of, and how its surface is treated (paper texture, varnish, metal, glass refraction, etc., according to that physical world).
  2. Light: Motivated light sources, shadows, and volumetric feel (area light with soft shadows, ambient occlusion, time-varying light).
  3. Camera Position & Lens: Must be written as values, not just "has camera" or "has shot scale." For example: "medium close-up, slight low angle, ~35mm, from the edge of the table looking at this sheet of paper." This is a directorial decision, not a post-production effect; lock only when necessary.
  4. Lens Feel: Vignette, chromatic aberration, grain, exposure changes, depth of field—whether and how they appear. This is post-production feel, not to be confused with camera position.
  5. Motion Blur: Fast camera moves require sufficient sub-frames or equivalent handling; stop-motion is separate.
  6. Hook Moment: For stories/ads, specify at which second on the twist or landing; for loops, specify the peak second of that loop—do not force a conclusion. How does the structure support it?

Also specify: color palette, font hierarchy, composition & whitespace, motion personality, transition mechanism, diegetic sound & music (including planned silence), and prohibitions. Every choice must trace back to the subject or prompt; generic gradients, glows, and template compositions are exactly what the brief replaces.

For short prompts, first expand into a full brief (direction, brief, structure, storyboard timing), then generate checklists. In "prompt only" mode, output the brief and stop.

Referable quality recipes (20 styles, lib/ techniques, industry examples) are starting points, not the only menu. Full index in pipelines.md. When doing industry adaptations: same style means changing lens and narrative; forbidden to just swap the text.

Stage 3 — Timeline First

One line per scene: start-end seconds · structural position · name · shot scale and camera position · what the audience sees · elements brought in/out · transition out (X##). The directorial approach must not only be in the overall brief; each scene must state its shot scale and camera position (as values). Events written as t: element(E##) · action · value. Key moments go into a T block. Sound cues are derived from the same events and marked as diegetic, music, or planned silence; format in pipelines.md, shared by both pipelines.

Before proceeding: ensure structural sections and hook position are marked; beats land on pulse; the exit state of the previous scene equals the entry state of the next; no two actions compete for the same property simultaneously; actions finish before the film ends; the loop's last frame equals frame 0 with motion at rest. Planned pauses and breathing room are allowed; "dead section" refers only to unplanned idling.

Stage 4 — Still Frames Before Animation

First build element structure and character sheets, then key compositions (frame 0, the first complete frame after each scene or material change, the final frame). If still frames don't look good, don't expect motion to save them. In a file environment, render these still frames and visually inspect them before proceeding with animation. A contact sheet should allow someone to read the narrative direction.

Stage 5 — Choose the Pipeline

Branch after Stages 0–4; do not choose by tool habit from the start.

Use Canvas / WebGL (sy-style pipeline) when the world is built on materials and light, or when physical materials, 3D shading are needed, or when explicitly aligning with those 20 styles / industry ads / showreels:

  • Scenes are deterministic render(t): the same t always gives the same frame; do not use Math.random() for animation.
  • On-screen text goes into an overridable config; render parameters (including motion blur sub-frames) saved with the scene.
  • Fast camera moves get enough sub-frames to prevent double-images; stop-motion uses frame keys to reduce redundant renders.
  • When live preview, single-frame inspection, one-click re-branding, and showreel compositing (intro, info card, transition, outro, cover) are available, use the existing commands for this pipeline, see pipelines.md.
  • 3D on pure CPU will be slow: tune still frames first, then render the whole segment.

Use Remotion (React + SVG) when the brief is not tied to the above output library, and the film's core is text system, data, or UI state, or when closely matching a Remotion reference implementation for the same prompt:

  • Implement in a tested starter project; time is absolute seconds; frames are pure functions of frame number.
  • Helper libraries only handle position and motion mechanisms; the look must be redone per this film's design brief.
  • For company use, independently confirm the Remotion license (this skill text is distributed under MIT, but does not change the license of upstream repos and their dependencies).

Having text or characters does not automatically mean Remotion. As long as the world is built on materials and light, the main output stays WebGL. When both are viable, choose based on how the world is built, and explain in the Interpretation what the other pipeline cannot do.

Hard rules (both pipelines must follow):

  1. True Morphing: The same object moves point-by-point to the target, with the source disappearing when the target takes shape. Do not use overlays, cross-fades, or full-frame scaling to fake morphing.
  2. Identity Preservation: Colors, shapes, and slots must be maintained across scenes and materials, unless the prompt requires change.
  3. Spatial Words Are Coordinates: On 1920×1080, center is (960, 540); left/right approximately x=640/1280; top/bottom approximately y=360/760; other aspect ratios scale proportionally.
  4. Rhythm is Planned: Changes follow the beat; peaks are planned impacts; planned pauses and breathing room are allowed; "dead section" refers only to unplanned idling.
  5. Physics and Layers: Each scene has a back-to-front layer table; shadows share one light direction; contact relationships must be realistic (feet on ground, hand holding prop).

For construction, motion, and common failures of the nine element categories, see pipelines.md. Implement per category; do not invent placeholder graphics.

Stage 6 — Judge & Inspect

Six judges each score 1–10 and identify the worst single second. Fix the most critical issues first, up to three rounds, until all scores are ≥8.

  1. Demand: Each S/X/E item is fulfilled exactly as specified. This score caps the others.
  2. Direction/Narrative: Can the audience read the story from the contact sheet? Does the motif reappear visually? Can they remember a single image after watching? Camera positions, shot scales, and "who is watching" are written as values, appear in each scene's timeline, and are not default frontal posters nor only in the overall brief.
  3. Coherence: True morphing, identity preservation, and physical/layer relationships hold.
  4. Rhythm & Sound: Structure is clear; story/ad hook lands on twist or landing; loop hook is the peak of that loop; events land on planned beats or breathing room; loop seams are clean. Diegetic sound and music are distinguishable; planned silence holds, unplanned silence fails. If the output has sound, loudness approximately -15 LUFS, true peak no higher than -1 dBTP.
  5. Design: Keyframe compositions follow the brief; each element category passes its checks; visual identity is designed for this film, not moved from tool defaults or examples. Also check: hook holds; canvas edges are clean; text doesn't overlap or get cropped.
  6. Craft: Materials and light applied per element; rendering is deterministic; motion blur doesn't produce double-images. Prohibitions include: unrequested gradients and glows, generic fades, template-style centered title cards, stock library icons and emoji, placeholder copy, and copyrighted music.

In a file/terminal environment, auto-checks must run; do not revert to only textual reminders. Scripts must catch: format mismatches, residual placeholder specs, frame 0 color flash, loop seams, noise as music, unplanned silence, motion curve spikes, and unplanned dead sections. Then visually inspect what scripts can't see: first frame, hook, last frame, plus 6–9 frames for a contact sheet, and confirm whether the story can be read from it.

Stage 7 — Delivery

In a chat environment, reply in this order: Interpretation (style source, directorial approach, assumptions, conflicts, completed S lines—no more than 6 lines) → Checklist-Timeline (one text block for later editing) → File code grouped by path → Comparison table (did transformations truly arrive? is identity preserved?) → Six scores and three least confident items → How to run.

When the user says "continue," only fill missing files; when they say "evaluate and fix," only re-score and provide the changed complete files.

In a file/terminal environment: render via the chosen pipeline and run checks; use still frames and contact sheet as judges; after fixing, report the directory, scores, and output path.

相关技能