Contact
SuperDex Physics uses a compliant contact model, which can be interpreted as either a penalty regularization of an inequality constraint or as a reduced model of local surface deformation. This approach provides smooth, differentiable contact forces suitable for implicit time integration and optimization-based solvers, and provides spatial distributions of contact traction fields acting on the surfaces of bodies, rather than just point-contact force resultants. Compliant contact allows for some interpenetration of colliding bodies, which is evaluated using signed distance fields (SDFs) and generalizations thereof defined on their geometries.
Contact Roles
Every contact interaction involves two actors playing complementary roles:
- Collider – The actor that provides a queryable signed distance field (SDF) used to determine penetration depth and contact normals.
- Colliding – The actor whose surface is discretized with quadrature sample points. Contact traction is computed at these sample locations using the formulation detailed below by querying the collider's SDF.
The separation of roles allows SuperDex Physics to handle asymmetric contact configurations. For example, a deformable body (colliding) can be pressed against a rigid obstacle (collider) without requiring the costlier evaluation of an SDF on deforming geometry. However, a single actor can serve both roles simultaneously. If two actors have colliders, and no Contact Filtering is applied in either direction, this results in two passes of contact force computation, whose results are summed. However, even a single pass results in balanced forces applied to both bodies.
Collider Representations
The colliderType / collider_type setting selects how an actor supplies distance fields. Its values are defined by the ColliderType enum:
| Setting | Representation | Notes |
|---|---|---|
Auto | Actor- and shape-dependent | Selects analytic fields for supported shapes, Sdf for rigid mesh and soft actors, and PointCloud for shell and rod actors. |
None | No collider | Disables only the collider role; the actor may still provide colliding samples. |
Sphere | Analytic sphere SDF | Exact and inexpensive. |
Box | Analytic box SDF | Exact for box geometry. |
Plane | Analytic halfspace SDF | Infinite plane, commonly used for ground and boundaries. |
Mesh | Triangle-mesh distance queries | Supports non-convex geometry, but is experimental, relatively slow, and limited to rigid actors and articulated links. |
Sdf | Precomputed grid SDF | Supports complex geometry; approximates the exact SDF using trilinear interpolation, with a resolution-memory trade-off. |
PointCloud | Spherical SDFs about material points | Quadrature discretization of the double-integral generalization below; interacts only with other point-cloud actors. |
Grid SDF construction is controlled by GridSdfParams (C++, Python): resolutionMode / resolution_mode selects the reference length used to size voxels, resolutionDelta / resolution_delta scales that length per axis, minGridResolution / min_grid_resolution sets the minimum voxel count per axis, and boundaryPaddingDist / boundary_padding_dist extends the grid beyond the shape bounds.
Default Roles by Actor Type
| Actor Type | Colliding (surface samples) | Collider |
|---|---|---|
| Rigid (dynamic) | Yes | Yes (colliderType = Auto, which resolves to Sdf for mesh shapes) |
| Rigid (static) | No | Yes (colliderType = Auto, which resolves to Sdf for mesh shapes) |
| Soft | Yes | No (set colliderType to Sdf or Auto to enable a grid SDF mapped by the deformation; this is experimental and may be slow) |
| Articulated links | Yes (dynamic links only) | Yes by default; each link has its own colliderType, which defaults to Auto |
| Shell | Yes | Yes (colliderType = PointCloud by default) |
| Rod | Yes | No (set colliderType to PointCloud or Auto to enable) |
Contact Filtering
Filtering controls which ordered actor interactions are eligible. Each actor has an arbitrary string contact layer, assigned at creation or changed with Actor::SetContactLayer (set_contact_layer in Python).
The C++ Scene API and corresponding Python methods provide four controls:
Scene::EnableLayerContactAsymmetric(layerA, layerB, enable, error)(enable_layer_contact_asymmetricin Python) controls the ordered interaction withlayerAcolliding againstlayerBas collider. It does not change the reverse direction.Scene::EnableLayerContactSymmetric(layerA, layerB, enable, error)(enable_layer_contact_symmetricin Python) applies the setting to both directions.Scene::EnableActorContactAsymmetric(A, B, enable, includeNestedActors, error)(enable_actor_contact_asymmetricin Python) controls an additional gate for the ordered actor pair.Scene::EnableActorContactSymmetric(A, B, enable, includeNestedActors, error)(enable_actor_contact_symmetricin Python) applies that actor-pair gate in both directions.
Both layer-level and actor-pair contact must be enabled for an interaction to occur; actor-pair settings cannot re-enable a layer-disabled interaction. Actor-pair filtering is useful when constrained actors overlap and would otherwise generate contact forces that oppose the constraint. Asymmetric filtering specifies which actor supplies samples and which supplies the collider field.
When includeNestedActors is IncludeNestedActors::No, these APIs affect only the exact handles passed. With IncludeNestedActors::Yes, a parent actor resolves to the parent plus its nested actors, and the setting is applied to every ordered pair in the cross-product of the two resolved handle sets. No pair outside that cross-product is affected. If the sets overlap, overlap pairs, including self-pairs, are affected. Python exposes the containing IncludeNestedActors enum.
SuperDex Physics automatically disables contact between adjacent links when articulated or soft-skinned actors are created. A later actor-contact setting can override that automatic disable for any pair in the resolved sets. In particular, enabling contact between a parent and itself with IncludeNestedActors::Yes enables contact between its nested actors, including adjacent links, unless a later setting disables those pairs again.
Formulation
We present the compliant contact formulation in the continuous setting first, before elaborating on the discretization used in simulations.
Continuous Formulation
The continuous contact model combines a conservative normal penalty with dissipative friction and damping. The pairwise penalty energies contribute to the total conservative potential in the system dynamics, while the dissipative tractions derive from a state-dependent dissipation potential .
Contact Kinematics
Let denote the motion, or current position, of material point on colliding actor . Similarly, let denote the collider motion and
its deformation gradient. Collider supplies a (possibly approximate) SDF in its reference coordinates and, where the motion is locally invertible, the current-to-reference map . Its spatial SDF is
This construction covers the standard Plane, Sphere, Box, Mesh, and Sdf collider types. The nonlocal PointCloud model is the exception described under double-integral generalization.
The trajectory of the sample on , expressed in the reference coordinates of , is
The collider-space relative contact velocity is its total derivative holding the colliding material point fixed:
where and are the world-space velocities of the spatially-coincident material points and on the two bodies.
For rigid motions, is a rotation, and the collider motion exactly maps an SDF defined on the reference configuration to another SDF on the current configuration. However, there is usually still some approximation if the reference SDF is precomputed on a grid and interpolated. For a soft actor with an Sdf collider, is a non-rigid current-to-reference map. It may change lengths and angles, and it may be undefined at some query points, which are then rejected. The spatial field is generally not an exact SDF (even if is), and the magnitude of can be affected by local stretching of the collider.
Frictionless Normal Penalty
For colliding actor and collider , the conservative contact potential is a surface integral over the reference boundary of :
where the energy density per unit reference area is
Here, is the penalty coefficient. The ramp activation has smoothing half-width and contact threshold . Summing over active ordered actor pairs gives the contact contribution to .
Let