Mesh#
Polygonal mesh geometry. With PhysicsCollisionAPI applied it becomes a cooked PhysX shape whose kind is chosen by PhysicsMeshCollisionAPI physics:approximation (triangle mesh, convex hull, convex decomposition, bounding sphere or box, sphere fill, SDF triangle mesh). The parser stores the world scale on the descriptor and hands the geometry arrays to the cooking service unscaled, except for the bounding approximations, which pre-scale the points.
Type chain:
Gprim,Boundable,XformableApplicable APIs:
MaterialBindingAPI,PhysicsArticulationRootAPI,PhysicsCollisionAPI,PhysicsFilteredPairsAPI,PhysicsMassAPI,PhysicsMeshCollisionAPI,PhysicsRigidBodyAPI,PhysxArticulationAPI,PhysxCollisionAPI,PhysxContactReportAPI,PhysxConvexDecompositionCollisionAPI,PhysxConvexHullCollisionAPI,PhysxRigidBodyAPI,PhysxSDFMeshCollisionAPI,PhysxSphereFillCollisionAPI,PhysxSplinesSurfaceVelocityAPI,PhysxSurfaceVelocityAPI,PhysxTriangleMeshCollisionAPI,PhysxTriangleMeshSimplificationCollisionAPI,PhysxTriggerAPITransform columns: yes,
XformableUses blocks:
prim
What USD population writes#
Geometry attributes of a Gprim are published only from the curated list (size, radius, height, axis, points, faceVertexIndices, faceVertexCounts, holeIndices, orientation, doubleSided) and only when the prim carries a shape-consuming API such as PhysicsCollisionAPI. For a Mesh that is points, faceVertexIndices, faceVertexCounts, holeIndices, orientation and doubleSided. extent, normals, primvars and subdivision attributes are never published. A Mesh without a shape API gets a row only as an ancestor or relationship target, with no geometry.
Columns#
Raw fallback is the USD schema value. Producer writes is what ovstage population puts in the column for a USD stage. Parser default applies on the consumer when the column is absent, in stage units. diverges means writing the raw fallback literally parses differently from omitting the column (the parser default): USD population may well publish that very value for an unauthored attribute, so the marker is about the column being present, not about its value.
Column |
Type |
Units |
Raw fallback |
Producer writes |
Parser default |
If absent |
|---|---|---|---|---|---|---|
|
float32[3] array, POINT |
length |
not written |
An absent or empty column reads as an invalid (empty) buffer handle. Cooking has no vertices and produces no shape; the collider is skipped. |
||
|
int32 array |
none |
not written |
An absent or empty column reads as an invalid (empty) buffer handle; cooking has no faces and produces no shape. |
||
|
int32 array |
none |
not written |
An absent or empty column reads as an invalid (empty) buffer handle; cooking has no faces and produces no shape. |
||
|
int32 array |
none |
() |
resolved USD value (authored, else raw fallback) |
No holes: an absent or empty column reads as an invalid (empty) buffer handle and every face is cooked. |
|
|
bool8 |
none |
false |
resolved USD value (authored, else raw fallback) |
false |
false: single-sided triangle mesh (PxMeshGeometryFlag::eDOUBLE_SIDED clear). Read twice, once by the walker into the descriptor and once by getMeshAttributes; both default to false. |
|
uint64, TOKEN_ID |
none |
rightHanded |
resolved USD value (authored, else raw fallback) |
rightHanded |
rightHanded winding. Only the token leftHanded sets MeshGeometry::leftHanded, which makes the cooking service flip the triangle winding; an absent column, an invalid token id or any other token is treated as rightHanded. |
Derived values#
mesh_scale =
worldScale. The scale decomposed from the composed world transform is stored on the descriptor (meshScale) and applied by the consumer as a PxMeshScale at shape creation; the points are cooked unscaled so one cooked mesh serves every scale.sign_scale =
sign(worldScale). Per-component sign of the world scale (scaleToSignScale), carried in the cooking params so a mirrored mesh cooks with the correct winding.bounding_points =
points * worldScale. Only for physics:approximation boundingSphere and boundingCube: the walker reads the points immediately and pre-scales them, because those descriptors carry no meshScale for the consumer to apply later.
Interactions#
PhysicsCollisionAPI: Geometry is read only when the collision API is applied. The geometry arrays are read from the geometry backing key, so an instance proxy resolves to its prototype’s arrays.PhysicsMeshCollisionAPI: physics:approximation selects the descriptor kind and which cooking API’s columns are consulted. Without the API the mesh is a plain triangle mesh (approximation none), which is silently promoted to a convex hull on a dynamic body.MaterialBindingAPI: Per-face materials come from material-bound GeomSubset children with elementType face; unbound faces get index materialCount (one past the last bound subset).
Notes#
No column of this type is verified by the generated tests: the builder does not write array-valued attribute columns, cooking needs real points and faces, and the cooking parameters have no PhysX getter. Cooked geometry can only be checked by a hand-written test.
Type dispatch is by exact prim-type string on the geometry backing key, in the order Plane, custom-geometry token, Cube, Sphere, Capsule, Cylinder, Cone, Mesh; any other Gprim type is rejected and counted in skippedShapes.