Convex decomposition

CoppeliaSim allows calculating and adding the convex decomposition of specified shapes. Convex shapes perform faster and are more stable that random shapes, in regards to dynamic collision response calculation. They are however not as fast nor as stable as primitive shapes.

[Non-convex model (left) and corresponding convex-decomposed model (right)]


You can morph selected shapes into their convex decomposition equivalent with [Edit > Morph into convex decomposed shape(s)...]. Following dialog pops open and allows adjusting the way shapes are decomposed:

[Convex decomposition dialog]


Following parameters are applied for each individual shape:

  • HACD convex decomposition: enable the HACD algorithm.
  • Add extra points: specifies whether extra points should be added when computing the concavity.
  • Add extra face points: specifies whether faces points should be added when computing the concavity.
  • Min. nb of clusters: specifies the minimum number of clusters to be generated
  • Max. concavity: specifies the maximum allowed concavity.
  • Max. connection distance: specifies the maximum allowed distance to get convex clusters connected.
  • Target nb of triangles of decimated mesh: specifies the targeted number of triangles of the decimated mesh.
  • Max. nb of vertices / convex hull: specifies the maximum number of vertices for each generated convex hull.
  • Small cluster detection threshold (%): specifies the threshold to detect small clusters. The threshold is expressed as a percentage of the total mesh surface.
  • V-HACD convex decomposition: enable the V-HACD algorithm.
  • PCA enabled: enable/disable normalizing the mesh before applying the convex decomposition.
  • Voxel-based: if enabled, then voxel-based approximate convex decomposition is used, otherwise a tetrahedron-based approximate convex decomposition is used.
  • Resolution: maximum number of voxels generated during the voxelization stage.
  • Concavity: maximum concavity.
  • Plane downsampling: controls the granularity of the search for the best clipping plane.
  • Convex hull downsampling: controls the precision of the convex-hull generation process during the clipping plane selection stage.
  • Alpha: controls the bias toward clipping along symmetry planes.
  • Beta: controls the bias toward clipping along revolution axes.
  • Max. number of vertices / convex hull: controls the maximum number of triangles per convex-hull.
  • Min. volume / convex hull: controls the adaptive sampling of the generated convex-hulls.