Hello, we are looking into implementing GeomSubset picking through Hydra (on our application side).
As there is no direct support for this in core Hydra currently, our current approach is the following :
We start with Hydra subprims/components picking (faces, edges, points), and from a pick hit, look at the children of the prim that was hit to find out its geomSubset prims (in the Hydra scene index tree). We then check each geomSubset’s type and contents to find out if there is a match.
However, we have two main concerns with this approach :
#1 : As there is no way from a given prim to know what its geomSubsets are or where they are located in the scene index tree, we resort to depending on the restriction that GeomSubsets in USD must be direct children of their geometric prims, as per the USD documentation (Universal Scene Description: UsdGeomSubset Class Reference) :
To apply to a geometric prim, a GeomSubset prim must be the prim’s direct child in namespace, and possess a concrete defining specifier (i.e. def).
The docs seem to imply this is for efficiency reasons :
This restriction makes it easy and efficient to discover subsets of a prim.
However, the documentation also states that this restriction might be loosened if needed :
We might want to relax this restriction if it’s common to have multiple families of subsets on a gprim and if it’s useful to be able to organize subsets belonging to a family under a common scope.
Our worry is that the restriction gets loosened without ways to keep retrieval relatively efficient. Is this a valid worry, or is GeomSubset retrieval a sufficient performance concern that loosening of this restriction will inevitably come alongside ways to efficiently retrieve GeomSubsets?
#2 : Even once we know where the GeomSubsets are, iterating over their contents could potentially be quite slow, as opposed to say performing a set lookup : is this an issue that you have experienced, or have ideas on how to tackle?
Generally speaking, is this approach suitable, or are there other methods we should be looking at, or are there plans to support GeomSubset picking more directly?
Thanks!