---
title: "What is convex decomposition? Collision pieces explained"
description: "Convex decomposition splits a model with dents into convex pieces for physics. Learn how it works, how CoACD and V-HACD differ and how many pieces to use."
canonical: https://appliedmanifold.com/learn/convex-decomposition/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Learn](https://appliedmanifold.com/learn/)
3.  Convex decomposition

# What is convex decomposition

Convex decomposition splits a model with dents into several convex pieces that together follow its shape. Physics engines collide convex shapes fast and stably, but one hull around a robot or a chair fills in its gaps. Several pieces keep the gaps open, and you trade a tighter fit against more contact tests.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [meshfx docs →](https://appliedmanifold.com/docs/mesh/)

![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.

## How convex decomposition works

A shape is convex when a line between any two points inside it stays inside. A robot is not, because the space between an arm and its body is outside the shape while both ends of a line across it are inside.

Decomposition cuts the model into parts that are each close to convex, then wraps each part in a hull. A method stops cutting when the pieces fit within a concavity limit, or when it reaches the piece count you set.

## CoACD and V-HACD

V-HACD is the older method. It builds pieces from a voxel grid, which is fast and can fit loosely. CoACD cuts along planes chosen to keep each piece close to its part, which usually fits tighter on the same piece count and takes longer. Both are open source, under BSD and MIT licenses.

## How many pieces to ask for

-   A box-like prop needs one convex hull, and no decomposition.
-   A chair or a cart needs a handful of pieces.
-   A robot with arms, legs and a head can use dozens, up to the cap you set.
-   Cap the corners on each piece too, since some engines limit them.

## Convex pieces with meshfx

meshfx splits your model into convex pieces within the piece and corner counts you set, and lists each piece's corners in meters in a layout file. On a 2 m robot it built 64 pieces with at most 32 corners each, and the surface sat at most 7.6 mm outside them. See the [convex collision job](https://appliedmanifold.com/sim-ready/convex-decomposition/) for the overlay.

## 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 and a report that counts the holes, flipped faces and non-manifold edges, so you know what to fix.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Try it in the Playground →](https://appliedmanifold.com/playground/?module=meshfx&cookbook=namaqualand_rocks&spec=f859915a7f50a91eae432dfc1ac89e53babb309217d7682863c22430312d12ad)

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 check my model for holes, flipped faces and non-manifold edges and give me a GLB with the report. 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/)

## Related pages

-   [Convex collisionConvex collision pieces for simulation: a model split into convex shapes that follow its dents, with corners in meters.](https://appliedmanifold.com/sim-ready/convex-decomposition/)
-   [Convex hullA convex hull is the tightest dent-free shape around a model, used as fast, stable collision for moving objects.](https://appliedmanifold.com/learn/convex-hull/)
-   [Collision meshA collision mesh is a simple invisible shape that physics uses in place of the detailed model, for fast, stable collisions.](https://appliedmanifold.com/learn/collision-mesh/)
-   [Collision in Godot 4Add collision in Godot 4 with Create Collision Shape or -col and -colonly import suffixes, and pick trimesh or convex shapes.](https://appliedmanifold.com/mesh/collision-mesh-godot/)
-   [Collision in UnityAdd collision in Unity with primitive colliders or a Mesh Collider that uses its own simple mesh, and when to tick Convex.](https://appliedmanifold.com/mesh/collision-mesh-unity/)
-   [Collidersmeshfx writes a box, sphere, capsule, hull or convex decomposition next to the mesh. You set the shape, whether it wraps the whole model or each object, and the name the engine looks for. Import is checked in Godot only. In that check, Godot imported some of the written shapes at the written place and size, and not others.](https://appliedmanifold.com/docs/mesh/colliders/)

[All pages in Learn →](https://appliedmanifold.com/learn/)

[← Watertight mesh](https://appliedmanifold.com/learn/watertight-mesh/)

## Convex decomposition questions

[All questions →](https://appliedmanifold.com/faq/)

### What is convex decomposition?

Convex decomposition splits a model with dents into several convex pieces that together cover its shape. Physics engines test contact on those pieces quickly.

### What is CoACD?

CoACD is an open-source method that builds convex pieces from a mesh, and it is MIT licensed. meshfx can use it, or V-HACD, to make collision pieces.

### What is V-HACD?

V-HACD is an older open-source method that splits a mesh into convex pieces, under a BSD license. It is fast, and the pieces can fit looser than CoACD's.

### How many convex pieces should a model have?

Use as few as keep the fit tight enough for your task. A box-like prop needs one, a chair a handful, and a robot with arms and a head can need dozens.
