I am currently working on usd instances and I am facing an issue when changing the visibility of instanceable prims that contain PointInstancers in their sub hierarchy specifically.
Let's say I have an asset with its geometry containing meshes and a PointInstancer (like a tree, with instantiated leaves). Now, I want to build an assembly with it. I create a new stage with some Xform prims referencing the tree, instanceable set to true and with transforms applied. I can save this stage into its own usd file, open it in usdView or other DCCs and hide any instance without any problem.
The actual issue appears when the assembly is referenced elsewhere, in a shot breakdown for example. At this point, when I open the shot breakdown stage, I am still able to hide the instances in the assembly but there will always be one (usually the first instance) that will hide the PointInstancer for every other instances. The condition for all the PointInstancers to reappear can vary depending on the software used to open the stage:
In Houdini, if the hidden instance is set back to visible, all the PointInstancers are drawn again. Everytime you hide the 'problematic' instance all the PointInstancers disappear again:
In Maya or usdview, you'll need to set the instance back to visible and hide another one to make the PointInstancers reappear.
In the last scenario, the issue seems to be fixed until the stage is reloaded.
I know the stage uses the one of the instanceable prim of a same group as the source to create a prototype which will be shared by all the instanceable prims with the same arcs. Could edits on this selected instance change the prototype and therefore other instances ?
I also noticed that setting instanceable to false and back to true on all instances right after i opened the breakdown fixes the issue. If I am right, those edits are added to the session layer which is created when the stage is opened.
Steps to Reproduce
I made a simple package for anyone who would like to reproduce the issue. You will find the asset.usda file which describe an asset with a cube (in blue) and smaller cubes instantiated using a PointInstancer (in green). The instances.usda builds the assembly, creating three instances of the asset. Finally, breakdown.usda references instances.usda as it would be done to bring the assembly in higher levels of hierarchy like in a shot.
instance_visibility_example.zip
In usdview:
Open instances.usda, hide and show whatever instance and see that it has no effect on other instances
Open breakdown.usda
Hide the first instance 'inst': all green cubes should then be hidden in the scene
Set the instance back to visible: all green cubes will stay invisible
Hide the second or third instance: the green cubes should reappear
Show the hidden instance and hide/show the last one: now it should be possible hide instance without effect on the others
Description of Issue
Hello !
I am currently working on usd instances and I am facing an issue when changing the visibility of instanceable prims that contain PointInstancers in their sub hierarchy specifically. Let's say I have an asset with its geometry containing meshes and a PointInstancer (like a tree, with instantiated leaves). Now, I want to build an assembly with it. I create a new stage with some Xform prims referencing the tree, instanceable set to true and with transforms applied. I can save this stage into its own usd file, open it in usdView or other DCCs and hide any instance without any problem.
The actual issue appears when the assembly is referenced elsewhere, in a shot breakdown for example. At this point, when I open the shot breakdown stage, I am still able to hide the instances in the assembly but there will always be one (usually the first instance) that will hide the PointInstancer for every other instances. The condition for all the PointInstancers to reappear can vary depending on the software used to open the stage:
In Houdini, if the hidden instance is set back to visible, all the PointInstancers are drawn again. Everytime you hide the 'problematic' instance all the PointInstancers disappear again:
In Maya or usdview, you'll need to set the instance back to visible and hide another one to make the PointInstancers reappear.
In the last scenario, the issue seems to be fixed until the stage is reloaded.
I know the stage uses the one of the instanceable prim of a same group as the source to create a prototype which will be shared by all the instanceable prims with the same arcs. Could edits on this selected instance change the prototype and therefore other instances ?
I also noticed that setting instanceable to false and back to true on all instances right after i opened the breakdown fixes the issue. If I am right, those edits are added to the session layer which is created when the stage is opened.
Steps to Reproduce
I made a simple package for anyone who would like to reproduce the issue. You will find the asset.usda file which describe an asset with a cube (in blue) and smaller cubes instantiated using a PointInstancer (in green). The instances.usda builds the assembly, creating three instances of the asset. Finally, breakdown.usda references instances.usda as it would be done to bring the assembly in higher levels of hierarchy like in a shot. instance_visibility_example.zip
In usdview:
System Information (OS, Hardware)
Linux Rocky 8.7
Package Versions
Issue seen with usd 22.11 and 23.11