Variants on Bones result with rendering of ghosted meshes

I have an aggregate USD, which has payload variants inside of it that are pointing to different helmets:

I am trying to place it in all my person USD files, in the head bone, so I can toggle different helmet variants for each of them during SDG.

The problem araises when I switch variants. The previously selected variant is still being rendered, while the newly selected one is added. This issue only happens when the aggregate is placed inside a bone. Outside of bones the variant switching works fine.

After switching to welding mask, the blue helmet should disappear, but it remains while the mask is added.

In the stage browser, it behaves correctly though, so it replaces the helmet with the mask:

So it seems only the rendering is broken, as there is always only one helmet asset present in the scene.

This issue has been observed while resolving this one: https://forums.developer.nvidia.com/t/enabling-omni-anim-skeljoint-crashes-the-app

@hclever

OK - is there a difference in this behavior when you use later usd versions + omni anim skelJoint 106.0.1 vs. earlier usd versions + omni anim skelJoint <= 105.x.x? If so can you describe the behavior?

Also, is this blocking you?

There seems to be no difference between versions of the extension, as we have seen this issue before. I thought it was caused by the same issue as the crash. Now that we have resolved the crash it turns out its a different thing.

Unfortunately this is very serious for us and is blocking our production workflows, that we wish to have to achieve our business goals.

I will try to give you an example that I can share with you without copyright issues so you can reproduce.

sounds goods.

Here you go. Please make sure you have the standard localhost nucleus with NVIDIA folder with all the S3 assets in there, as I have built these usds to base on publicly avilable content:

Contents of the zip are as follows:

  • agg_things.usd has the aggregate with different variants that we want to maintain centrally.
  • worker_with_agg.usd is an example of a person asset that is referencing the aggregate in a bone.

If you place those files in one folder, they should work due to relative paths. Please open the worker_with_aggs.usd and cycle through variants. You will see that it only adds new meshes to the viewport and doesn’t remove previous ones. They are being replaced on the object tree though.

worker_with_aggs.zip (4.9 KB)

FYI: I have tried your latest “NEWKIT” worker asset with latest skeljoint (106.*) and its behaving the same. We get variant leftovers when working in bones.

Also, after you place the aggregate in the bone you need to change the purpose to render.

Perhaps it would be easier to restore the xform constraint extension, so we can place assets outside of the skeleton and create appropriate constraints to the bones.

Related issue: https://forums.developer.nvidia.com/t/omni-anim-xform-constraints-no-longer-available-for-isaac-composer/

When using the replicator with a writer, we get the following:

You can see the ghosts remaining after the previous permutations. Good news is that the scattered person gets a new variant and it looks all right. We could go forward with this if not for the fact that at scale the space will be completely obfuscated by the ghost variants.


It seems to only leave the last postition of each variant over…

They also cast shadows…

I could be wrong, but I doubt this will happen.

Ah - so this is how the issue presents itself - with the ghosting? or is the ghosting a different issue? I have yet to repro is as i am having some issues with my localhost I need to work out first.

Yes, the ghosts are the problem. When the aggregate prim (helmets variants) is on a bone (head), then variant selection leaves over the previously selected options. Once something appears it never disappears.

If you help me sort this out I will be out of your hair for good :)

OK! Yes, I will get to the bottom of it.

The issue appears to be caused by some other extension - omni.kit.variant.presenter, which I am just getting familiar with. I have filed a high priority internal ticket with the right people and I am also continuing my own digging.

1 Like

have you looked into the omni replicator core modify variant function as an alternative for this kind of workflow? It’s done through replicator which is easier for my team to support.

https://docs.omniverse.nvidia.com/py/replicator/1.11.16/source/extensions/omni.replicator.core/docs/API.html#omni.replicator.core.modify.variant

EDIT: since i can’t post a 3rd consecutive response …

The variants team showed me that you are able to turn on the fabric scene delegate (see screenshot) , which fixes the ghosting issue. Can you see if this is sufficient for you?

I am using the replicator variant function, there is no other way to randomize :)

I will try the fabric approach. Yesterday when I tried it (I found it myself) there was no difference. Perhaps I need Ada Lovelace?

After more internal discussion I realize that FSD works on this particular scene for toggling but it is also not compatible with synthetic data, so it won’t work for you.

Also, the issue is not in the kit variants presenter, it is with how the omni anim skelJoints interacts with hydra / rendering. If you move the variant prim off of a skel joint and anywhere else, the ghosting goes away. I’m digging into it more but I don’t yet have a solution. Is it possible for you to base your variants on some prim that is not a child of a skeleton as a workaround?

One thing i’m looking into now is the possibility for having some proxy prim elsewhere on the stage that reads in the hand transform and uses it to update the transform of the variant, where the variant is a child of the proxy prim and NOT the skeleton. but i don’t have that workaround implemented yet.

if we’re going to get something like the above working I may need some more code to try and put it together. no guarantee but it’s good to push this along side the ticket i filed with the skelJoint / hydra folks. So as such can you send me a usd with a replicator snippet that does randomizations and has ghosting, that I can step through on the kit viewport / UI?