Remotion + Three.js Documentary Starter Kit · Programmatic video

Remotion + Three.js: build a 3D documentary without two codebases

The painful part of 3D documentary work in Remotion is not the rendering — it is maintaining two codebases, one for video and one for web, and fighting frame drift and headless WebGL crashes. The fix is to put every 3D scene in one framework-agnostic package and drive it with plain progress props.

The quick answer

  • Keep all 3D scenes in one package with zero Remotion imports. Scenes take normalized progress/time props and nothing else.
  • Render video from that package with Remotion (24fps, 1080p/4K) and render the web app from the same package with React Three Fiber — the scenes and datasets are identical in both.
  • Drive animation from props, not from useFrame(). Deterministic frames mean no drift between preview and render, and no flicker in headless Chromium.
  • Batch-render with a CLI (render:pack) instead of rendering one composition at a time by hand.

The problem: two codebases, one documentary

A 3D science or history explainer usually ends up as two projects. The video side lives in Remotion: compositions, timelines, ProRes masters. The web side lives in a React app: the same globe, the same planet, the same scale models — rebuilt with different code, different animation logic, and different data. Every correction has to be made twice. Every dataset drifts apart sooner or later.

Then there is the rendering pain. React Three Fiber's useFrame() is built for real-time interaction, not for deterministic frames. In headless Chromium, frame timing wobbles, WebGL contexts crash under ANGLE, and the render you get is not quite the preview you approved. The usual advice — "just re-render it" — costs hours on a 4K batch.

The architecture that fixes both problems is simple to state and worth doing properly: one core package owns every scene, and both outputs are thin shells around it.

One core package, two outputs

Structure the project as a pnpm monorepo with three parts:

  • packages/core-3d — the scenes. Framework-agnostic. No Remotion imports, no web-app imports. A scene is a function of its props: normalized progress (0 to 1 across the shot), time, and data. That is the whole contract.
  • apps/video-studio — the video side. Remotion 4 compositions that import scenes from core-3d and map each frame to a progress value. 24fps, 1080p or 4K, with a batch CLI.
  • apps/companion-web — the web side. A Vite + React app that imports the exact same scenes and datasets, and lets viewers orbit, scrub, and explore them interactively.

Because the scenes never import Remotion, they can render anywhere React Three Fiber runs. Because the video side never owns scene logic, a fix to a shader or a dataset lands in both outputs at once. That is the entire trick — and it is the difference between a demo and a production pipeline.

Deterministic animation: props in, frames out

The rule is: no useFrame() inside a scene. Instead, every animation is a pure function of the progress prop. A planet rotates progress * 360 degrees. A camera moves along a path evaluated at progress. A shader uniform is computed from progress and time passed in as props.

This buys three things. First, determinism: frame 240 of a render is always the same image, so preview and final output match. Second, scrubbing: Remotion Studio can jump to any second without playing through the timeline. Third, reuse: the web app can drive the same scene from a slider, a scroll position, or an animation loop — the scene does not care where the progress value comes from.

The same discipline applies to data. Datasets live in core-3d next to the scenes that use them, so the voyage globe and the video's voyage globe can never disagree about the route.

What the scenes actually look like

A documentary starter kit needs scenes that teach the pattern, not just pretty renders. Four scene types cover most of the ground:

  • A metric scale stage. Drop in any .glb model and it is auto-scaled to real-world meters with THREE.Box3 — a 12.5-metre theropod next to a human silhouette, at true scale, with no manual sizing.
  • A shader-driven environment. Custom GLSL shaders for a tidally locked lava exoplanet: a magma ocean above 2,000°C, a corona, and a rim light — plus a secondary-eclipse light curve rendered from the same data.
  • A voyage globe. A procedural antique map with a progressive route animated by SLERP, and a Haversine-based kilometre odometer that counts up as the route advances. History documentaries reuse this pattern constantly.
  • An epistemic HUD. Bilingual (English/Spanish) overlay graphics rendered with a transparent alpha channel, so the same HUD works over video and over the web app.

Each scene is small on its own. The value is that they share the same props contract, so adding a fifth scene means writing one component, not wiring a new pipeline.

Batch rendering without babysitting

Rendering one composition at a time in Remotion Studio is fine for a single video. For a documentary series it is a bottleneck. A batch CLI — render:pack with --gl=swiftshader, --concurrency, and --out flags — renders the whole pack in one command: 1080p H.264 previews for review, 4K ProRes HQ masters for delivery, and transparent ProRes 4444 or VP9 alpha HUD overlays for compositing.

Two details matter here. First, --gl=swiftshader (software GL) avoids the ANGLE crashes that kill headless GPU renders on many CI machines and servers. Second, rendering previews and masters from the same command, from the same code, means the preview you approve is the master you ship — no re-render drift.

Remotion vs the alternatives

ApproachCostWhat you ownBest for
Remotion + Three.js (this article)Free for individuals and teams up to 3 peopleCode, scenes, rendered MP4sDeterministic, repeatable 3D docs
AI video generatorsPer-credit / subscriptionClips, not sourceOne-off shots, mood footage
Traditional NLE + BlenderSoftware + artist timeProject filesHand-crafted hero shots
Built-in AI video tools (e.g. Claude Motion)Team/Enterprise plansAccess, not sourceTeams already on those plans

AI generators are fast for a single shot and useless for a series: you cannot re-render frame 240 exactly, and you cannot reuse the scene on the web. Remotion's advantage is ownership and repeatability — the video is code, so version control, review, and re-rendering all work the way software already works.

Getting started: the starter kit

If you want to skip the weeks of wiring — the monorepo setup, the ANGLE-safe GLSL, the calculateMetadata quality switching, the batch CLI — that is exactly what a starter kit is for. Our Remotion + Three.js Documentary Starter Kit is the architecture in this article, ready to render: a clean pnpm monorepo with 9 deterministic 24fps compositions, 55 clean source files, the four scene types above, full PDF documentation, and zero node_modules in the archive. Run pnpm install && pnpm studio and render right away. One-time payment of $79.

Skip the wiring, keep the scenes

The Remotion + Three.js Documentary Starter Kit: 9 compositions, 55 source files, 4K ProRes output, and the same scenes as an interactive WebGL app. One-time payment of $79.

Learn more about the Documentary Starter Kit

What this approach cannot do

Code-driven video is not a replacement for everything. It will not beat a skilled Blender artist on a one-off hero shot, it will not generate footage from a text prompt, and it has a learning curve if you have never written React. The payoff comes on the second video, not the first: when the scenes, data, and pipeline already exist and a new episode is a new composition, not a new project.

Start with one scene and one composition. Make the props contract strict before you add the second scene. The monorepo can grow — the contract is what keeps it from growing into two codebases again.

← Back to all articles

Try the tool this article is about: Remotion + Three.js Documentary Starter Kit — $79 one-time.