sdfspace

MESH → DISTANCE FIELD → PROMPT → MESH

Edit any mesh
with a sentence.

SDFSpace turns a triangle mesh into an editable distance field, lets a coding agent reshape it by writing GLSL, and returns a textured, game-ready mesh. Open source, one GPU.

prompt “make the dragon scarier”

Original textured dragon The same dragon after the edit: heavy brow, fangs, long bone horns sourceedited
01

Mesh to field

A sparse 8³-brick distance field, built in seconds to about a minute, evaluated directly by GLSL.

02

Prompt to code

GPT writes a few lines of GLSL, renders annotated previews, looks, and revises. Claude reviews independently.

03

Field to mesh

GPU extraction, parallel UV atlas, and source textures projected onto the new surface.

01 / EDITS

Real requests, real meshes.

Every result below came out of the edit loop described in the paper. Pick one, orbit it, and flip between the original and the edit.

Drag to orbit, scroll to zoom
Show the edit the agent wrote

02 / THE LOOP

Look, critique, revise.

The editing agent sees what it builds. It renders before/after views on a coordinate grid, probes the field, ray-casts to place features on the surface, and keeps iterating. A second model reviews the result blind and sends back what is wrong; the best round wins.

Three rounds of the edit loop with reviewer critiques
“Make the dragon scarier”, rounds 1 to 3, with the reviewer’s feedback after each.

With the loop

One blind pass

Reviewer scores, 1 to 10, for the same requests. A score of 8 or more with no collateral damage counts as accepted.

03 / FIDELITY

The round trip stays on the surface.

Ten standard meshes, scaled alike, rebuilt from their fields and compared with the source. Bricks at the default voxel size keep the 95th-percentile surface error near three hundredths of a percent of the diagonal.

Surface error against size for brick fields and the analytic backend
Fidelity against size. Lines are individual assets; bold is the median.
Source dragon next to the round-trip mesh
Source dragon (left) and the mesh rebuilt from its field with transferred textures (right).
FieldSize (KB)Chamfer mean (% diag)p95 (% diag)Mean IoUBuild (s)

04 / FILM

Seventy seconds, start to finish.

Transcript

05 / PAPER

SDFSpace: Editing Meshes Through Distance Fields with Coding Agents

Lee Penkman, GPT, Claude

Edits are written by gpt-6.1-sol through the codex-infinity harness and reviewed by Claude Sonnet 5.5.