Hi,
I have a scene with a class to define the asset (made of 1 cube for now), like this
class "_class_"
{
def Xform "assetCubes" (
kind = "component"
)
{
def Cube "cube_0"
{
matrix4d xformOp:transform = (
(1, 0, 0, 0),
(0, 1, 0, 0),
(0, 0, 1, 0),
(0, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}
}
}
and I also have a class to drive instanceability
class "_class_instanceable" (
instanceable = true
)
{
}
Then in the scene I’ve got 3 elements referencing the assetCubes
and inheriting the _class_instanceable
and I’ve got 3 PointInstancers (with 2 instances each) with their internal prototypes doing something similar to the 3 elements.
With instanceable enabled, updating the main assetCubes
only updates the individual elements (or better, their HdInstancer basically), but the PointInstancers (or their HdInstancers) aren’t updated.
I’ve tested this in Solaris and also in usdview, if you load the attached file, you can then run the following in the python interpreter:
from pxr import UsdGeom, Gf
stage = usdviewApi.stage
c = UsdGeom.Cube.Define(stage,"/_class_/assetCubes/cube_1")
op = c.AddTransformOp()
op.Set( Gf.Matrix4d(1,0,0,0, 0,1,0,0, 0,0,1,0, -3,0,0,1 ) )
which is going to create a new cube under assetCubes, and you can see the elements updating, but not the PointInstancers, which you have to update manually for example toggleing their visibility.
NOTE: I’d like to discuss this in the next usd-wg meeting, as there is a Hydra-behaviour I’d like to review with you guys, to understand how we can handle it moving forward (shared prototypes).
instancing_v01.usda (3.2 KB)