New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Perspective Illusion

Perspective illusion

by dotslashsimran · MIT license · ★ 546 on GitHub

Perspective illusion cover

Make a looping illustrated 3D video in the Japanese perspective-illusion style (e.g. @garments__) of any place, such as a street, crossing, station, shop aisle, room, park or rooftop.

---
name: perspective-illusion
description: Make a looping illustrated 3D video in the Japanese perspective-illusion style (e.g. @garments__) of any place, such as a street, crossing, station, shop aisle, room, park or rooftop. A clean line-art scene squashed flat by a telephoto lens opens into deep perspective with dolly zooms, swings round to corner views that first read flat and then turn 3D, and objects quietly swap depth while the view is flat. Use when asked for a perspective or optical-illusion video, a "dolly zoom" or "flat to 3D" loop, an isometric-looking illustrated scene that turns out to be 3D, or to recreate one of these clips.
---

# Perspective illusion

## The style, in one paragraph

A level camera on a very long lens (about 2° from 400 m away) flattens a deep scene into what looks like a flat drawing. Then it dolly-zooms: the lens widens while the camera moves in, so the subject stays the same size but the space behind it stretches open. The camera also swings round to corner views. Each one starts flat and opens into 3D. While the view is flat, objects slide in depth where nobody can see it, so when the depth comes back, a row has become a diagonal. Everything is drawn as clean ink line art with flat two-tone shading, hatched cast shadows and a painted sky, and the whole thing loops seamlessly.

## Quick start

```
mkdir -p ~/Movies/edits/<date>-<name>/stills && cd $_
printf '{"type":"module"}' > package.json && npm i [email protected] [email protected]
cp -r ~/simcraft/skills/video/perspective-illusion/templates/* .
cp scramble_night.html scene.html                                # or the closest template (see below), then edit

Overview

A level camera on a very long lens (about 2° from 400 m away) flattens a deep scene into what looks like a flat drawing. Then it dolly-zooms: the lens widens while the camera moves in, so the subject stays the same size but the space behind it stretches open. The camera also swings round to corner views. Each one starts flat and opens into 3D. While the view is flat, objects slide in depth where nobody can see it, so when the depth comes back, a row has become a diagonal. Everything is drawn as clean ink line art with flat two-tone shading, hatched cast shadows and a painted sky, and the whole thing loops seamlessly.

Manual install (npx, ZIP)
Claude Codenpx skills add dotslashsimran/simcraft --skill perspective-illusion -g -a claude-code
Claude Code (degit)npx degit dotslashsimran/simcraft/skills/video/perspective-illusion#main ~/.claude/skills/perspective-illusion
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md14.3 KB
Read SKILL.md here
dotslashsimran/main1 file shown
SKILL.md
Show the full text180 lines

Perspective illusion

The style, in one paragraph

A level camera on a very long lens (about 2° from 400 m away) flattens a deep scene into what looks like a flat drawing. Then it dolly-zooms: the lens widens while the camera moves in, so the subject stays the same size but the space behind it stretches open. The camera also swings round to corner views. Each one starts flat and opens into 3D. While the view is flat, objects slide in depth where nobody can see it, so when the depth comes back, a row has become a diagonal. Everything is drawn as clean ink line art with flat two-tone shading, hatched cast shadows and a painted sky, and the whole thing loops seamlessly.

Quick start

mkdir -p ~/Movies/edits/<date>-<name>/stills && cd $_
printf '{"type":"module"}' > package.json && npm i [email protected] [email protected]
cp -r ~/simcraft/skills/video/perspective-illusion/templates/* .
cp scramble_night.html scene.html                                # or the closest template (see below), then edit
node render.mjs scene.html x --stills=0.3,1.5,3,6,8.5           # stills of each shot, in stills/
node render_fast.mjs scene.html preview.mp4 --preview            # whole loop, half size, about 1.5 min
node render_fast.mjs scene.html final.mp4                        # full quality, about 30 min for 10 s
python3 ~/simcraft/skills/video/vox-explainer/scripts/motion_check.py final.mp4
python3 ~/simcraft/skills/video/perspective-illusion/scripts/blink_map.py ffmpeg final.mp4 blink.png

Fix things on stills and previews. Render full quality only once the preview is approved. Set $FFMPEG if ffmpeg isn't on the PATH.

Templates

Start from the template closest to the new scene. Keep its camera rig, timeline, post pass and render hooks, and replace only the scene section (everything between // ---------- kit and // ---------- cameras).

Template Scene Renderer
street.html, street_plus.html Day street with poles, cones, a crossing and a red sky. street_plus adds detail and corner views. render_smooth.mjs
market.html, market_real.html A supermarket aisle, drawn and realistic. render_smooth.mjs (market.html: render.mjs)
scramble_night.html A big crossing at night in the rain, with a walking crowd, wet reflections and ad screens. It has every speed-up. render_fast.mjs

For a new scene, scramble_night.html is the best base for the engine, because it is the only one with the fast renderer hooks. Strip its night extras (see reference.md) for a day look.

Step 1: Build a scene that can fool the eye

Any place works if it has these:

  • One long axis. Lay the scene out along -z (a street, an aisle, a platform, a corridor), with the camera looking down it. Depth along this axis is what the telephoto hides.
  • Repeated things at different depths. Poles, lamps, shelves, columns, signs, trees, people. On a long lens they stack into one plane. Lined-up poles merge into one, and sign stacks on far facades pile into one wall.
  • Swap objects. 3 to 6 similar objects (cones, people, bins, chairs, boxes) whose arrangement changes between a row and a diagonal. They can also be drawn larger in the flat view (cs), so the scale reads right when flattened.
  • Real-world scale in metres. The lenses and focus planes only make sense at true scale: a 0.75 m cone, 1.7 m people, a 3.2 m storey.
  • Detail where the corner views look. Every corner view reveals building sides, the backs of objects and the ground. Fill them: side windows, drains, cables, kerbs, the contact shadow under a car. Flat views hide sloppiness and corner views expose it.
  • Make every detail part of one surface (textures, stacked sleeves), or keep separate surfaces at least 0.4 m apart. From 400 m away, surfaces a few centimetres apart flicker.

Step 2: Choreograph the camera

The camera is never tilted. It stays level so verticals stay vertical, like an architect's drawing. Each shot is a plain object:

{ x, y, zf, W, fov, H, el, yaw, lay, cs }

Key Meaning
x, y Camera side position and height (m)
zf, W The focus plane, and the width framed there (m). Keeping W while changing fov is the dolly zoom.
fov Horizontal lens angle. About 2° is flat, 25 to 90° is deep.
H Lens shift: where the horizon sits (-1 bottom, 0 middle, 1 top).
el Look down by raising the camera and shifting the lens, never by tilting.
yaw Swing round the focus point for corner views.
lay, cs Swap-object layout (0 row, 1 diagonal) and their flat-view scale.

Shot vocabulary that works:

Shot Settings
Flat fov about 2, H 0. The whole scene reads as one elevation.
Worm's eye Knee height, fov 90, horizon pushed low (H about -0.7).
High Camera up high on a medium lens, horizon above the frame.
Corner view yaw ±18 to 35°, el 9 to 50°. It comes as a pair: a telephoto version (fov 4) first, then the same view wide (fov 25 to 45).
Diagonal and low Medium lenses that show the swap objects in depth.

Loop structure. Flat, then a deep view, then a corner view (flat then 3D), back to flat (swap the objects here), a high diagonal, the other corner view, a low shot, then flat again. The loop ends on the shot it starts on.

Timing. All parameters run through one monotone cubic (Fritsch-Carlson) curve over the key times, so speed never jumps. Interpolate W and fov in log space. Add tiny "drift" shots (W × 0.96) so holds breathe instead of freezing. 10 s feels smooth, while 7 s feels rushed. To change the length, scale the key times rather than rewriting them.

Cheat while flat. Only change lay during flat holds. If the camera is moving in depth while objects move, the trick shows.

The first corner view should go to the side that the hero object (a car, a sign) does not cover. That way the reveal shows something new.

Step 3: The look

The page renders four passes: colour, normals with depth, flat colour (no lighting), and a sun-only shadow mask. A final shader combines them.

  • Ink lines where depth (second difference), normals or flat colour change. Make lines heavier up close. Ground markings get thin grey lines. Fade colour lines where one pixel covers many metres, or far textures turn to noise.
  • Two-tone shading. Light versus shade, with no gradients. Set the mask light to 2*PI, because three.js divides Lambert by pi, and without it everything turns to shade.
  • Hatch only cast shadows, with hatching anchored in world space (never screen space) and faded by fwidth.
  • Paint the sky by view direction, not screen position, so clouds stay put as the camera moves. Keep cloud edges soft.
  • Palette. 6 to 10 flat colours plus one accent (a red sky, a yellow sign). To match a reference, take the colours from its frames with k-means.
  • Light. One low, hard sun placed so the main subjects stay lit and throw long shadows across the ground. A sun from the tall side buries the scene in one big shadow.

For a night variant (moonlight, lit windows, wet reflections, glow, rain, grade), a crowd of walkers, or ad screens and signs, see reference.md.

To get a day look from scramble_night.html:

  • Swap the moon for a warm sun, and raise the ambient light.
  • Delete the point-light loop.
  • Remove the wet-ground block, the haze line and the night grade from the post shader.
  • Drop the rain, and set emissiveIntensity on windows to 0.
  • Paint a day skyAt.

Step 4: Detail passes (what makes it great)

First versions always look empty. Great versions come from deliberate passes, each checked on stills before the next one starts.

  1. Forms. Main masses at true scale, the long axis, the swap objects, and the camera timeline. Check that the flat shot really reads flat, and that every move reveals something.
  2. Structure. Everything a real place has, built from real-world logic. For a street, that means kerbs, drains, manholes, poles with their arms and boxes, signs on both faces, fences, bins, vending machines, bike racks, overhead wires, and window frames with sills and AC units. Look at photos of the real kind of place, and list what is there before building.
  3. Wear and story. Small things that make it lived-in: stickers, tape, posters with code-drawn text, puddle stains, a bicycle left leaning, laundry, a cat, a coffee cup. Aim for 3 or more per surface the camera lingers on.
  4. Corner-view audit. For each corner view, render the wide still and fill whatever looks bare there. Usually that is building sides, the backs of signs, rooftops (tanks, railings, antennas) and the ground between objects.
  5. Light and shadow. Make sure every object casts a readable shadow, add contact shadows under parked things, and get the shadow side of every main form into the two-tone step. Shadows that only appear in one view are a reward for the camera move.
  6. Life (optional). Walkers, a train or cars moving at constant speed, screens, birds, flags. Everything loops a whole number of times.
  7. Polish. Palette harmony, line weight, sky, vignette and grade. Then the blinking check on the final.

Density rule: from the flat telephoto shot, the frame should feel full edge to edge, like a dense illustration, with no large empty wall or ground area unless it is a deliberate rest for the eye.

The quality bar

Before any full render, check stills at every key time (and halfway between moves) against this list. Fix anything that fails, then check again.

  • The flat shot reads as a flat drawing. Nothing gives away the depth.
  • Every move ends on a reveal: a hidden diagonal, a side street, objects that were far apart.
  • Corner views start flat and open up, and the first one turns away from the hero object.
  • Lines are crisp and even, with no double lines, no ink on glowing faces, and no noise on far textures.
  • Two-tone shading is clear on every main form, and hatching appears only in cast shadows.
  • Nothing reads as a bare primitive. Every box has trim, seams, a base or a label.
  • Text is legible and spelled right, in real fonts, with made-up brands.
  • The sky matches the light direction and colour of the scene.
  • The palette is limited and harmonious, with one clear accent.
  • The loop seam is invisible (frame 0 equals the last frame) and nothing pops.
  • The preview has no stutter. On the final, the blink_map count is low, and what blinks is intended motion (rain, screens).

When reviewing stills, look at them like an illustrator: name the three weakest areas of each frame, fix those, and repeat. Don't stop at "it works".

Step 5: Render and check

  • render_fast.mjs renders each frame on the GPU as an average of jittered sub-renders: 4 for anti-aliasing, and up to 32 on fast moves for gapless motion blur, sized by how far window.probe points move on screen. Use --preview for half size at 30 fps. --from, --to and --fps are also available.
  • render_smooth.mjs gives the same quality for pages without renderMany, but averages in ffmpeg, so it is several times slower.
  • Merge static meshes by material at load (BufferGeometryUtils.mergeGeometries). One scene went from 7,654 draw calls to 530, about 7x faster. Keep anything that moves out of the merge.
  • Check the final with motion_check.py (nothing freezes) and blink_map.py, which counts pixels that flicker in nearly still frames. Compare the count before and after a change. Previews shimmer by design, so judge blinking on the final only.
The page contract

Any scene page works with the renderers if it provides:

Hook What it does
#frame The canvas that gets screenshotted.
window.READY Set once assets and fonts are loaded.
window.render(ms) Draws the frame at time ms.
window.probe(ms) Returns screen positions of a few world points, used to size the motion blur.
window.setJitter(x, y) Sub-pixel lens offset in pixels, set through projectionMatrix.elements[8] and [9].
window.renderMany([[ms, jx, jy], ...]) Averages several renders in one call (needed for render_fast).
?scale=.5 Renders at half size.

Everything animated must be a pure function of ms, periodic in the loop length. Use whole numbers of cycles per loop for steps, crawls and rain.

Blinking and glitches

Cause Fix
Anything in screen space (wobble, hatching, noise, haze by camera distance) Anchor it to the world or to view direction.
Surfaces a few cm apart Merge them into one surface, or keep them 0.4 m or more apart.
Overlapping coplanar planes (road markings, floor pieces) Paint markings onto one plane, and make pieces meet edge to edge.
Sub-pixel detail (rails, grids, cables, rain) Jitter anti-aliasing on every frame, and fade dense lines by metres per pixel.
One render per frame Never do this in finals.
Hard edges on clouds or reflections Soften them, and fade effects at screen borders.
Moving things that wrap or pop Wrap them during the fastest camera move of the loop, found with window.probe.

Pitfalls

  • A // comment added to one-line code swallows the rest of the line (a scene.add, a light). Use /* */.
  • Helpers that add to the scene root (like plane()) ignore the current group, and can land on top of things. Build inside groups.
  • Keep emissive faces (screens, sign panels) out of the flat-colour and shadow passes, or every glyph gets inked and darkened.
  • ffmpeg -stream_loop ... -c copy makes loops that some players stop early. Re-encode instead.
  • For X, side-by-sides at 32:9 are too wide to upload. Stack them vertically.
  • Use original characters and made-up brands only. Copy the technique of a reference, never its artwork.
1---
2name: perspective-illusion
3description: Make a looping illustrated 3D video in the Japanese perspective-illusion style (e.g. @garments__) of any place, such as a street, crossing, station, shop aisle, room, park or rooftop. A clean line-art scene squashed flat by a telephoto lens opens into deep perspective with dolly zooms, swings round to corner views that first read flat and then turn 3D, and objects quietly swap depth while the view is flat. Use when asked for a perspective or optical-illusion video, a "dolly zoom" or "flat to 3D" loop, an isometric-looking illustrated scene that turns out to be 3D, or to recreate one of these clips.
4---
5 
6# Perspective illusion
7 
8## The style, in one paragraph
9 
10A level camera on a very long lens (about 2° from 400 m away) flattens a deep scene into what looks like a flat drawing. Then it dolly-zooms: the lens widens while the camera moves in, so the subject stays the same size but the space behind it stretches open. The camera also swings round to corner views. Each one starts flat and opens into 3D. While the view is flat, objects slide in depth where nobody can see it, so when the depth comes back, a row has become a diagonal. Everything is drawn as clean ink line art with flat two-tone shading, hatched cast shadows and a painted sky, and the whole thing loops seamlessly.
11 
12## Quick start
13 
14```
15mkdir -p ~/Movies/edits/<date>-<name>/stills && cd $_
16printf '{"type":"module"}' > package.json && npm i [email protected] [email protected]
17cp -r ~/simcraft/skills/video/perspective-illusion/templates/* .
18cp scramble_night.html scene.html # or the closest template (see below), then edit
19node render.mjs scene.html x --stills=0.3,1.5,3,6,8.5 # stills of each shot, in stills/
20node render_fast.mjs scene.html preview.mp4 --preview # whole loop, half size, about 1.5 min
21node render_fast.mjs scene.html final.mp4 # full quality, about 30 min for 10 s
22python3 ~/simcraft/skills/video/vox-explainer/scripts/motion_check.py final.mp4
23python3 ~/simcraft/skills/video/perspective-illusion/scripts/blink_map.py ffmpeg final.mp4 blink.png
24```
25 
26Fix things on stills and previews. Render full quality only once the preview is approved. Set `$FFMPEG` if ffmpeg isn't on the PATH.
27 
28## Templates
29 
30Start from the template closest to the new scene. Keep its camera rig, timeline, post pass and render hooks, and replace only the scene section (everything between `// ---------- kit` and `// ---------- cameras`).
31 
32| Template | Scene | Renderer |
33|---|---|---|
34| `street.html`, `street_plus.html` | Day street with poles, cones, a crossing and a red sky. `street_plus` adds detail and corner views. | `render_smooth.mjs` |
35| `market.html`, `market_real.html` | A supermarket aisle, drawn and realistic. | `render_smooth.mjs` (`market.html`: `render.mjs`) |
36| `scramble_night.html` | A big crossing at night in the rain, with a walking crowd, wet reflections and ad screens. It has every speed-up. | `render_fast.mjs` |
37 
38For a new scene, `scramble_night.html` is the best base for the engine, because it is the only one with the fast renderer hooks. Strip its night extras (see [reference.md](reference.md)) for a day look.
39 
40## Step 1: Build a scene that can fool the eye
41 
42Any place works if it has these:
43 
44- **One long axis.** Lay the scene out along -z (a street, an aisle, a platform, a corridor), with the camera looking down it. Depth along this axis is what the telephoto hides.
45- **Repeated things at different depths.** Poles, lamps, shelves, columns, signs, trees, people. On a long lens they stack into one plane. Lined-up poles merge into one, and sign stacks on far facades pile into one wall.
46- **Swap objects.** 3 to 6 similar objects (cones, people, bins, chairs, boxes) whose arrangement changes between a row and a diagonal. They can also be drawn larger in the flat view (`cs`), so the scale reads right when flattened.
47- **Real-world scale in metres.** The lenses and focus planes only make sense at true scale: a 0.75 m cone, 1.7 m people, a 3.2 m storey.
48- **Detail where the corner views look.** Every corner view reveals building sides, the backs of objects and the ground. Fill them: side windows, drains, cables, kerbs, the contact shadow under a car. Flat views hide sloppiness and corner views expose it.
49- **Make every detail part of one surface** (textures, stacked sleeves), or keep separate surfaces at least 0.4 m apart. From 400 m away, surfaces a few centimetres apart flicker.
50 
51## Step 2: Choreograph the camera
52 
53The camera is never tilted. It stays level so verticals stay vertical, like an architect's drawing. Each shot is a plain object:
54 
55`{ x, y, zf, W, fov, H, el, yaw, lay, cs }`
56 
57| Key | Meaning |
58|---|---|
59| `x`, `y` | Camera side position and height (m) |
60| `zf`, `W` | The focus plane, and the width framed there (m). Keeping `W` while changing `fov` is the dolly zoom. |
61| `fov` | Horizontal lens angle. About 2° is flat, 25 to 90° is deep. |
62| `H` | Lens shift: where the horizon sits (-1 bottom, 0 middle, 1 top). |
63| `el` | Look down by raising the camera and shifting the lens, never by tilting. |
64| `yaw` | Swing round the focus point for corner views. |
65| `lay`, `cs` | Swap-object layout (0 row, 1 diagonal) and their flat-view scale. |
66 
67Shot vocabulary that works:
68 
69| Shot | Settings |
70|---|---|
71| Flat | `fov` about 2, `H` 0. The whole scene reads as one elevation. |
72| Worm's eye | Knee height, `fov` 90, horizon pushed low (`H` about -0.7). |
73| High | Camera up high on a medium lens, horizon above the frame. |
74| Corner view | `yaw` ±18 to 35°, `el` 9 to 50°. It comes as a pair: a telephoto version (`fov` 4) first, then the same view wide (`fov` 25 to 45). |
75| Diagonal and low | Medium lenses that show the swap objects in depth. |
76 
77**Loop structure.** Flat, then a deep view, then a corner view (flat then 3D), back to flat (swap the objects here), a high diagonal, the other corner view, a low shot, then flat again. The loop ends on the shot it starts on.
78 
79**Timing.** All parameters run through one monotone cubic (Fritsch-Carlson) curve over the key times, so speed never jumps. Interpolate `W` and `fov` in log space. Add tiny "drift" shots (`W` × 0.96) so holds breathe instead of freezing. 10 s feels smooth, while 7 s feels rushed. To change the length, scale the key times rather than rewriting them.
80 
81**Cheat while flat.** Only change `lay` during flat holds. If the camera is moving in depth while objects move, the trick shows.
82 
83The first corner view should go to the side that the hero object (a car, a sign) does not cover. That way the reveal shows something new.
84 
85## Step 3: The look
86 
87The page renders four passes: colour, normals with depth, flat colour (no lighting), and a sun-only shadow mask. A final shader combines them.
88 
89- **Ink lines** where depth (second difference), normals or flat colour change. Make lines heavier up close. Ground markings get thin grey lines. Fade colour lines where one pixel covers many metres, or far textures turn to noise.
90- **Two-tone shading.** Light versus shade, with no gradients. Set the mask light to `2*PI`, because three.js divides Lambert by pi, and without it everything turns to shade.
91- **Hatch only cast shadows,** with hatching anchored in world space (never screen space) and faded by `fwidth`.
92- **Paint the sky by view direction,** not screen position, so clouds stay put as the camera moves. Keep cloud edges soft.
93- **Palette.** 6 to 10 flat colours plus one accent (a red sky, a yellow sign). To match a reference, take the colours from its frames with k-means.
94- **Light.** One low, hard sun placed so the main subjects stay lit and throw long shadows across the ground. A sun from the tall side buries the scene in one big shadow.
95 
96For a night variant (moonlight, lit windows, wet reflections, glow, rain, grade), a crowd of walkers, or ad screens and signs, see [reference.md](reference.md).
97 
98To get a day look from `scramble_night.html`:
99- Swap the moon for a warm sun, and raise the ambient light.
100- Delete the point-light loop.
101- Remove the wet-ground block, the haze line and the night grade from the post shader.
102- Drop the rain, and set `emissiveIntensity` on windows to 0.
103- Paint a day `skyAt`.
104 
105## Step 4: Detail passes (what makes it great)
106 
107First versions always look empty. Great versions come from deliberate passes, each checked on stills before the next one starts.
108 
1091. **Forms.** Main masses at true scale, the long axis, the swap objects, and the camera timeline. Check that the flat shot really reads flat, and that every move reveals something.
1102. **Structure.** Everything a real place has, built from real-world logic. For a street, that means kerbs, drains, manholes, poles with their arms and boxes, signs on both faces, fences, bins, vending machines, bike racks, overhead wires, and window frames with sills and AC units. Look at photos of the real kind of place, and list what is there before building.
1113. **Wear and story.** Small things that make it lived-in: stickers, tape, posters with code-drawn text, puddle stains, a bicycle left leaning, laundry, a cat, a coffee cup. Aim for 3 or more per surface the camera lingers on.
1124. **Corner-view audit.** For each corner view, render the wide still and fill whatever looks bare there. Usually that is building sides, the backs of signs, rooftops (tanks, railings, antennas) and the ground between objects.
1135. **Light and shadow.** Make sure every object casts a readable shadow, add contact shadows under parked things, and get the shadow side of every main form into the two-tone step. Shadows that only appear in one view are a reward for the camera move.
1146. **Life (optional).** Walkers, a train or cars moving at constant speed, screens, birds, flags. Everything loops a whole number of times.
1157. **Polish.** Palette harmony, line weight, sky, vignette and grade. Then the blinking check on the final.
116 
117Density rule: from the flat telephoto shot, the frame should feel full edge to edge, like a dense illustration, with no large empty wall or ground area unless it is a deliberate rest for the eye.
118 
119## The quality bar
120 
121Before any full render, check stills at every key time (and halfway between moves) against this list. Fix anything that fails, then check again.
122 
123- [ ] The flat shot reads as a flat drawing. Nothing gives away the depth.
124- [ ] Every move ends on a reveal: a hidden diagonal, a side street, objects that were far apart.
125- [ ] Corner views start flat and open up, and the first one turns away from the hero object.
126- [ ] Lines are crisp and even, with no double lines, no ink on glowing faces, and no noise on far textures.
127- [ ] Two-tone shading is clear on every main form, and hatching appears only in cast shadows.
128- [ ] Nothing reads as a bare primitive. Every box has trim, seams, a base or a label.
129- [ ] Text is legible and spelled right, in real fonts, with made-up brands.
130- [ ] The sky matches the light direction and colour of the scene.
131- [ ] The palette is limited and harmonious, with one clear accent.
132- [ ] The loop seam is invisible (frame 0 equals the last frame) and nothing pops.
133- [ ] The preview has no stutter. On the final, the `blink_map` count is low, and what blinks is intended motion (rain, screens).
134 
135When reviewing stills, look at them like an illustrator: name the three weakest areas of each frame, fix those, and repeat. Don't stop at "it works".
136 
137## Step 5: Render and check
138 
139- **`render_fast.mjs`** renders each frame on the GPU as an average of jittered sub-renders: 4 for anti-aliasing, and up to 32 on fast moves for gapless motion blur, sized by how far `window.probe` points move on screen. Use `--preview` for half size at 30 fps. `--from`, `--to` and `--fps` are also available.
140- **`render_smooth.mjs`** gives the same quality for pages without `renderMany`, but averages in ffmpeg, so it is several times slower.
141- **Merge static meshes by material at load** (`BufferGeometryUtils.mergeGeometries`). One scene went from 7,654 draw calls to 530, about 7x faster. Keep anything that moves out of the merge.
142- **Check the final** with `motion_check.py` (nothing freezes) and `blink_map.py`, which counts pixels that flicker in nearly still frames. Compare the count before and after a change. Previews shimmer by design, so judge blinking on the final only.
143 
144### The page contract
145 
146Any scene page works with the renderers if it provides:
147 
148| Hook | What it does |
149|---|---|
150| `#frame` | The canvas that gets screenshotted. |
151| `window.READY` | Set once assets and fonts are loaded. |
152| `window.render(ms)` | Draws the frame at time `ms`. |
153| `window.probe(ms)` | Returns screen positions of a few world points, used to size the motion blur. |
154| `window.setJitter(x, y)` | Sub-pixel lens offset in pixels, set through `projectionMatrix.elements[8]` and `[9]`. |
155| `window.renderMany([[ms, jx, jy], ...])` | Averages several renders in one call (needed for `render_fast`). |
156| `?scale=.5` | Renders at half size. |
157 
158Everything animated must be a pure function of `ms`, periodic in the loop length. Use whole numbers of cycles per loop for steps, crawls and rain.
159 
160## Blinking and glitches
161 
162| Cause | Fix |
163|---|---|
164| Anything in screen space (wobble, hatching, noise, haze by camera distance) | Anchor it to the world or to view direction. |
165| Surfaces a few cm apart | Merge them into one surface, or keep them 0.4 m or more apart. |
166| Overlapping coplanar planes (road markings, floor pieces) | Paint markings onto one plane, and make pieces meet edge to edge. |
167| Sub-pixel detail (rails, grids, cables, rain) | Jitter anti-aliasing on every frame, and fade dense lines by metres per pixel. |
168| One render per frame | Never do this in finals. |
169| Hard edges on clouds or reflections | Soften them, and fade effects at screen borders. |
170| Moving things that wrap or pop | Wrap them during the fastest camera move of the loop, found with `window.probe`. |
171 
172## Pitfalls
173 
174- A `//` comment added to one-line code swallows the rest of the line (a `scene.add`, a light). Use `/* */`.
175- Helpers that add to the scene root (like `plane()`) ignore the current group, and can land on top of things. Build inside groups.
176- Keep emissive faces (screens, sign panels) out of the flat-colour and shadow passes, or every glyph gets inked and darkened.
177- `ffmpeg -stream_loop ... -c copy` makes loops that some players stop early. Re-encode instead.
178- For X, side-by-sides at 32:9 are too wide to upload. Stack them vertically.
179- Use original characters and made-up brands only. Copy the technique of a reference, never its artwork.
180 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 546
Checked
Source
dotslashsimran/simcraft ↗
Creator
dotslashsimran · 9 listings
View creator

Similar skills

See all →
3D Game Development Principlesdavila7/claude-code-templates · by davila73D game development principles. Rendering, shaders, physics, cameras.★ 32.3k GitHub stars3D Web Experience Builderdavila7/claude-code-templates · by davila7Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.★ 32.3k GitHub starsPascal 3D Scene Builderpascalorg/editor · by pascalorgConnect to Pascal and use its MCP tools to create, inspect, edit, validate, save, or hand off editable 3D building scenes. Use this skill whenever a user asks an agent to work in Pascal, make a room or building model, inspect a Pascal project, perform spatial edits, connect Pascal MCP, or return a verified Pascal editor link. It also governs safe local, existing-account, and explicitly authorized autonomous setup.★ 24.6k GitHub starsIsometric Technical Diagram Creatorwheresryan22/anatomy · by wheresryan22Build crafted, highly detailed, interactive isometric SVG figures that explain a technical idea as a real physical object (a test rig, a dial gauge, a cabinet of drawers, a plotter, a lock), with many small precise solid parts, four-tone shading, correct painter's order, a framed card with title, hint and live readout, and calm eased motion. Use this whenever someone wants an isometric illustration, an explanatory diagram or figure for docs, a blog post, a landing page or an article, a "Linear-style" or "premium" technical drawing, an interactive explainer, or an SVG that shows how a system, algorithm or component works, even if they never say "isometric". Works framework-free (TypeScript/JS that writes SVG and HTML) and in React/Next.js, and can add realistic WebGL shaders (fire, exhaust, water, caustics, lamp light) that live inside the drawing in the same isometric perspective. Also prints a figure as an A4 PDF (poster, drawing or handout) and publishes it to the Anatomy community gallery when asked.★ 16k GitHub starsScroll World Builderoso95/scroll-world · by oso95Build an immersive scroll-scrubbed "fly through the world" landing page for any industry or brand using Higgsfield. As the visitor scrolls, a pre-rendered camera flies from outside each scene into its interior, then flows on to the next scene with NO cuts — one continuous connected flight (Emons-style isometric diorama world, or any art direction you pick). The skill interviews the user for the topic, the story beats/sections, and brand kit, then generates cohesive scenes + seamless camera clips with Higgsfield and wires a portable, framework-agnostic scroll-scrub engine. The video chain renders through Monid by default (Seedance 2.0, pay-per-clip USD — capability re-checked each build, see Step 4) with Higgsfield credits as the fallback biller. Use when the user wants a "3D world" / browse-through-the-industry" hero, a scroll cinematic, a diorama landing, or to turn a business into a scrollable world.★ 9.8k GitHub stars3D Asset Generatorscenario-labs/skills · by scenario-labsUse when generating or handling 3D assets through the Scenario MCP server, including text-to-3D or image-to-3D meshes, GPT-6 Astra 3D or Claude Opus 5.5 3D, GLB, FBX, OBJ, STL, or VOX files, PBR-textured or game-ready models, voxel models, multi-view reconstruction, retexture, remesh, UV unwrap, auto-rigging a biped or quadruped, or retargeting an animation, previewing a mesh in the inline 3D viewer, or downloading a model for import into Unity, Unreal, Godot, or Blender.★ 854 GitHub stars

More from dotslashsimran

Clean Audiodotslashsimran/simcraft · by dotslashsimranClean up voice audio in a video: rumble, electrical hum, background noise and hiss, muddy or harsh tone, sharp S sounds, uneven volume, and loudness for YouTube/Instagram/TikTok. Measures the audio first, picks the strongest cleanup that doesn't make the words less clear, and keeps lip sync exact. Use when the user says "clean up the audio", "fix the sound", "remove background noise", "remove hum", "my audio is too quiet/loud", "make it sound better", or after a rough cut.★ 546 GitHub starsFrom Scratchdotslashsimran/simcraft · by dotslashsimranLearn how something really works by building the smallest working version of it from scratch, Karpathy style, one small step at a time, with the user predicting what each step will do before running it. Works for ML and AI ideas (attention, tokenizers, backprop, RAG, agents), systems (a database, an HTTP server, git, a shell) and anything else that can be coded. Use when the user says "teach me how X works", "build X from scratch", "I want to really understand X", "explain X from first principles", or "implement X without the library".★ 546 GitHub starsImage Gendotslashsimran/simcraft · by dotslashsimranGenerate images with the user's own API keys (Google Gemini "Nano Banana" or OpenAI gpt-image). Use when asked to generate, create or make an image, illustration, icon, cut-out, sticker, thumbnail, texture, mockup or visual asset, to edit an image, or to make several images that stay consistent (same character or object). Also used by the vox-explainer skill for collage cut-outs.★ 546 GitHub starsRepo Timelapsedotslashsimran/simcraft · by dotslashsimranTurn a git repo's history into a video of the project growing. Files appear as a living treemap coloured by language that grows with the code, glows when touched and fades on delete, with a date, a lines-of-code counter, commit messages typing in as captions and an activity sparkline. 16:9 or 9:16, dark or light. Use when the user says "timelapse of my repo", "visualise git history", "build in public video", "show how the project grew", "animate my commits", or wants a video of a codebase evolving.★ 546 GitHub starsReverse Engineer a Videodotslashsimran/simcraft · by dotslashsimranBreak down a reference or viral video clip so it can be remade. Finds every cut and dissolve, times each shot, measures pacing, works out the camera move in each shot (static, pan, tilt, zoom or push in, roll, handheld shake, with speed), finds beats and loudness jumps and checks whether the cuts land on them, and reads on-screen text and speech when the tools are installed. Makes a contact sheet, a timeline strip, breakdown.md with a beat map and a remake plan, and breakdown.json. Also makes side-by-side or stacked comparison videos of a remake against the reference. Use when the user says "break down this video", "reverse engineer this clip", "how was this edited", "shot list from this video", "why does this go viral", "recreate/remake this video", "what camera moves are in this", "do the cuts hit the beat", or "compare my remake with the original".★ 546 GitHub starsRough Cut: Trim the Fatdotslashsimran/simcraft · by dotslashsimranTrim the fat from raw talking footage. Turns raw video into a tight first cut by removing dead air, ums and uhs, stutters, false starts and bad takes (keeping the last good take), then checks the result by listening to it again. Use when the user says "rough cut", "first cut", "trim the fat", "cut the pauses", "remove the ums", "cut my retakes", "make it snappy", or hands over raw footage to edit.★ 546 GitHub stars