Skip to content

armgit / viz3d

Public Imported from GitHub
0

An AI agent skill that turns any subject into a 3D film or app

Live app film recipe and checks, asset table and catalog, from the toll test build

Nguyen Xuan An04be6b87901b
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md
index 3402bd2..e613cfc 100644
--- a/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/brief.md
@@ -51,7 +51,9 @@ beside each asset for scale) to blender/previews/. For 3 to 6 main assets, also
dimension blockout) and render in the same orthographic view and scale with a 1 m ruler, side by side, or stacked for
long objects; look at every sheet and fix wrong
scale, wrong proportions, missing parts, bad normals, holes, floating parts. Write
-blender/ASSETS.md listing every GLB, its nodes, pivots, clips, real-world scale and where it goes. Rules:
+blender/ASSETS.md with one table row per node: file, node name, pivot, facing, clips, real-world size and where it
+goes. Also write blender/catalog.json with the numbers the app needs (lengths, axle or wheel offsets, sensor heights).
+Check the facing in ASSETS.md against the exported file before handing over. Rules:
check GPU memory before GPU renders and use Workbench or CPU when it is full, no personal data. Write pass1_started_at.txt and
pass1_finished_at.txt (UTC). Budget about 80 tool calls; for a wide topic (more than about 6 asset families) budget 120. If the budget runs
out, stop after a family is exported and checked, and list the families not built. Report the asset list with sizes,
@@ -71,7 +73,8 @@ opens for any clicked object with live fields and a progress bar; a timeline str
the bottom right; zoom and camera buttons). Make your own name, logo and data; do not copy the reference's name,
logo, text or exact layout. Never call it a game in the UI.
-Work only in {{FOLDER}}/app. Stack: Vite + React + React Three Fiber (+ drei), pinned exact versions, serve on port
+Work only in {{FOLDER}}/app. Stack: Vite + React + React Three Fiber (+ drei, @react-three/postprocessing with N8AO for ambient occlusion), and
+Playwright as a dev dependency for checks and the film, all pinned to exact versions, serve on port
{{PORT}}. A plain data model (sites, units, tasks, events) drives everything; the 3D view and the dashboard both read
it, and a small seeded simulation advances it in real time so things move, statuses change and numbers tick. Load the
GLBs with instancing for repeats, drive every moving part and clip from the simulation. Clicking an object selects it
@@ -101,7 +104,8 @@ minimum distance and a height above the tallest model); selection rings far wide
footprint, an ellipse for long things, at most about 1.3x); bare white or grey ground (give every surface a real
material: asphalt, lane paint, verges, floors); a last shot where the site is small in a sea of empty ground.
-Write README.md, pass2_started_at.txt and pass2_finished_at.txt (UTC). Budget about 100 tool calls. Report: what was
+Record the film as {{SKILL_DIR}}/references/film.md "Live app films" says. Run the dev server as a background
+job and stop it when done. Write README.md, pass2_started_at.txt and pass2_finished_at.txt (UTC). Budget about 100 tool calls. Report: what was
built, how to run it, screenshot and film paths, checks with numbers, honest gaps, and a one-line caption suggestion
("Claude built a live <place>, every <main assets> modeled in Blender and running in three.js").
```
diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md
index b48e828..0fbaecb 100644
--- a/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md
+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/film.md
@@ -1,7 +1,7 @@
# Film craft
Rules learned from fixing real films made with this skill. They apply to every look; the dark documentary look
-leans on them most. Reading map: Pacing and text, Camera, Figures and places, Maps, Sound, Checks.
+leans on them most. Reading map: Pacing and text, Camera, Figures and places, Maps, Sound, Live app films, Checks.
## Pacing and text
@@ -55,10 +55,25 @@ leans on them most. Reading map: Pacing and text, Camera, Figures and places, Ma
- Mix to about -19 LUFS (or -16 for a short social cut), true peak under -1 dBFS; sound effects stay audible under
the music.
+## Live app films
+
+- Record with Playwright from a script in the app folder (`record_film.mjs`). An init script replaces
+ requestAnimationFrame, performance.now and Date.now with a virtual clock. While assets load, the clock advances by 0,
+ then the script pre-rolls the simulation a whole number of seconds and captures one screenshot per 1/30 s step.
+ Encode the frames with ffmpeg afterwards.
+- The simulation steps only from the virtual clock, never from wall time, so the same seed gives the same film.
+- Each beat's hero event (a unit reaching a booth, a truck under a gantry) must happen inside its beat. Spawn the hero
+ at a fixed simulation time so it lands 2 to 3 s into the beat, and check it on the sheet.
+- A plain-words strip carries one short line at a time, on the caption timer above.
+- A roof or canopy that hides the action from the camera angle goes semi-transparent (about 30% opacity).
+- Fly-to moves own the camera until they finish; a drag during a fly makes the camera jump.
+
## Checks
- Make contact sheets of the final encode at 1 fps (`scripts/contact-sheet.sh`) and look at every sheet. Check the
sheet files are newer than the video before trusting them; stale sheets hide regressions.
- Look for: captions cut early, figures under captions, clipped labels, empty map areas, soft shots, floating or
- sunken figures, doors that open onto walls, vehicles backing along their route, black frames at cuts.
+ sunken figures, doors that open onto walls, vehicles backing along their route, black frames at cuts. In a live app
+ film also look for: the cursor hidden or off target, UI over the action, selection rings wider than the object, a
+ followed unit that never reaches its event, and an event too short to see.
- Re-render only the time ranges you changed when the renderer supports it, then re-encode and re-check those ranges.