Path Tracing Matte Object Texture Randomizer Error

While trying to randomize the static background with Path Tracing turned on I am getting blue backgrounds every 2rd or 3rd frame. RTX Realtime shows it in the first couple rt_subframes only, but I would rather use path tracing.

# When the trigger executes, run the following logic

    # Set background
        setting: /rtx/post/backgroundZeroAlpha/backplateTexture
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/cam6_10.48.190.166_554_20240205_132913-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/cam6_10.48.190.166_554_20240206_074317-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240108064113_20240108072806-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240108064113_20240108072806-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240108064113_20240108072806-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240117124752_20240117134752-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240117124752_20240117134752-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240201142421_20240201151119-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240201142421_20240201151119-"
              - "omniverse://localhost/Library/CRH/Backgrounds/cam6/CRH NVR11_ch29_20240201142421_20240201151119-"

cc @dennis.lynch

Setting the interval on trigger to 2 and picking up every odd result rgb frame “solves” this issue.

cc @pcallender

Thanks for posting this. I’ve reproduced the issue with the script below. I’ll make this into a ticket to track and see if we can get some clarity on what’s causing it.

import omni.replicator.core as rep
import carb
import carb.settings

test_textures_list = ['omniverse://localhost/NVIDIA/Materials/vMaterials_2/Ground/textures/aggregate_exposed_diff.jpg',

# Scene settings

# Remove the default light
default_light = rep.get.prims(path_pattern="/Environment/defaultLight")
with default_light:

camera_positions = [(1347,825,1440), (0, 825, 1440),(1440,825,0)]

# Create the lights
distance_light = rep.create.light(rotation=(400,-23,-94), intensity=10000, temperature=6500, light_type="distant")
cylinder_light = rep.create.light(position=(0,0,0),rotation=(0,-180,-180),light_type="disk")

# Create the environment
cone = rep.create.cone(position=(0,100,0), scale=2)
floor = rep.create.cube(position=(0,0,0), scale=(10,0.1,10))
wall1 = rep.create.cube(position=(-450,250,0), scale=(1,5,10))
wall2 = rep.create.cube(position=(0,250,-450), scale=(10,5,1))

#Create the replicator camera
camera =,825,1440), look_at=(0,100,0), focus_distance=200,f_stop=8)

# Set the renderer to Path Traced

# Create the render product
render_product  = rep.create.render_product(camera, (1920, 1080))

# Initialize and attach writer
writer = rep.WriterRegistry.get("BasicWriter")
writer.initialize(output_dir="_composite_test", rgb=True)

#Make the Compositing Post Process Enabled
rep.settings.carb_settings("/rtx/post/backgroundZeroAlpha/enabled", True)

# Render 10 frames, with 50 subframes
with rep.trigger.on_frame(num_frames=10, rt_subframes=50):
    rep.settings.carb_settings("/rtx/post/backgroundZeroAlpha/backplateTexture", rep.distribution.sequence(test_textures_list))
    with camera:
        rep.modify.pose(position=rep.distribution.sequence(camera_positions), look_at=(0,100,0))

Thanks for having a look. This is a minor issue for me as I have a workaround, but it would be nice to solve just to speed up the generation 2x (so I don’t have to delete every odd frame)

@pcallender what is the reason for hiding the default distant light and creating a new one? I always use the default one and modify it’s pose etc. Perhaps I’m doing it wrong?

It was just part of the script I use for testing a lot, and that script has very specific lighting. Whether you use default or not is entirely up to you.

This is a possible reason for this crash: Crash

I am trying to trial-and-error what is causing the crash and so far its either light randomization or changing backplateTexture with a distribution. Will get back with results soon.

This seems related as I get blue background on every even frame like other issues here: Ghosts and other weird things

any updates on this issue?

@user3362 you can do a workaround by generating spearate scenario YAMLs per background with a bash script and then running those generations separately. That said, this issue is a pain in the ***.

1 Like

Thanks, I’ve been having the same issue I’ll let you know if I find a better workaround. Very weird issue. You could automatically remove images over some threshold of those blue pixels and then regenerate that many but you’d probably have to do that recursively.

@pcallender any changes in 4.0.0 for this?