# Determinism

Same spec, same seed, same pixels. That's what makes tests, diffs and exports reliable.

A Motion SDK scene renders the same way every time. Frame 300 is a pure function of the scene and the time `300 / fps`. It doesn't depend on how fast earlier frames rendered, the wall clock, or anything random that isn't seeded.

## What Makes It Deterministic

- **Time is an input.** The core evaluates the scene at any time `t`. Exports step `t = start + i / fps` for frame `i`, so rendering is independent of speed.
- **One seed.** The scene's `seed` drives a portable PRNG for every random choice: particles, scatter, jitter, cloud drift, film grain.
- **Closed-form motion.** Particles, springs and path following are evaluated in closed form or with fixed iterations, not stepped with the frame's `dt`. Physics is simulated once when the scene loads, then scrubs like keyframes.
- **Loops that close.** A looping timeline makes particles, grain and animated materials repeat with its length.

## What It Gives You

- **Golden-image tests.** CI renders scenes on a software GPU and compares them with saved frames, within a small tolerance.
- **Diffs.** A change to the scene that shouldn't change pixels, doesn't.
- **Reliable exports.** The MP4 shows what the preview showed.
- **Self-review.** An agent can render frame `t = 2.5`, look at it, fix the scene and render the same frame again.

## What Can Differ

Different GPUs and drivers round floating point slightly differently, so pixels can differ by a step or two between machines. Tests use a tolerance for this. The same machine and driver give identical output.
