Replicator - Working with Layers

Layers In USD are a convenient way to organize and manage scenes. Replicator makes use of them in a few key ways.

  • Layers provide a clean way to prototype and manage scenes during authoring.

  • Layers allow a non destructive workflow in synthetic data generation, where there is no risk to permanently altering your root scene layer.

  • Used by Replicator to hold all replicator randomizations and graphs when rep.new_layer() is used.

Layer Organization with Replicator

The base scene has a root Authoring Layer. This is for:

  • User-specified changes

  • Optionally includes Replicator Randomizations (for creation of smart scenes and smart assets)

When we put with rep.new_layer() in a script, this creates a Replicator Randomization Layer that:

  • Holds replicator randomizations. rep.new_layer() will remove an existing Replicator Randomization Layer if it exists. When iterating, this makes it convenient to avoid accumulating multiple graphs.

  • Can be saved and layered on top of scenarios to provide preset randomization options.


When with rep.new_layer() is used, a new layer is created

import omni.replicator.core as rep

camera =
render_product = rep.create.render_product(camera, (1920, 1080))

with rep.new_layer():

With this corresponding to the layer newly created and shown in the Layers tab:

Replicator Use of Layers