Convex collision for any model
A simulator collides with convex shapes, and real objects have arms, handles and gaps. Send a model and get it back wrapped in convex pieces that follow its shape.

Compiled robot, 2 m tall
64 convex pieces
- 64convex pieces, the most we asked for
- 32corners at most on each piece
- 7.6 mmfarthest the robot's surface sits outside a piece
- 2 mtall, set to real-world size
A generated robot compiled on the hosted API on 3 December 2026.
One shape fills the gaps
Physics engines collide with convex shapes, ones with no dents, because the test is fast and stable. One shape around a robot fills the gap between its arm and its body, so a cup the gripper reaches for bounces off empty air.
Splitting a model into convex pieces by hand takes hours per object, and generated models rarely come with any. Send the model and get pieces that follow its dents, within a piece count you set.
What the terms mean
Convex piece
A shape with no dents, where a line between any two points inside it stays inside.
Engines test contact on these quickly, which keeps the simulation fast.
Convex decomposition
Splitting a model into several convex pieces that together follow its shape.
Too few pieces fill in the gaps, and too many slow down every contact test.
Layout file
A list of the corners of each piece in meters.
Your loader builds the shapes in any engine without reading the GLB.
How it works
Send each model
Your agent uploads GLB, FBX, OBJ, STL or PLY files up to 64 MB, one compile per model.
Set the piece budget
The spec names the height in meters, the most pieces and the most corners on each piece. Your first 50 mesh Drafts are free with the $5 signup credit.
Load the pieces
You get a GLB with the pieces named as colliders, a layout file with each piece's corners in meters and a measure of how far the model sits outside them.
Questions
What is convex decomposition?
It splits a model with dents into several convex pieces that together follow its shape. A physics engine tests contact on those simple pieces instead of every triangle.
How many pieces do I need?
More pieces fit tighter and add contact tests, so you set the most you want. The 2 m robot used 64 pieces with at most 32 corners each, and its surface sat at most 7.6 mm outside them.
Which method builds the pieces?
You choose CoACD or V-HACD in the spec. CoACD is MIT licensed and V-HACD is BSD licensed, so the pieces are yours to use.
Which physics engines can use the pieces?
Convex shapes work in the major physics engines. The layout file lists the corners of each piece in meters, so your loader can build the shapes in any engine.
How long does it take?
The robot's 64 pieces took a little over three minutes in one compile, including repair and reduction.
How much does a collision compile cost?
Your first 50 mesh Drafts are free with the $5 signup credit. Your agent sees the price before anything runs.
Use with your agent
Paste the prompt into Claude Code, Cursor or Codex. Your agent connects to Spatial Compiler and comes back with a GLB with convex collision pieces, a layout file of their corners in meters and the measured fit.
New accounts start with $5 of usage, and you see the price of each job before it runs.
Connect the Spatial Compiler MCP server at https://spatialcompiler.dev/mcp if it isn't connected yet. Use meshfx to wrap my model in convex collision pieces: set it to its real height in meters, use at most 64 pieces with at most 32 corners each, and tell me how far the model sits outside them. Run a Draft first. Your first 50 mesh Drafts are free with the $5 signup credit. Ask before running a final compile.
Or add the server yourself in Claude Code:
claude mcp add --transport http spatial-compiler https://spatialcompiler.dev/mcp
Once connected, your agent can call the starter tool for a ready fire Draft spec and the exact call that runs it. Your first 100 fire Drafts are free with the $5 signup credit.