Custom Colliders
The custom physics collider tool can be used to create high-fidelity colliders for non-convex meshes by decomposing the graphical mesh into a set of convex hulls.
Settings
You can customize the settings to balance quality and performance:
- Concavity Threshold - Threshold used for terminating the decomposition
[0.002, 0.5]
. - Merge - Merge convex hulls after decomposing the input mesh.
- Convex Hull Limit - The maximum number of convex hulls after merging. Use
-1
for no limitation. - Vertex Limit - The maximum number of vertices per convex hull
[4, 255]
. Use-1
for no limitation. - Search Detail - The effort to spend searching for the best cutting planes.
- Align Cutting Planes - Align cutting planes with the principal axes of the input mesh.
By decreasing the concavity threshold, the tool will generate a more precise decomposition of the input mesh with more convex hulls. However, the generation time increases exponentially. In some cases, you may need to use a value as low as 0.002
. For most meshes, a value between 0.02
and 0.05
provides a sufficiently accurate result.
The search detail is used to control the computational effort to use when searching for a more optimal solution. Increasing the search detail may provide a better decomposition without negatively affecting the runtime performance. However, the time required to decompose the mesh using the tool will increase.
Control
Displays the number of triangles, points and convex hulls at the bottom right of the viewport and some included buttons:
- Toggle - Toggle between displaying the input graphics mesh and the generated custom physics mesh.
- Wireframe - Toggle between rendering a wireframe of the input graphics mesh or custom physics mesh.
- Up Axis - Change the up axis of the camera.
- Export - Export the custom physics mesh to a
.OBJ/.GLTF/.PTC
file. The.PTC
file is a ProtoTwin custom collider file that can be imported into the application. - Clear - Clear the scene.
Input File Types
The supported file types for importing meshes are:
- GLTF
- GLB
- OBJ
- PTC (ProtoTwin Custom Collider)