The UsdGeomPointInstancer docs now recommend placing prototypes under a class prim:
class is recommended, while over should be used when backwards compatibility with older versions of USD is needed.
In practice, prototypes under a class are not drawn at all in usdview.
In this screenshot:
- def “Prototype”, red cubes, drawn
- over “Prototype”, green spheres, drawn
- class “Prototype”, blue cones, nothing drawn, no warning
This seems to have been fixed in 13e73ea4, but for Hydra 1.0, not 2.0 / Scene Index.
This looks like a bug. It could also very well be me not understanding how to author a stage properly. Here is the USD for the scene above:
#usda 1.0
(
defaultPrim = "World"
metersPerUnit = 1
upAxis = "Y"
)
def Xform "World"
{
def PointInstancer "InstancerDef"
{
point3f[] positions = [(-5, 0, 0), (-4, 0, 0), (-3, 0, 0)]
int[] protoIndices = [0, 0, 0]
rel prototypes = </World/InstancerDef/Prototype/Cube>
def "Prototype"
{
def Cube "Cube"
{
double size = 0.5
color3f[] primvars:displayColor = [(1, 0, 0)]
}
}
}
def PointInstancer "InstancerOver"
{
point3f[] positions = [(-1, 0, 0), (0, 0, 0), (1, 0, 0)]
int[] protoIndices = [0, 0, 0]
rel prototypes = </World/InstancerOver/Prototype/Sphere>
over "Prototype"
{
def Sphere "Sphere"
{
double radius = 0.25
color3f[] primvars:displayColor = [(0, 1, 0)]
}
}
}
def PointInstancer "InstancerClass"
{
point3f[] positions = [(3, 0, 0), (4, 0, 0), (5, 0, 0)]
int[] protoIndices = [0, 0, 0]
rel prototypes = </World/InstancerClass/Prototype/Cone>
class "Prototype"
{
def Cone "Cone"
{
double height = 0.5
double radius = 0.25
color3f[] primvars:displayColor = [(0, 0, 1)]
}
}
}
}
Am I doing something wrong, or should I log a bug ?
