PointInstancer prototypes render issue in Storm (Vulkan and OpenGL)

Hi everyone,

We are seeing a curious situation related to rendering pointinstancer when using Storm. There seem to be two separate cases which might be related but might not. Using USD 24.03 on Windows right now, will test the same in 24.11 soon. Working in C++.

Case A (in debug and release mode):

  • Create a stage with prototype source prim (lets say “/card”) and pointinstancer “/myinstancer” which has one prototype in instancer scope named “prototype_1” that references the card.
  • Render stage
  • Result looks fine
  • Create new stage with two prototypes (“/card” and “/triangle”) and pointinstancer “/myinstancer” which has two prototypes now (“/prototype_1”, “/prototype_2”) referencing the card and triangle, so some instances have one, some other
  • Render stage using same renderer instance as before
  • Result only contains first prototype instances, second ones with ID 1 are not rendered at all
  • If the names of prototypes are changed so they don’t match previous render (for example (“prototype_100”, “prototype_200”) it renders all instances

Case B (only in release mode):

  • Continuing from above, with OpenGL all instances are rendered in their expected locations and with expected attributes
  • With Vulkan however, instances will in most cases render at locations of other instances so they are overlapped. This also happens when doing the first render so looks like a problem with instancer rendering mechanics in Vulkan.

In Case A it looks like something going wonky in the sceneIndex or renderIndex updating. We are using UsdImagingGLEngine so very high level approach, we don’t have anything customized in the sceneIndex or renderIndex mechanics. Case B looks like attribute array lookups use wrong index/offset as they aquire all attributes (scale etc) from wrong instances. Interestingly protoIndices seem to be correct as the correct number of each prototype seems to be rendered, just in wrong places and with wrong attributes. It is also worth noting that there are no material bindings, just geometry rendered, and example images above show the alpha channel as it renders black otherwise.

Stage that gets rendered is perfectly fine, there is nothing wrong with the scenegraph data as I can export it and open in Nuke etc and it displays as expected.

I have a minimal setup that can reproduce both problems but it needs some cleanup, so I’d like to ask if anyone has noticed this behavior or maybe it is already logged as an issue (I didn’t find one yet)?

We now got 24.11 build going and it seems that case B is solved, it renders correctly, but case A is still happening: when prototype names are not modified, it won’t render any of the instances where protoIndice value is outside the range of indices in previous render.