This example sublayers the robot-lineup scene, adds diffuse-reflection,
glossy-reflection, glossy-transmission, and caustics LPE RenderVars alongside
HdrColor, renders them in Path Tracing mode, and
converts the results to sRGB uint8 images for Rerun or PNG output.
The beauty image and four LPE outputs rendered from the same camera.#
“Create a compact ovrtx example that composes an existing scene with
reflection, transmission, and caustics LPE RenderVars, renders them with
HdrColor, and records sRGB ``uint8`` images.”
The example layer applies the PathTracing settings schema, disables radiance caching,
and requests beauty plus four LPE outputs. The USDA and usd-core snippets
below author equivalent RenderProducts.
The example maps every returned RenderVar, copies it before unmapping, and
converts linear floating-point outputs to display-ready sRGB images.
defread_lpe_outputs(frame)->dict[str,np.ndarray]:images={}forrender_var_path,render_varinframe.render_vars.items():# Copy before unmapping so each image remains valid after this iteration.pixels=_map_render_var(render_var)ifpixels.dtype==np.uint8:image=np.ascontiguousarray(pixels[...,:3])elifnp.issubdtype(pixels.dtype,np.floating):# HdrColor and LPE outputs are linear Rec.709 floating-point images.image=_linear_rec709_to_srgb_uint8(pixels)else:raiseTypeError(f"Unsupported image dtype for {render_var_path}: {pixels.dtype}")print(f" {render_var_path}: shape={pixels.shape}, dtype={pixels.dtype}",file=sys.stderr,)images[render_var_path]=imagereturnimages