Search - User list
Full Version: Editing Prototype Relationships for nested Point Instancers
Root » Solaris and Karma » Editing Prototype Relationships for nested Point Instancers
serebos
Hey,

I'm currently trying to figure out how to efficiently build assemblies with point instancers that instance other assets or assemblies, specifically those that also contain instancer and variant sets.

Let's say I have an assembly "TREE" (containing a prop "LEAF" and a point instancer "Instancer_leaves" that instances this asset a couple of times). TREE has a variant set that contains different variants with different but similar instance layouts.

Now I'm using TREE in another assembly "ENV". To use TREE's variant set in an Instancer I would use explorevariants LOP or something similar, to generate prototypes for each variant. Those I would feed into another Instancer LOP, leaving me with the following hierarchy:



The issue I'm seeing here is that this creates a lot of redundant information/prims in the scene graph. While I expect it wont affect rendering, it does significantly affect stage performance.
By generating per-variant-prototypes for TREE I'm also creating new descendent prims for each of these prototypes containing (identical) LEAF prims.

To improve this I thought I would simply move prop LEAF to a higher level in the hierarchy (i.e.. /ENV/prop) and adjust the prototype relationship parameter on Instancer_leaves to target this new root prim. This lets me deactivate the original LEAF prim before generating prorotypes-per-variant, resulting in significantly fewer primitives.



In the example the prim count went down to ~30%, and reductions are even greater the more complex the setup (millions of prims reduced to only tens of thousands in real-world scenes).

While in theory this is working great, I haven't been able to find any information about working this way in USD (except SideFX and the USD docs promoting not doing these kinds of relationship editing and keeping the hierarchy generated by the Instancer LOP) and in practice there are some issues regarding visibilities and transforms of instances.

Does anyone have experience with or an opinion about this kind of workflow? Or is anyone using a different kind of setup to solve these kinds of issues? Am I going at this the wrong way and there is a "more usd" approach to this?

Any help/suggestion/pointer in the right direction is really appreciated, I'm still pretty new to Solaris and trying to learn the concepts of USD.

Thanks!
Cheers
serebos
Update for anyone interested, as of a newer build 20.5.613, now there is a "createprotoarea" parameter on the Instancer LOP. When disabled, this sets the prototype relationship parameter on the instancer directly to the prototype source prims instead of to newly created referenced prims under the <Instancer>/Prototypes/... hierarchy.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB