A robot simulation uses one housing prototype for four parts in a tray. At time code 10, a pick event hides the part with ID 110. A script exports the resulting three transforms alongside the original four IDs. Pairing the two arrays directly now assigns at least one transform to the wrong part. The error is easy to miss when the housings look identical.
OpenUSD's PointInstancer stores per-instance data in parallel arrays. The instance IDs identify parts, while array positions identify rows at the sampled time. With authored IDs, the instancer uses those IDs when evaluating which rows to keep. Its default transform query applies the mask and returns only the surviving transforms.
Reproduce the mismatch with one hidden part
This example gives four copies of a single prototype distinct IDs and X positions. The part with ID 110 occupies row 1, at X = 2. The visibility sample hides it at time code 10.
from pxr import Gf, Usd, UsdGeom, Vt
stage = Usd.Stage.CreateInMemory()
inst = UsdGeom.PointInstancer.Define(stage, "/Tray")
prototype = UsdGeom.Cube.Define(stage, "/Tray/Housing")
inst.GetPrototypesRel().SetTargets([prototype.GetPath()])
inst.CreateProtoIndicesAttr(Vt.IntArray([0, 0, 0, 0]))
inst.CreatePositionsAttr(Vt.Vec3fArray([Gf.Vec3f(x, 0, 0) for x in (0, 2, 4, 6)]))
inst.CreateIdsAttr(Vt.Int64Array([240, 110, 380, 520]))
time = Usd.TimeCode(10)
inst.CreateInvisibleIdsAttr().Set(Vt.Int64Array([110]), time)
ids = list(inst.GetIdsAttr().Get(time))
mask = list(inst.ComputeMaskAtTime(time))
kept = [value for value, keep in zip(ids, mask) if keep] if mask else ids
transforms = inst.ComputeInstanceTransformsAtTime(time, time)
print(Usd.GetVersion(), mask, kept, [x.ExtractTranslation()[0] for x in transforms])
OpenUSD 0.26.11 returns a mask of [True, False, True, True]. The surviving IDs are [240, 380, 520], with transforms at X = [0, 4, 6], respectively. If a script pairs those transforms with the unfiltered IDs, the association for ID 110 moves to X = 4. No edit to that part's position caused the change. The exporter paired arrays with different row sets.
Validate the export at the sampled time
Read the IDs and presence mask at the same time code as the transforms. Apply the mask to every per-instance array that accompanies the filtered transforms. For inspection, compare the number of surviving IDs with the number of exported transforms and check a known part on either side of the removed row. Clearing the invisible ID in this fixture returns an empty mask, the API's shortcut for keeping every row. Treating that empty vector as a filter with no survivors would incorrectly drop the entire tray.
Record the instancer path, time code, part IDs, and the transform query's mask setting with the export. An instance can be visually hidden in the scene while its source data remains present. A downstream inventory or collision consumer needs an explicit rule for whether to include those rows.
Sources
OpenUSD UsdGeomPointInstancer API reference for computing masks and instance transforms
https://openusd.org/release/api/class_usd_geom_point_instancer.html
OpenUSD geometry schema overview for point instancing and ID-based pruning
https://openusd.org/release/api/usd_geom_page_front.html