Stella Nova
4D inverse graphics

Computer vision · coding agents · physics

Watch a video, then write the code that makes it again

An agent gets one thing: a short video of objects that fall, bend, pour or tangle. It must write a program that builds the scene in 3D, moves every piece of it frame by frame, and renders it back to a video. The program has to stand on its own, without the video. The benchmark then checks the copy against the original: how it looks, where its surfaces are, and how its matter moves. The best agents now copy a scene's look and shape well. Their motion is still clearly worse.

Shen, Kovačič, Kulits, Wang, Li, Tenenbaum, Yuille, Chen & Wu, 4DCodeBench: Benchmarking Agents on Inverse Graphics of Dynamic Scenes, arXiv:2610.03715 (2026). Project site · GitHub

scenes: real videos, simulated with 3D truth
models, each run once on every scene
metric families: look, 2D motion, depth, 3D shape, 3D motion
of submissions run end to end
Spearman ρ between human and VLM-judge Elo
01

The task: inverse graphics, in code, over time

Graphics turns a description of a scene into pictures. Inverse graphics goes back: from pictures to the description. Here the description must be a program, and the scene moves, so the program must say where every bit of matter is at every moment. The paper calls that program 4D code.

From a video to a program and back to a video

paper Fig. 1 and Sec. 2.1, redrawn
  1. Reference video RGB frames x0 … xT−1. No scene name, no object list, no depth.
  2. Agent writes 4D code Programs Γ = (γ1, …, γm), any number, any structure. It may render and compare as often as it likes.
  3. Geometry over time State sΓ(t): meshes at each frame (their vertex count may change), plus tracked points or particles that stay the same piece of matter from frame to frame.
  4. Render Blender draws x̂k with the program's own camera, lights and materials, at the reference size and frame rate.
  5. Compare With the video on every scene; with the true 3D world on the simulated scenes. Five metric families, VQA and pairwise Elo.

The formal statement

paper eq. 1

The agent 𝒜 reads the reference video and returns the program Γ.

Run the program, take its geometric state sΓ at time k/r (r is the frame rate of the reference) and render it with the procedure RΓ that the program sets up. Frame k of the copy must line up with frame k of the original.

The state sΓ(t) is the important part. A video-generation model only has to make pixels. Here the scorer can read the 3D geometry itself, so a copy that looks right from the camera but has the wrong shape or the wrong motion behind it loses points.

The rules

Sec. 2.1 and 3.1
  • Only the videoThe agent gets the RGB video and a fixed task prompt. No scene name, description or list of objects.
  • Stands on its ownThe program must rebuild the whole scene from nothing, without access to the video.
  • Same shape of outputSame resolution, frame count and frame rate as the reference. Blender does the render.
  • Any physicsMotion may be keyframed, written as formulas, simulated in Blender, or simulated with any tool such as Taichi or Warp, or with the agent's own solver.
  • One run eachAn isolated container, one GPU, an empty workspace. A run that gives no valid video or world gets the worst score on the affected metrics.
02

The benchmark: real videos and simulated worlds

Half the scenes are real clips: true appearance and true physics, but no 3D answer key. The other half come from physics simulators: simpler physics, but the geometry and motion at every frame are known.

What the moving things are made of

paper Fig. 3
real videossynthetic scenes

Number of scenes, out of in each split, that contain each family. A scene can contain more than one, so a column does not add to 100. Real clips are mostly rigid things; the simulators add many more soft, deforming bodies. Tap a bar for its value.

How busy the scenes are

paper Fig. 3

Percent of each split. Most scenes have several moving objects and several materials. Driven means something pushes the scene during the clip, for example a robot arm or an object on a set path; passive means the motion follows from the first frame and physics alone.

Four kinds of matter. The scenes are sorted by the matter of their main moving objects. Rigid and articulated: rigid bodies and jointed systems. Deformable solids: hyperelastic, viscoelastic and elastoplastic materials, so things that bounce back, sag slowly or stay bent. Co-dimensional: shells and rods, that is cloth, paper, rope and wire, things thin in one or two directions. Flowing: grains, Newtonian fluids such as water, and viscoplastic fluids such as shaving cream or toothpaste.

Mixtures. of scenes have more than one moving object and have more than one material, with couplings such as rigid with fluid, fluid with soft body, and soft body with cloth. Events include collisions, deformation, flow and fracture.

Real clips come from physics, video-generation and robotics datasets and the web. The authors preferred clips with a still camera, little occlusion and no cuts, left out people and animals, and kept visible hands to a minimum: their bodies are a different hard problem.

Synthetic scenes were built by the authors in existing simulators, some extended with new material models, and checked by hand for instability and interpenetration. Frame rates are capped at fps and real clips at frames.

03

How it scores: five families, a quiz and a tournament

A copy can be good in one way and bad in another. So the benchmark measures appearance, geometry and motion apart, in 2D against the video and in 3D against the simulator's truth. The Overall score is the mean of the five families.

The five metric families

Sec. 2.4, App. D

The 2D and 2.5D families compare the copy with the video. On the copy's side they are computed from the 4D world, not estimated from its rendered pixels. On real videos the reference flow, tracks and depth come from vision models (RAFT, CoTracker3, Video Depth Anything). The 3D families need the true world, so they run on synthetic scenes only, after a similarity transform aligns the copy with the reference. Mesh-quality checks (holes, self-intersection and so on) are reported apart: simple but wrong geometry can pass them.

The formulas, in short

App. D eqs. 3, 7, 8, 9

Overlap of the masks of moving objects, per frame, without a thin band at the edges.

Chamfer distance of the surfaces at frame 0, capped at κ.

Lagrangian: follow bits of matter along their 3D paths. π pairs the paths one to one (Hungarian algorithm).

Eulerian: compare the spread of one-step displacements without knowing which bit is which (sliced Wasserstein).

VQA and pairwise Elo

Sec. 2.4, App. D.5 and D.6

VQA. Each scene has hand-written yes/no questions about the first frame, the last frame, the key events and the contacts, for example whether two cloths pass through each other. A VLM judge sees 16 frames of the copy only and answers them. A copy whose main object is missing fails every question.

Pairwise. The judge sees the reference and two copies, and picks the one closer in geometry and motion (A or B, no ties). Many such games across scenes give each model a rating on the Elo scale with the Bradley–Terry model. In the human study people could also answer “about the same”, which counts as half a win.

Line: the chance that the higher-rated model wins, for each rating gap. Dots: how often one VLM judgment agreed with the humans on single comparisons, at three gaps the paper reports. Close models are close to a coin flip, so one judgment on them says little, from a human or from a VLM; the rating needs many games. Tap or drag along the chart to read it.

Do people agree with the judge?

Sec. 3.2 and 4.1
human judgments from people on models
Spearman ρ, human Elo against VLM Elo (Pearson )
human and VLM agree on shared comparisons (κ )
two humans agree with each other (κ )
Spearman ρ, human Elo against the Overall score
of human answers were "about the same"

So the judge is nearly as consistent with people as people are with each other, and the automatic Overall score ranks models nearly as people do. The fit of VLM Elo against human Elo has a slope of : the judge spreads the models further apart than people do.

04

Leaderboard

models on scenes, from the paper's Fig. 4. One model appears at three reasoning efforts. Proprietary models ran in their own agent tools, open-weight models in a shared open harness.

All scores, sortable

tap a heading to sort, a row to pick
Perceptual2D Dyn.2.5D Geom.3D Geom.3D Dyn.

Swipe the table sideways for the five families. The model names stay in place.

Family scores are in 0 to 1, higher is better; VQA is the mean share of questions answered right. Elo has no fixed zero: only differences mean something. A dash means the model was not in the human study (it came out too late).

Human Elo against VLM Elo

paper Fig. 2, right
proprietaryopen-weightequal ratings

Each dot is one model. Points above the dashed line are rated higher by the judge than by people. The model at the left edge has a VLM Elo but no human Elo, so it sits on its own strip. Tap a dot to pick that model.

Picked model

from Fig. 4, 5 and 8
05

Motion is the hard part

Every model copies how a scene looks and where its surfaces are better than how its matter moves. The gap stays at the top of the board.

Static against dynamic, per model

the idea of Fig. 8, from Fig. 4
static: mean of Perceptual and 3D Geometrydynamic: mean of 2D and 3D Dynamics

For every model the dynamic dot sits to the left of the static one. Tap a row to read its two values.

Which scenes hurt which score

effects quoted in Sec. 4.3
lower scorehigher scorenot consistent across models

Standardized change in a score on one kind of scene, against its counterpart (or, for a matter family, against all scenes). Real clips and mixed materials hurt the look of the copy. Cloth and rope hurt 2D motion and depth. Driven scenes are harder to quiz but have better 3D geometry. The flowing effect falls short of the paper's consistency test.

How agents write motion

Sec. 4.4, Table A4

      Analytic motion means formulas for position against time, for example a parabola for a thrown ball. Custom simulation means the agent writes its own solver and steps it. Prescribed paths can score well, so the benchmark does not yet reward real physics for its own sake; the paper names this as a limit.

      More reasoning, better motion

      Sec. 4.5

      One model at three reasoning efforts. Each step up raises the Overall score and both motion scores, and costs more tokens. Across different models, more tokens did not reliably buy a better copy; within one model they did.

      06

      Try it: a small 4D inverse-graphics bench

      Four reference scenes run in your browser, one per matter family. A submission is a short JavaScript program that builds a 4D world. Pick a preset that copies the scene in one of the ways agents do, or edit the code, then run it and see how a toy scorer with the same five families grades it.

      Reference and submission

      original toy, no benchmark data
      reference
      submissionrun a submission to see it here
      frame 0

      Score

      simplified metrics
      –Overall, the mean of the five
      Perceptual
      –
      2D Dynamics
      –
      2.5D Geometry
      –
      3D Geometry
      –
      3D Dynamics
      –

        The bars show the last run. Section 07 says how each toy metric differs from the paper's.

        Submission code

        runs in a Web Worker

        The playground loads when you scroll here.
        07

        What is real here, and what is a toy

        Sections 01 to 05 report the paper. Section 06 is a small original model of its idea, not a copy of the benchmark.

        From the paper. Every number in sections 01 to 05: the scene counts and splits, the leaderboard, VQA accuracy, the human study, the category effects, the strategy shares and the reasoning-effort results. The metric formulas of section 03 are the paper's, shortened. The static and dynamic dots of section 05 are recomputed from the family scores of Fig. 4 as the paper defines them, so they can differ from Fig. 8 in the last digit.

        Not shown. The paper's videos and renders, its per-scene results, its confidence intervals, and the cost chart of Fig. 2 (left).

        Toy. The playground's four scenes are small simulations written for this page. Its renderer is WebGL2, not Blender. Submissions are JavaScript in a sandbox, not Python with a GPU. The scorer keeps the five families but uses simple stand-ins: an image similarity of low-resolution renders instead of DINOv3, depth maps from the true world instead of estimated depth, and no alignment step (the submission gets the reference camera and units).

        Licence. The 4DCodeBench code, datasets and renders have no licence, so this page uses none of them. The playground code is original and uses no benchmark assets.

        Shen R., Kovačič Ž., Kulits P., Wang X., Li Z., Tenenbaum J. B., Yuille A., Chen J. & Wu J. 2026, 4DCodeBench: Benchmarking Agents on Inverse Graphics of Dynamic Scenes, arXiv:2610.03715. 4dcodebench.com · github.com/4DCodeBench/4DCodeBench
        Bradley R. A. & Terry M. E. 1952, Biometrika 39, 324 — the paired-comparison model behind the Elo ratings.
        Chiang W.-L. et al. 2024, ICML — Chatbot Arena, the adaptive pair sampling used in the human study.
        Everingham M. et al. 2010, IJCV 88, 303 — PASCAL VOC, the source of the boundary band in Dynamic IoU.
        Besl P. J. & McKay N. D. 1992, TPAMI 14, 239 — ICP, used to align a copy with the true world.