Authored empty mergeGroup merges unrelated collision groups
Specula found this at current dev commit
fc590b38e24770408e31b56442d31b8029729ee7.
UsdPhysicsCollisionGroup says groups merge only when physics:mergeGroup is
nonempty. ComputeCollisionGroupTable() checks whether the attribute is
authored instead. Two unrelated groups that explicitly author the empty string
therefore receive the same internal table index and share collision filters.
Current sequence
T0: Group A filters C while unrelated group B does not.
T1: Groups A and B explicitly author an empty mergeGroup value.
T2: ComputeCollisionGroupTable() maps both groups to the same empty-string entry.
T3: A's filter propagates through that entry and disables B-C collisions.Proposed sequence
T0: Group A filters C while unrelated group B does not.
T1: Groups A and B explicitly author an empty mergeGroup value.
T2: The table assigns independent IDs to both empty values.
T3: Only groups with the same nonempty mergeGroup share an ID.
T4: B-C collisions remain enabled.The exact public API witness starts with A-C disabled and B-C enabled. After A
and B explicitly author "", B-C becomes disabled. It ran on USD 0.26.3. A
current-source checker confirms that dev has the same authored-state branch,
while UsdPhysicsParseStage() already skips empty merge names. A current
OpenUSD build was not run.
Branch on the resolved string value, allocate an independent ID when it is empty, and add an authored-empty regression beside the existing nonempty merge tests.
@eoineoineoin was detected as the most likely owner from current-source
blame. Please feel free to assign this to someone else if another owner is
closer to the code.
Source: PixarAnimationStudios/OpenUSD