---
title: "Convex collision pieces for your simulator | Spatial Compiler"
description: "Send a model with dents and gaps and get convex collision pieces that follow its shape, with each piece's corners listed in meters. Over MCP or the API."
canonical: https://appliedmanifold.com/sim-ready/convex-decomposition/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Sim-ready meshes](https://appliedmanifold.com/sim-ready/)
3.  Convex collision

# 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.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=sim-scene) [Start with your agent](https://appliedmanifold.com/sim-ready/convex-decomposition/#get-started)

![A textured, lit robot, 2 m tall, after one hosted compile](/use-cases/jobs/convex-decomposition/before.webp)

![The same robot covered by 64 translucent blue convex collision pieces that follow its arms, legs and torso](/use-cases/jobs/convex-decomposition/after.webp)

Compiled robot, 2 m tall

64 convex pieces

-   **64**convex pieces, the most we asked for
-   **32**corners at most on each piece
-   **7.6 mm**farthest the robot's surface sits outside a piece
-   **2 m**tall, 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

1.  ### Send each model

    Your agent uploads GLB, FBX, OBJ, STL or PLY files up to 64 MB, one compile per model.

2.  ### 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.

3.  ### 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.

[What is convex decomposition](https://appliedmanifold.com/learn/convex-decomposition/)

## 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.

[All use cases](https://appliedmanifold.com/use-cases/)

## 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.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=sim-scene) [Try it in the Playground →](https://console.appliedmanifold.com/playground?module=meshfx&item=washing_machine)

New accounts start with $5 of usage, and you see the price of each job before it runs.

Agent prompt

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`

[Set it up in Cursor, Codex or another agent](https://appliedmanifold.com/docs/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.
