A robot workcell model can contain a calibration target that appears in the scene tree but disappears from the viewport during a replay. Before rebuilding the target mesh or changing the camera, check its computed visibility at the time code where it disappears. A visibility opinion on a parent can hide the entire branch.
In OpenUSD, an imageable prim can have a resolved visibility value of invisible or inherited. Setting invisible on an ancestor hides its descendants from rendering even if their own attribute resolves to inherited. The descendant can remain active and accessible in the composed stage. The value read directly from its visibility attribute and the value computed through the hierarchy answer different questions.
Reproduce the disappearing target
This in-memory scene creates a cube under a fixture group. The group is visible by inheritance at time code 0, then hidden at 10 and restored at 20. The target's own visibility stays inherited the whole time.
from pxr import Usd, UsdGeom
stage = Usd.Stage.CreateInMemory()
fixture = UsdGeom.Xform.Define(stage, "/Fixture")
target = UsdGeom.Cube.Define(stage, "/Fixture/Target")
visibility = fixture.GetVisibilityAttr()
visibility.Set(UsdGeom.Tokens.inherited, 0)
visibility.Set(UsdGeom.Tokens.invisible, 10)
visibility.Set(UsdGeom.Tokens.inherited, 20)
target.GetVisibilityAttr().Set(UsdGeom.Tokens.inherited)
observed = [
(frame, target.GetVisibilityAttr().Get(frame),
target.ComputeVisibility(Usd.TimeCode(frame)))
for frame in (0, 10, 15, 20)
]
assert target.GetPrim().IsActive()
assert [result[2] for result in observed] == [
"inherited", "invisible", "invisible", "inherited"
]
for row in observed:
print(*row)
In OpenUSD 0.26.11, the target's direct value is inherited at all four samples. Its computed values are inherited at 0, invisible at 10 and 15, and inherited at 20. Time code 15 still uses the preceding invisible sample because token values are held between samples. The test also confirms that the target prim remains active.
Find the authored cause in the workcell
Open the same composed stage, with the same variants and layers as the downstream viewer, and record a time code where the component is visible and another where it disappears. Confirm that the expected prim path resolves, then read its resolved visibility attribute and ComputeVisibility at both time codes. Walk up the ancestor chain and inspect the resolved visibility of each imageable prim at the failing sample. This locates the branch where the invisible opinion enters.
If that ancestor is supposed to be hidden only for an alternate fixture setup, inspect the layer or variant that contributes its visibility samples. Fix the opinion at the appropriate source or reorganize the hierarchy if the target should be visible independently of the hidden group. Setting the child to inherited cannot override invisible on its ancestor. Repeat the same samples after the edit.
If computed visibility is inherited at the failing sample, inspect the viewer's purpose filters and render-pass settings as separate checks. A discrepancy in viewport rendering does not establish whether the target participates in physics or a synthetic sensor pipeline. Verify those behaviors in the downstream application if the review depends on them.
Sources
OpenUSD Imageable schema guide, visibility and purpose
https://openusd.org/release/user_guides/schemas/usdGeom/Imageable.html
OpenUSD rendering user guide, inherited visibility and render-pass settings
https://openusd.org/release/user_guides/render_user_guide.html