I have a skelmesh.usd file which contains joints & initial transforms etc, as well as setting out variants pointing to various geometry options. This looks good, its a self contained .usd where I can see in usdview my variants and am able to switch between them
I then have a stage.usd which defines animation files loads a reference to the skelmesh file for each agent in my scene
Finally I have a ‘masterstage.usd’ which loads in all the stages, and sets the overrides on the variants for each agent.
This all works ok.
However, my agents are not instanced. This is really heavy with 10,000+ agents.
So I thought about setting ‘instanceable=True’ onto my skelmesh.usd because this contains all the variations, joints and geo meshes etc, I only need to load this once right?
but in my master scene I can no-longer override the agents
if I try to change the variants I get:
'Cannot create prim spec at path </agent/Agent_1/Geo/hat>; authoring to an instance proxy is not allowed
So my question is: how do I instance tens of thousands of agents, and be able to change their variations?
Can you show us, i nyour example, what you did, and also what “none of the variants changed” means? E.g. is it just that imaging does not update, or if you drill down inside the instance in usdview, has nothing changed?
What @nvmkuruc suggested definitely should work, and is the recommended pattern for coordinating variantSets on instanceable prims.
We have a new module on instancing that that explains the ins and outs of how scenegraph instancing works and how to setup an instanceable asset. These topics on asset parameterization and lofting variants are also relevant and you may find them helpful.
I have attached a basic repo case of what I am doing. there are two setups, one not using instancing and the other using it.
MasterStage is the main file to view, it sets the overrides and also calls the sub-set stage, which in turn loads the agents and their animations
I hope its clear.
the non instancing version works fine, you can see some of the agents have torus and other have cones. But the instanced version they are all torus and the variant cant be changed.