Skip to content
Back to skills

Speed Fx

ASecurity

**Use for**: "more speed", "make it feel fast", a cinematic or racing-game feel, motion blur, speed lines, a camera that breathes, cuts between shots, film grain. **Status**: the method comes from two verified demos (an eased camera push on a boulevard; speed lines, streaks, cuts and grain on a ride); the scripts below pass their offline checks and have not yet been run in Play. Speed is read from the near layer first. Before any effect, check that the near rhythm exists (dashes, posts, shado...

  • 21 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentsgonode

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add josazar/skill-endless-scene --skill speed-fx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Speed Fx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Speed Fx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/josazar-speed-fx/badge)](https://www.skillsdirectory.com/skills/josazar-speed-fx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!-- sub-skill of endless-scene: read ../../SKILL.md first (shared rules, build order) -->
# Sub-skill: speed-fx (the cinematic feeling of speed)

**Use for**: "more speed", "make it feel fast", a cinematic or racing-game feel, motion blur, speed lines, a camera
that breathes, cuts between shots, film grain. **Status**: the method comes from two verified demos (an eased camera
push on a boulevard; speed lines, streaks, cuts and grain on a ride); the scripts below pass their offline checks and
have not yet been run in Play.

Speed is read from the near layer first. Before any effect, check that the near rhythm exists (dashes, posts,
shadows, tufts at the verge: rule 5 of the main skill). Effects amplify it; they do not replace it.

## Build

1. In `scene.json`, `speedFx`: `lines` (`focus` = the road's vanishing point in world units, `clear` = the hero, kept
   free of strands; `strands`, `fps`, `skyTop`, colours), `grain` (`cell` >= 2 px, `fps`, `vignette`), `camera`
   (`push` [amount, period s], `rushDrop`, `rushCloser`, `rushPitch` degrees, `bank`, `rushBank`, `shake`), `cuts`
   (`pivot` = the hero, `side` radians, `dur`, `punch`, `auto`, `gap`, `hold`). `false` turns `lines` or `grain` off.
2. `node scripts/compose.mjs scene.json out/` writes `speedFx-screens` (`Speed Lines` and `Film Grain`: huge quads at
   the origin, never culled, moved onto the screen in the vertex stage) and the document part, which drives the
   camera named in `camera.name`. Put speed-fx last: it reads the heading and drift the ride part sets. On a road
   scene, compose with `--merge` onto the road's `ride.html` and set the road's `cameraPush` to 0: one script only
   may move the camera.
3. Everything reads the shared clock: lines appear as the rush builds, the camera drops and closes in, and fast cuts
   only happen during a rush. `window.KIT_CUT(-1 | 0 | 1)` cuts by hand (left, behind, right).

## The effects, cheapest first

| Effect | How | Numbers that worked |
|---|---|---|
| Camera push | ease the camera along its view axis and back over a long cycle | 0.34 m over 14 s on a car shot |
| Rush pose | at rush: closer, lower, a small downward look, banking into turns | ~4 units lower, 10 closer, 1.5 deg down |
| Speed lines | a screen plane, radial strands from the road's vanishing point, redrawn at a low frame rate | none over the hero or the sky band, out of the top 40 % of the frame |
| Near-prop streak | in the vertex stage, stretch the trailing half of props near the lens along the travel, scaled by rush and nearness | stretch capped at x2.4, `smoothstep(far, near, distance to camera)` |
| Speed particles | a few hundred quads wrapped in the vertex shader, one depth per quad so it stays whole | ~320 quads |
| Cuts | swing between shots with an ease, a small zoom punch at mid-swing, a decaying shake, a burst of speed lines; fast cuts only at high speed | 0.45 s swing, shake e^-6t, burst e^-3.5t |
| Film grain | a second screen plane: grain and a soft vignette, redrawn at the sprites' frame rate | grain cells >= 2 px |
| Tail-light flare | the lamp, its halo and a flare quad in the lamp's plane (elliptic core, soft halo, thin anamorphic streak) brighten with acceleration and fully under braking, through one damped uniform | full at ~6 m/s2, idle 20 %, response 7 /s |

The streak and the particles belong in the material of the props they move (they are not in the document part):
add the stretch to that material's `positionNode` through `placed()`, and keep the shadow in the original shape.

## Rules

1. **Screen planes are never culled**: a big plane at the origin, moved onto the screen in the vertex stage; it can
   lay a translucent layer but cannot read the frame. Measured: `viewportSharedTexture` in a custom material stops
   the renderer at once (`currentPass.end is not a function`, frozen canvas), and custom blend factors
   (`CustomBlending`, such as a DstColor multiply) are ignored: the quad's colour is written opaque. Use normal alpha
   blending.
2. **Temporal AA eats fine patterns**: anything finer than ~2 px or changing every frame averages away. Size grain
   and dithers for it, and judge them at 1:1 on a capture taken after a few seconds of real time. Measured: a 1 px
   stripe pattern keeps about 13 % of its contrast, an 8 px one all of it; a grain hashed per device pixel added
   +0.3/255 of high-pass RMS over a frame without grain, i.e. nothing. Build grain from noise at the cell size only,
   with no per-pixel term.
3. **Tone falloff without reading the frame**: positive grain blends toward the light colour, negative toward the dark
   one, with alpha |grain|. Lightening then fades in the highlights (`a * (1 - dst)`) and darkening in the shadows
   (`a * dst`), as on a print. Fold the vignette `v` into the same pair: `alpha = 1 - (1 - a) * v`,
   `colour = toward * a * v / alpha`.
4. **Stretched halves reveal back normals**: face the normal to the eye in streak mode, or a sheen term goes NaN and
   the half turns black. Keep the shadow in the original shape (`castShadowPositionNode` = the unstretched position).
5. **A zoom punch and a smear must not peak together**, or the hero swells during a cut; the check refuses a punch
   over 3 % of the camera-to-hero distance.
6. **Depth of field**: Spline's post-processing DOF blurred the whole frame evenly in tests (its focus units are not
   world units). Fake it per layer (a softer far card, a blurred near streak) until measured.
7. **Every effect reads the shared clock** (speed table, `rush`), so all of them rise and fall together.

## Verify

Before tuning any screen effect, one lab frame with 1 px stripes on one half of the screen and 8 px stripes on the
other, at the same contrast, tells what survives the final filter. `node scripts/check.mjs` here (refusals), then the
skill's `node scripts/check.mjs` (the camera drops at the rush, a frozen clock gives the same frame). In Play: the
same camera and travel distance with and without the effect; a frozen frame at rush (`window.KIT_FREEZE = 9`) and at
cruise; frame intervals in a separate moving run.

Files in this skill

  • SUBSKILL.md6 KB
  • scripts/check.mjs1.6 KB
  • scripts/speed-fx.js7.5 KB
  • scripts/speed-fx.mjs4.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.