When I run Replicator and set the renderer to Path Tracing, the samples don’t accumulate. I am expecting a more refined image than the outputed image. This happens with on_frame and on_time triggers.
I’m using the code from “Running Replicator Headlessly”:
https://docs.omniverse.nvidia.com/prod_extensions/prod_extensions/ext_replicator/headless_example.html
I added the following code, (after with rep.new_layer():) to implement path tracing and a consistent seed, (low quality render results without the global seed line too):
rep.set_global_seed(23)
rep.settings.set_render_pathtraced(samples_per_pixel=64)
I did some digging and found the following in the file “code-2022.2.0\extscache\omni.replicator.core-1.4.7+wx64.r.cp37\omni\replicator\core\scripts\orchestrator.py”
# Set frame counter explicitly
carb.settings.get_settings().set_int("/rtx/externalFrameCounter", self._frame)
which since it runs at every frame or subframe it will always reset and not accumulate samples.
this happens because the following is set, (in the same file):
# Setting resetPtAccumOnlyWhenExternalFrameCounterChanges ensures we control accumulation explicitly
# by simpling changing the /rtx/externalFrameCounter value
_settings.set_bool("/rtx-transient/resetPtAccumOnlyWhenExternalFrameCounterChanges", True)
the fix for me is to use the following in orchestrator.py so that it resets only when the frame has started:
if self._subframe == 1:
carb.settings.get_settings().set_int("/rtx/externalFrameCounter", self._frame)
Do I need to change something to get Path Tracing using more than one sample to work correctly?
Is there a new version being released soon?
I appreciate any help I can get.
Windows 11
Omniverse Code 2022.2.0
omni.replicator.core-1.4.7+wx64.r.cp37
RTX 3090
Thank you,
Mark