Adding randomization to an exiting scene and saving it

Hello,

I am trying to use Omniverse Replicator to add domain randomization to existing objects in a scene. I used to use the old randomization tools in previous versions of Isaac-Sim. Using these, I was able to add randomization components and save the scene without losing this information. I am trying to move to the newest version of Isaac Sim and use Replicator, however, I am having trouble saving whatever randomization I add to the scene. I get that Replicator is creating an action graph after I run a certain script, but whenever I save and reopen the scene, the graph will be corrupted and won’t work.

Does anyone have a suggestion on the best way to achieve this? Is Replicator the way to go?

Can you include an example USD scene (before/after) for what you mean by “corrupted”?

There is no before USD scene because the moment I save the scene, the problem will occur. But I can share a screenshot of the stage and layer before saving and after saving.

Before

After

Save Flattened As, would give

Flattening the scene will save the graph, and the randomization will keep working, however, it’s not a very convenient way of doing it since all the other layers in case of a complex scene will be lost.

Thank you.

Hello @anthony.yaghi, if flattening the layers is not an available solution for your use case, you can omit the with rep.new_layer(): line - this will write Replicator directly into the existing authoring layer, normally Root.