Sliced Rendering
When to Use
Use this skill when an application must render one camera image as multiple
dataWindowNDC regions and reassemble the mapped outputs, for example to render an image larger than 8k. Use the tiled
rendering example instead when one RenderProduct combines multiple cameras.
Inputs
- Full RenderProduct resolution and RenderVar path.
- Crop grid or explicit
(xmin, ymin, xmax, ymax)windows. - Tile traversal order, warmup count, and output device.
- Destination image layout and whether exact full-frame equivalence is needed.
Prerequisites
- Read
writing-attributesandattribute-bindingsfor repeated OVStage writes through one stable RenderProduct query. - Read
warmupfor accumulation and texture-streaming behavior. - Read
reading-render-outputfor mapping and ownership. - Start from the runnable Python source referenced below.
Instructions
- Keep the RenderProduct's authored
resolutionat the desired full-image size. Author or populatedataWindowNDCas a scalarfloat4first. - Define non-overlapping, pixel-aligned crop windows. OpenUSD NDC uses
(xmin, ymin, xmax, ymax)with a bottom-left origin. - Reuse one OVStage query for the RenderProduct. Encode each crop as one
float32logical element with four DLPack lanes, not four scalar rows. - For every crop, allocate a monotonically increasing ordinal, wait for the attribute write, advance the write floor, and render that same ordinal.
- Warm up after publishing each crop when RTPT image quality matters. Discard warmup outputs and capture a separate final step.
- Map the full RenderVar prim path to CPU, copy the DLPack view before unmap, and validate tile shape, dtype, and channel count before stitching.
- Place tiles using the renderer output's row orientation. The reference
LdrColorworkflow places the lower NDC half in the lower-index tensor rows; do not assume Pillow's top-left display convention matches NDC. - Verify every destination pixel is covered exactly once. Visually inspect seams and, when equivalence is required, compare with a full-window render.
- Release the reusable query and path list before detaching and destroying the stage and renderer.
Python
Source (tested crop writes and stitching):
tests/docs/python/test_base.pysnippetdoc-sliced-renderingSource (complete application setup):examples/python/sliced-rendering/main.pysnippetsliced-rendering-setupSource (warmup and capture loop):examples/python/sliced-rendering/main.pysnippetsliced-rendering-render-and-stitch
Validation
- Run
tests/docs/python/test_base.py::test_sliced_renderingagainst the intended OVRTX and OVStage builds. - Run
examples/python/sliced-rendering/main.py --pngand confirm the output is full resolution with correctly oriented, continuous seams.
Output Format
- State the crop windows, traversal order, full resolution, and tile sizes.
- Identify the application-owned ordinal and warmup count.
- Report the output RenderVar path, dtype, shape, and stitching orientation.
- List the exact validation command and observed output dimensions.
Scripts
This skill has no scripts. Use the tested snippets and runnable example.
Limitations
- Successive RTPT crops may not be pixel-identical to a single full-window render because temporal accumulation and sampling history differ by crop.
- Non-pixel-aligned NDC boundaries can introduce gaps, overlaps, or rounding differences.
- This skill covers CPU stitching. For GPU-resident composition, also use the
cuda-interopskill and preserve explicit synchronization.
Troubleshooting
- If crop dimensions are wrong, verify the NDC boundaries align with pixel centers at the authored full resolution.
- If tiles are vertically swapped, check NDC bottom-left orientation against the mapped tensor's row order before changing crop traversal.
- If seams differ in brightness or noise, warm up every crop equally and avoid advancing unrelated scene state between captures.
- If a crop update is ignored, wait for its write, advance the write floor, and render the same ordinal.
References
examples/python/crop-windowfor one static crop.examples/python/sliced-renderingfor four sequential quadrants.docs/examples/python_sliced_rendering.rstfor the user-facing workflow.