Crescent Engine

Crescent Spatial

Simulation and model evaluation.

Build a task in a 3D scene, give a policy observations it can act on, and replay the resulting episode against the same environment.

Runtime and benchmark

CSDK-Sim runs fixed-step box physics from a C99 API. A task defines bodies, a seed, an action budget and a success condition. The runtime applies actions, advances a known number of ticks and reports reward and termination.

Spatial Bench evaluates policies on matched scenarios and seeds. It projects test body poses into an authored scene and captures synchronized Metal color, metric depth and object IDs. Recorded actions can be replayed with fresh simulation state and compared against the recorded observations.

Run a task from Python

Download and extract the package for macOS 26.1 or later on Apple silicon. With Python 3 installed, run this from the directory containing the extracted CSDK-Sim folder. The sample uses the runtime’s built-in reach-target task.

Download Spatial SDK for macOS

Terminal
PYTHONPATH="$PWD/CSDK-Sim/python" python3 - <<'PY'
from crescent_spatial import Sim

with Sim("CSDK-Sim/lib/libCrescentSpatial.dylib") as sim:
    sim.reset(42)
    sim.step(4)
    view = sim.entities()
    print("tick", view.step_index, "bodies", view.count)
    sim.impulse(2, (1.5, 0.0, 0.0))
    feedback = sim.step(4)
    print("reward", feedback.reward)
PY

The C/C++ build links Crescent::Spatial from find_package(CrescentSpatial CONFIG REQUIRED). Set CMAKE_PREFIX_PATH to the extracted SDK. Read borrowed entity and camera views before stepping or closing the instance.

From World to a recorded run

Follow the editor walkthrough · Python and C API · Spatial Bench workflows

  1. Set up the scene in World. Place the camera, box colliders and target. The world supplies geometry, materials and lighting.
  2. Define the benchmark pair. Select the agent body and obstacle, set the target and seeds, then export a suite. A pair can change a single obstacle while holding the task and camera fixed.
  3. Run the policy. Use a local model or a compatible model endpoint. The runner records outcomes, camera fingerprints and actions for each episode.
  4. Verify and compare. Replay archived actions with the matching simulator, renderer and scene. Inspect the first shared camera input that produced a different decision.

The Editor Preview includes the experiment tools and the Metal renderer. The standalone Spatial SDK runs headless physics tasks from Python or C/C++.

Author your own evaluation

Use a saved World scene as a starting point or build a Python task bundle. Define what the controller can see, which actions it can take and how the task awards success or partial credit. Playtest your rules locally, then run models and policies against a matched seed schedule.

Read the custom task guide · Inspect a recorded playtest

Choose how a policy receives observations

TRAINING OR CONTROLNative state

Read entity observations or collision-camera planes from the standalone runtime. Call the fixed-step C API from your own process.

LOCAL BENCHMARKIn-process camera

A trusted policy library borrows renderer buffers. The tested SmolVLM2 adapter can prepare and consume image input on Metal.

REMOTE INFERENCEModel endpoint

Send a camera frame to a compatible Chat Completions vision endpoint and validate the returned action. Replay uses the archived actions.

Closing Route benchmark

At a fixed tick, a blue barrier closes the route from the red cargo box to the green destination. The open and closing cases share starting conditions. This gives the evaluator one controlled change to observe.

Closing Route
Perspective view in Crescent of a red cargo box, a closed blue divider, and a green destination on a small test floor
Metal scene renderTick 108

On one Apple M4, four paired SmolVLM2 trials produced the same 84 camera inputs and actions across the tested paths. The optimized Metal adapter encoded each repeated image once and kept both original positions in the model input.

Decision latency on matched inputs and actions. Lower is faster.
PathMedianP95
Local HTTP388.7 ms419.0 ms
In-process CPU staging396.0 ms420.4 ms
Metal, two vision passes393.2 ms433.5 ms
Metal, one vision pass283.3 ms299.7 ms

The two Metal modes use the same adapter and model files. Reusing the image encoding lowered the median about 28% on this run. The measured interval includes policy preparation and inference and begins after camera capture.

Download measured results and phase timings

What ships in the Spatial SDK

The archive contains the standalone libCrescentSpatial.dylib, C headers, CMake targets, Python bindings, a sample task and third-party license files. A relocated C99 client and independent-process replay were tested against the exported library.

The Editor Preview includes Spatial Bench and the renderer used for scene-backed Metal observations. Local vision runs use a compatible llama.cpp server, GGUF weights and a matching projector. Use the Spatial SDK archive for headless physics.

See developer packages