Hey USD gurus!
I’ve got a simple point instancer which has a parent xform with a transform like this :
instancer.usda
#usda 1.0
def Xform "root"
{
def Xform "placement" (
)
{
# Transform 5 units on Y axis
matrix4d xformOp:transform:transform3 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 5, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform:transform3"]
def PointInstancer "instancer" (
kind = "group"
)
{
float3[] extent = [(-1, -1, -1), (4, 1, 1)]
int64[] invisibleIds = []
quath[] orientations = [(1, 0, 0, 0), (1, 0, 0, 0)]
point3f[] positions = [(0, 0, 0), (3, 0, 0)]
int[] protoIndices = [0, 0]
rel prototypes = </root/placement/instancer/Prototypes/sphere1>
def Scope "Prototypes" (
kind = "group"
)
{
def Sphere "sphere1" (
)
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
double radius = 1
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 a simple reference which does native instancing by turning on instanceable
flag
references.usda
#usda 1.0
def Xform "root"
{
def "newPlacement" (
# Turning on instancing does not use the xform on /root/placement
# While turning off instancing does
instanceable = true
prepend references = @instancer.usda@</root>
)
{
}
}
On doing this, it seems to loose the xform on /root/placement prim and the point instancer is at the wrong place. If I disable instanceable flag it seems to be transformed as expected.
I tested the same having only a sphere under /root/placement
in the instancer.usda file and it seems to transform as expected when native instancing. This issue seems to happen when with point instancer. Is this a bug / feature of instancing or am I doing something wrong here?