Skip to content

Apply PPISP in Camera Wrapper Across Renderers - #5499

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
moennen:nicolasm/ppisp-renderer-simple-integration
May 20, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
moennen:nicolasm/ppisp-renderer-simple-integration

Conversation

@moennen

@moennen moennen commented May 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Introduces a wrapper-side Physically Plausible Image Signal Processing (PPISP) pipeline on the Camera sensor that converts the renderer's HDR AOV to LDR RGBA on every render tick. The pipeline applies responsivity → exposure → vignetting → color homography → camera response function → uint8 clamp in a single Warp kernel, called once per tick from the camera.
The kernel runs after the renderer fills the HDR buffer and writes back into the user-requested rgb/rgba output, so the rest of the pipeline stays untouched.

The integration is renderer-agnostic. New public surface in isaaclab.sensors.camera:

  • CameraPPISPCfg — explicit ISP coefficients (or a USD shader prim path).
  • CameraISPMode — AUTO_CAMERA (find an ISP shader bound to this camera via a RenderProduct), AUTO_ANY (fall back to the first PPISP shader anywhere on stage).
  • CameraISP — owns HDR-buffer allocation and per-tick kernel dispatch.
  • CameraCfg.isp_cfg — accepts CameraPPISPCfg | CameraISPMode | None; defaults to CameraISPMode.AUTO_ANY.

Renderer contract extensions (in isaaclab.renderers):

  • RenderBufferKind.RGB_HDR (3-channel float, scene-linear).
  • RendererCfg.apply_pre_reset_settings(*, require_hdr_output) — backend hook to author global carb settings before sim.reset().
  • BaseRenderer.prepare_cameras(stage, spec) — backend hook for per-camera USD setup.
  • CameraRenderSpec — immutable snapshot of a tiled camera bundle so backends don't hold a reference to the sensor.

Backend changes:

  • IsaacRtxRenderer (isaaclab_physx): advertises RGB_HDR via the Replicator HdrColor annotator; prepare_cameras authors a neutral OmniRtxCameraExposureAPI_1 schema on each camera prim so RTX-side tonemapping does not double-process the ISP output; apply_pre_reset_settings sets /isaaclab/render/rtx_sensors=True and flips /rtx/rtpt/gaussian/skipTonemapping/enabled=False when HDR is requested (required to keep 3DGS splats in HDR).
  • OVRTXRenderer (isaaclab_ov): mirrors the IsaacRtx changes (HDR render var, neutral exposure schema, skipTonemapping).
    The exposure-override helper is intentionally duplicated rather than imported across sibling packages during the release window.
  • NewtonWarpRenderer (isaaclab_newton): advertises RGB_HDR (its scene-linear color is already what we need).

Dependencies

No new runtime dependencies. Uses existing IsaacLab dependencies: Warp, Torch, USD, and renderer-specific backends.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Screenshots

Not applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label May 5, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR adds PPISP (Physically Plausible Image Signal Processing) post-processing support across all three camera renderers (Isaac RTX, OVRTX, Newton Warp). It introduces a shared Warp kernel for PPISP application at the camera wrapper level, adds rgb_hdr output plumbing for HDR color capture, and bundles SPG shader assets for USD-based PPISP graphs. The core implementation is sound, but there are several issues with the Warp kernel math, test isolation, and missing synchronization.

Architecture Impact

  • Cross-module: CameraCfg.ppisp flows through Camera._check_supported_data_types() → renderer's set_outputs() → _apply_ppisp_if_needed(). All three renderers (IsaacRtxRenderer, OVRTXRenderer, NewtonWarpRenderer) are updated to support RGB_HDR.
  • New public API: PPISPCfg is exported from isaaclab.renderers.__init__.pyi.
  • Bundled assets: SPG shader files in ppisp_spg/ are included via setup.py package_data.
  • Newton compatibility layer: Defensive accessors (_newton_sensor_render_config, _newton_sensor_utils) added to support multiple Newton API versions.

Implementation Verdict

Minor fixes needed — The core design is correct, but there are issues with missing GPU synchronization, vignetting not being applied in the Warp kernel, and test determinism concerns.

Test Coverage

Two new test files added:

  • test_ppisp.py: Tests USD/SPG authoring helpers (shader import, render product parsing, SPG asset bundling) — good coverage of USD utilities
  • test_ppisp_warp.py: Tests Warp kernel exposure effect and camera wrapper integration — minimal coverage, missing vignetting/color correction tests

Missing: No regression tests for the Newton API compatibility changes. No integration tests verifying end-to-end PPISP with actual rendering.

CI Status

Only labeler ran successfully. Full CI suite results not available.

Findings

🔴 Critical: ppisp_warp.py:140-146 — Missing GPU synchronization after Warp kernel launch
The apply_ppisp_to_rgba function launches a Warp kernel but does not synchronize before returning. When the caller immediately reads out_rgba, they may get stale data since the kernel runs asynchronously.

def apply_ppisp_to_rgba(hdr_color: torch.Tensor, out_rgba: torch.Tensor, cfg: PPISPCfg) -> None:
    # ... kernel launch ...
    wp.launch(...)
    # Missing: wp.synchronize() or equivalent

Fix: Add wp.synchronize_device(str(out_rgba.device)) or use wp.synchronize() after the launch.

🔴 Critical: ppisp_warp.py:117-130 — Warp kernel ignores vignetting parameters entirely
The _apply_ppisp_kernel kernel signature accepts only exposure and color/CRF parameters but the SPG shader (ppisp_usd_spg.slang) applies vignetting per-channel. The Warp kernel completely skips vignetting, meaning results will differ between USD SPG execution and IsaacLab-side PPISP:

# Kernel only applies: exposure → color correction → CRF
# Missing: vignetting step that exists in Slang shader lines 166-175

Fix: Either add vignetting to the Warp kernel or document this as an intentional simplification.

🟡 Warning: camera.py:538-542 — Potential race condition with _renderer_output_data aliasing
When PPISP is disabled, _renderer_output_data is set to dict(self._data.output), creating a shallow copy. Both the renderer and PPISP code may reference the same underlying tensors. If a future renderer mutates buffers in-place during async operations, this could cause data corruption.

self._renderer_output_data = dict(self._data.output)  # shallow copy

Fix: This is currently safe but fragile. Consider documenting the ownership contract.

🟡 Warning: newton_warp_renderer.py:64-73 — _newton_clear_data falls back to private module import
The fallback imports from newton._src.sensors.warp_raytrace, which is a private API path:

from newton._src.sensors.warp_raytrace import ClearData as clear_data_cls

This may break silently on future Newton versions. Consider adding a try/except with a meaningful error message.

🟡 Warning: test_ppisp_warp.py:32-57 — Test uses SimpleNamespace to mock Camera, bypassing real initialization
The test creates a mock Camera with SimpleNamespace, which doesn't verify that Camera._apply_ppisp_if_needed is actually bound correctly as a method or that the real camera initialization properly sets up PPISP:

camera = SimpleNamespace(
    cfg=SimpleNamespace(ppisp=ppisp_cfg),
    _renderer_output_data={"rgb_hdr": hdr_color},
    ...
)
Camera._apply_ppisp_if_needed(camera)  # Calling as unbound method

This test passes even if _apply_ppisp_if_needed were never actually called in production code paths.

🔵 Improvement: ppisp.py:538-544 — Temporary directory created for anonymous stages is never cleaned up
When stages are anonymous, _resolve_stage_spg_assets creates a temp directory with tempfile.mkdtemp but never registers cleanup:

stage_dir = Path(tempfile.mkdtemp(prefix="isaaclab_ppisp_spg_"))
copy_ppisp_spg_files(stage_dir)
# No cleanup registered

Fix: Consider using tempfile.TemporaryDirectory with delete=False and registering an atexit handler, or document the leak.

🔵 Improvement: isaac_rtx_renderer.py:214-220 — Duplicated annotator registration logic
The HDR annotator registration is duplicated between the rgba/rgb branch and the explicit rgb_hdr branch:

if annotator_type == "rgba" or annotator_type == "rgb":
    if spec.cfg.ppisp is not None:
        annotator = rep.AnnotatorRegistry.get_annotator("HdrColor", ...)
        annotators[str(RenderBufferKind.RGB_HDR)] = annotator
# ... later ...
elif annotator_type == str(RenderBufferKind.RGB_HDR):
    annotator = rep.AnnotatorRegistry.get_annotator("HdrColor", ...)
    annotators[str(RenderBufferKind.RGB_HDR)] = annotator

Fix: Consolidate to avoid double-registration if user requests both rgba with PPISP and explicit rgb_hdr.

🔵 Improvement: ppisp_usd_spg.slang.usda — File is stored in Git LFS but appears to be small (1918 bytes)
The .usda file is tracked via Git LFS according to its pointer content, but at only 1918 bytes, it might be simpler to store it directly. This also means anyone cloning without LFS won't get the actual content.

@greptile-apps

greptile-apps Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces renderer-agnostic PPISP support in the IsaacLab camera wrapper by requesting HDR (rgb_hdr) from the renderer, applying exposure/vignetting/color-homography/CRF tone-mapping via a Warp kernel, and writing the result into the rgb/rgba output buffers. All three renderers (IsaacRTX, OVRTX, Newton) gain RGB_HDR plumbing, and USD/SPG parsing utilities are preserved for compatibility.

  • New Warp PPISP kernel (camera_ppisp_warp.py): implements the full ISP pipeline in a single kernel; the _apply_crf function can silently produce NaN/Inf pixels when crfCenter parameters cause the float32 sigmoid to saturate exactly to 0.0 or 1.0.
  • Camera wrapper integration (camera.py): PPISP hook is called post-render; the RGBA output target is hard-coded without a guard against renderers that expose RGB_HDR but not RGBA.
  • OVRTX renderer (ovrtx_renderer.py + ovrtx_usd.py): get_render_var_config refactored to return multiple render vars; when PPISP is active, both LdrColor and HdrColor are included in orderedVars, causing an unnecessary LDR render pass each frame.

Confidence Score: 3/5

The CRF tone-mapping kernel can silently corrupt all pixels to NaN or Inf when user-supplied crfCenter parameters push the float32 sigmoid to its overflow boundary; this needs a clamp before merge.

The _apply_crf Warp function computes x/center and (1-x)/(1-center) where center = _sigmoid(center_raw). For |center_raw| > ~87.3 in float32, exp overflows and sigmoid returns exactly 0.0 or 1.0, turning both branches into 0/0 or finite/0 and propagating NaN or Inf to every pixel in the frame with no error or clamping. Users control these parameters directly via CameraPPISPCfg.inputs, so the failure is user-reachable. Everything else (USD refactor, renderer plumbing, Warp tiling kernels) is structurally sound.

source/isaaclab/isaaclab/renderers/camera_ppisp_warp.py - the _apply_crf function needs a clamp on the sigmoid output before the piecewise division.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/renderers/camera_ppisp_warp.py New Warp kernel implementing the full PPISP pipeline; _apply_crf can produce NaN/Inf pixels when crfCenter parameters saturate float32 sigmoid to exactly 0.0 or 1.0.
source/isaaclab/isaaclab/sensors/camera/camera.py Adds PPISP hook (_apply_ppisp_if_needed) called after each render; hard-codes RGBA as the output target without guarding against renderers that support RGB_HDR but not RGBA.
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py Adds HdrColor extraction and RGB_HDR support; when PPISP is enabled LdrColor is still included in the render scope, causing a wasted LDR render pass per frame.
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py Refactors get_render_var_config into get_render_var_configs returning multiple render-var tuples; backwards-compatible shim preserved.
source/isaaclab_physx/isaaclab_physx/renderers/isaac_rtx_renderer.py Adds HdrColor annotator path for PPISP; correctly deduplicates annotator registration across rgb/rgba.
source/isaaclab_newton/isaaclab_newton/renderers/newton_warp_renderer.py Adds hdr_color_image passthrough to newton_sensor.update(); field annotation declares ndim=4 but _from_torch produces ndim=3.
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_kernels.py New extract_all_rgb_float_tiles_kernel correctly extracts R, G, B float channels from tiled HdrColor buffer.
source/isaaclab/isaaclab/renderers/camera_ppisp.py New USD/SPG parsing helpers for CameraPPISPCfg; normalize_camera_ppisp_cfg silently ignores shader_prim_path when called without a stage.

Sequence Diagram

sequenceDiagram
    participant Cam as Camera Wrapper
    participant Renderer as Renderer (RTX/OVRTX/Newton)
    participant PPISP as _apply_ppisp_if_needed
    participant Warp as apply_ppisp_to_rgba (Warp)

    Cam->>Renderer: set_outputs(_renderer_output_data)
    Cam->>Renderer: render(render_data)
    Renderer-->>Cam: writes hdr_color to rgb_hdr buffer
    Note over Renderer: OVRTX also writes LdrColor to rgba (wasted)
    Cam->>Renderer: read_output(render_data, camera_data)
    Cam->>PPISP: _apply_ppisp_if_needed()
    PPISP->>Warp: apply_ppisp_to_rgba(hdr_color, rgba, cfg)
    Warp-->>PPISP: exposure, vignetting, homography, CRF, uint8 packing
    PPISP-->>Cam: rgba and rgb view updated with LDR PPISP result
Loading

Reviews (3): Last reviewed commit: "Preserve OVRTX LDR output with RGB HDR" | Re-trigger Greptile

@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from 2fcda20 to 73a68df Compare May 5, 2026 15:38
@moennen
moennen marked this pull request as draft May 5, 2026 15:42

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This is a follow-up review on commit 73a68dfe. The PR has been significantly simplified — all SPG shader assets and Newton API compatibility layers have been removed. The implementation is now focused solely on the Warp kernel PPISP pipeline.

Previous Concerns Status

  • GPU synchronization: NOT addressed — apply_ppisp_to_rgba still lacks wp.synchronize() after kernel launch
  • Vignetting in Warp kernel: ADDRESSED — vignetting is now fully implemented in _apply_vignetting function (lines 33-54 in camera_ppisp_warp.py)
  • _renderer_output_data aliasing: Still present but was acknowledged as safe
  • Newton private API import: RESOLVED — the Newton API compatibility layer was removed entirely
  • Test using SimpleNamespace mock: Still present but acceptable for unit testing
  • Temp directory cleanup: RESOLVED — SPG asset handling removed entirely
  • Duplicated annotator registration: Still present in isaac_rtx_renderer.py:214-220

New Findings

🔴 Critical: camera_ppisp_warp.py:233-282 — Missing GPU synchronization after Warp kernel launch
This remains unaddressed from the previous review. The kernel launches asynchronously and the function returns immediately:

def apply_ppisp_to_rgba(hdr_color: torch.Tensor, out_rgba: torch.Tensor, cfg: CameraPPISPCfg) -> None:
    wp.launch(_apply_ppisp_kernel, ...)
    # No wp.synchronize() - caller may read stale data

Fix: Add wp.synchronize_device(str(out_rgba.device)) before returning.

🟡 Warning: camera_ppisp_warp.py:247 — wp.init() called on every PPISP application
wp.init() is called inside apply_ppisp_to_rgba, which runs every frame. While Warp handles repeated init calls gracefully, this adds unnecessary overhead:

def apply_ppisp_to_rgba(...):
    inputs = cfg.inputs
    wp.init()  # Called every frame

Fix: Move wp.init() to module-level or camera initialization.

Implementation Verdict

Minor fixes needed — The synchronization issue is critical for correctness. The wp.init() call is a performance concern but not blocking.

Test Coverage

Tests are adequate for the simplified implementation. The vignetting test (test_ppisp_warp_vignetting_uses_detiled_camera_coordinates) validates the new vignetting code path.

Claude: ## 🤖 Isaac Lab Review Bot

Summary

This is a follow-up review on commit 73a68dfe. The PR has been significantly simplified — all SPG shader assets and Newton API compatibility layers have been removed. The implementation is now focused solely on the Warp kernel PPISP pipeline.

Previous Concerns Status

  • GPU synchronization: NOT addressed — apply_ppisp_to_rgba still lacks wp.synchronize() after kernel launch
  • Vignetting in Warp kernel: ADDRESSED — vignetting is now fully implemented in _apply_vignetting function (lines 33-54 in camera_ppisp_warp.py)
  • _renderer_output_data aliasing: Still present but was acknowledged as safe
  • Newton private API import: RESOLVED — the Newton API compatibility layer was removed entirely
  • Test using SimpleNamespace mock: Still present but acceptable for unit testing
  • Temp directory cleanup: RESOLVED — SPG asset handling removed entirely
  • Duplicated annotator registration: Still present in isaac_rtx_renderer.py:214-220

New Findings

🔴 Critical: camera_ppisp_warp.py:233-282 — Missing GPU synchronization after Warp kernel launch
This remains unaddressed from the previous review. The kernel launches asynchronously and the function returns immediately:

def apply_ppisp_to_rgba(hdr_color: torch.Tensor, out_rgba: torch.Tensor, cfg: CameraPPISPCfg) -> None:
    wp.launch(_apply_ppisp_kernel, ...)
    # No wp.synchronize() - caller may read stale data

Fix: Add wp.synchronize_device(str(out_rgba.device)) before returning.

🟡 Warning: camera_ppisp_warp.py:247 — wp.init() called on every PPISP application
wp.init() is called inside apply_ppisp_to_rgba, which runs every frame. While Warp handles repeated init calls gracefully, this adds unnecessary overhead:

def apply_ppisp_to_rgba(...):
    inputs = cfg.inputs
    wp.init()  # Called every frame

Fix: Move wp.init() to module-level or camera initialization.

Implementation Verdict

Minor fixes needed — The synchronization issue is critical for correctness. The wp.init() call is a performance concern but not blocking.

Test Coverage

Tests are adequate for the simplified implementation. The vignetting test (test_ppisp_warp_vignetting_uses_detiled_camera_coordinates) validates the new vignetting code path.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

Previous concerns remain unaddressed in commit 3cd43d94:

  1. GPU synchronization (🔴 Critical): apply_ppisp_to_rgba at line 247 still lacks wp.synchronize() after the kernel launch. The caller in camera.py:545 may read stale data from out_rgba.

  2. wp.init() per-frame (🟡 Warning): Still called inside apply_ppisp_to_rgba on every frame at line 248.

No new issues introduced. The diff between commits appears minimal (formatting/cleanup only).

Implementation Verdict

Minor fixes still needed — please address the synchronization issue before merge.

@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from 3cd43d9 to 3d15b5d Compare May 5, 2026 18:01

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

Previous concerns addressed:

  1. ✅ wp.init() moved to module level (line 15) — no longer called per-frame.
  2. ✅ GPU synchronization handled via wp.stream_from_torch() — the kernel now launches on the correct CUDA stream associated with the output tensor, ensuring proper ordering without explicit wp.synchronize().

New observation:
The stream handling at line 247 passes stream=None for CPU tensors, which is correct. The CUDA path properly synchronizes via stream association.

Implementation Verdict

Ship it — previous concerns resolved, implementation looks correct.

@moennen
moennen marked this pull request as ready for review May 5, 2026 18:15

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

Previous concerns about wp.init() placement and GPU synchronization have been addressed. The new commits add test coverage and extend RGB_HDR support across renderers.

One new issue:

🟡 Warning: source/isaaclab/isaaclab/sensors/camera/camera.py:544 — Missing rgb alias update after PPISP

The _apply_ppisp_if_needed method writes to rgba but doesn't update the rgb alias. Looking at line 544:

rgba = self._data.output[str(RenderBufferKind.RGBA)]
apply_ppisp_to_rgba(hdr_color, rgba, self.cfg.ppisp)

Since rgb is created as rgba[..., :3] (a view into rgba's storage) during buffer allocation, this should work correctly — the view shares memory with rgba. However, _create_buffers explicitly aliases rgb at line 527 via dict(self._data.output), and CameraData.allocate creates the alias. Verified this is safe because both reference the same underlying storage.

Implementation Verdict

Ship it — the rgb/rgba aliasing is handled correctly via shared tensor storage. No new blocking issues.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The previous concern about rgb/rgba aliasing was already noted as safe in the last review. Examining the new commits:

The changes are test additions and minor refinements. No new implementation issues introduced.

Implementation Verdict

Ship it — Test coverage is comprehensive, RGB_HDR plumbing is consistent across all three renderers (Isaac RTX, OVRTX, Newton Warp), and the PPISP integration follows the documented design.

@moennen
moennen marked this pull request as draft May 5, 2026 21:01
@moennen
moennen marked this pull request as ready for review May 7, 2026 21:32
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from b517838 to e545325 Compare May 7, 2026 23:41
@moennen moennen changed the title Draft: Apply PPISP in Camera Wrapper Across Renderers Apply PPISP in Camera Wrapper Across Renderers May 8, 2026
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from 6053d85 to def276f Compare May 12, 2026 00:41
@moennen
moennen requested a review from ooctipus as a code owner May 12, 2026 00:41

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: Apply PPISP in Camera Wrapper Across Renderers

Review updated for commits dbbaa11 → 17d83fb

Summary of Latest Changes

This update introduces a comprehensive wrapper-side PPISP (Physically Plausible Image Signal Processing) pipeline for camera HDR output across all renderer backends.

Key Additions

1. New isaaclab_ppisp Package

  • Standalone package containing the post-render ISP pipeline
  • PpispCfg for configuration with USD shader discovery helpers
  • Single Warp kernel (apply_ppisp_to_rgba) handling: responsivity, exposure, vignetting, color homography, and CRF tonemapping
  • PpispPipeline class for renderer composition

2. Renderer Integration

  • All three backends (Isaac RTX, OVRTX, Newton Warp) now advertise RGB_HDR output
  • Each backend composes PpispPipeline internally when isp_cfg is set
  • New prepare_cameras hook for per-camera USD setup (exposure overrides, API schema application)

3. Camera Configuration

  • Added CameraISPMode enum (AUTO_CAMERA, AUTO_ANY) for USD shader discovery
  • CameraCfg.isp_cfg accepts None, CameraISPMode, or explicit PpispCfg

4. RTX Exposure Handling

  • Neutral OmniRtxCameraExposureAPI_1 and OmniRtxCameraAutoExposureAPI_1 schemas applied
  • Prevents RTX-side tonemapping from double-processing ISP output

Code Quality ✅

  • Clean separation: isaaclab.sensors.camera has no PPISP dependency
  • Lazy imports in renderer backends for soft dependency
  • Comprehensive test coverage including synthetic gaussian scene tests

Documentation ✅

  • Detailed camera ISP section in docs
  • Changelog fragments for all affected packages

Update (17d83fb): Reviewed incremental changes (8a2eb5e → 17d83fb).

What Changed in This Increment:

  • Extended documentation for camera ISP in camera.rst with full PPISP usage guide
  • Added ServiceLocator class for lifecycle-managed singleton services in SimulationContext
  • Install order updated: isaaclab_ppisp now precedes renderer backends to resolve dependencies
  • Added CameraISPMode enum (AUTO_CAMERA, AUTO_ANY) in new camera_isp.py
  • Comprehensive test suite for PPISP across all renderers (Isaac RTX, OVRTX, Newton)
  • Synthetic gaussian asset generation helpers for testing
  • OVRTX HdrColor extraction kernels (float32 and float16)
  • RTX camera exposure override helpers moved to isaaclab_ppisp

Previous Concerns Status:

  • ✅ CRF NaN/Inf (P1): Remains fixed — center clamped in _apply_crf
  • ✅ wp.init() overhead (P2): Remains fixed — at module import time
  • ✅ Temp directory leak (P1): Resolved — clean standalone package

New Observations:

  • ✅ Clean implementation of ServiceLocator with proper close semantics
  • ✅ Robust OVRTX HdrColor extraction with float16→float32 conversion
  • ✅ Well-documented ISP auto-discovery from USD stage
  • ✅ Test coverage includes multi-tile scenarios

Verdict: Feature-complete, well-tested implementation. No new issues.

pbarejko

This comment was marked as resolved.

@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from def276f to 11ddf2e Compare May 12, 2026 14:52
@moennen

moennen commented May 12, 2026

Copy link
Copy Markdown
Collaborator Author

This work scatters implementation details almost everywhere.

@pbarejko
Agree and sorry about that. I did refactor to comply to what I understood from your comments about the rendering design principles.
Please let me know if I'm still missing something 🙏

@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from abe3e42 to 3214320 Compare May 12, 2026 23:20
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch 2 times, most recently from 54846fd to 8d4b6da Compare May 13, 2026 11:26
@moennen
moennen requested a review from huidongc May 13, 2026 16:53
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch 3 times, most recently from 2cb0dde to cc63c64 Compare May 13, 2026 22:10
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from cc63c64 to 95e6ed6 Compare May 14, 2026 10:41
@kellyguo11 kellyguo11 moved this to In review in Isaac Lab May 15, 2026
@kellyguo11 kellyguo11 moved this from In review to Ready to merge in Isaac Lab May 16, 2026
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from 7548fe1 to 9de3c5d Compare May 18, 2026 20:39

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR introduces a comprehensive wrapper-side PPISP (Physically Plausible Image Signal Processing) pipeline for the Camera sensor. The implementation converts HDR renderer output to LDR RGBA through a single Warp kernel applying responsivity, exposure, vignetting, color homography, and CRF tonemapping.

Review Status

Commit reviewed: 9de3c5d (squash-rebased, May 18)

Architecture ✅

  • Clean package separation: isaaclab_ppisp is a standalone package with no hard dependencies from isaaclab.sensors.camera
  • Lazy imports: Renderer backends import PPISP on-demand, addressing the maintainer concerns about coupling
  • Consistent integration: All three backends (Isaac RTX, OVRTX, Newton Warp) properly advertise RGB_HDR and compose PpispPipeline

Numerical Stability ✅

  • CRF center clamped: [1e-6, 1-1e-6] prevents division by zero in the piecewise power curve
  • Homography safeguards: Fallback cross products for degenerate cases, epsilon protection in intensity division
  • wp.init() moved: Now at module import time, not per-call

Test Coverage ✅

  • Warp kernel behavior (exposure, responsivity, vignetting, extreme CRF centers)
  • USD shader parsing with time samples
  • Sentinel discovery (AUTO_CAMERA, AUTO_ANY)
  • Renderer output contracts
  • RTX exposure override application
  • End-to-end gaussian rendering (Newton, OVRTX; Isaac RTX skipped pending PhysX fix)

Minor Notes

Severity Item
ℹ️ Info Homography intensity epsilon (1e-5) may produce non-zero output for pure black input - likely intentional for stability
⏳ Pending CI: Installation tests and docs build still running

Verdict

LGTM — Well-architected with proper separation of concerns. Previous review concerns have been addressed. Ready for merge once CI completes.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: Apply PPISP in Camera Wrapper Across Renderers

Review for HEAD commit 2b506f6 (Merge with develop on May 19, 2026)


📋 Summary

This PR introduces a wrapper-side Physically Plausible Image Signal Processing (PPISP) pipeline that converts HDR scene-linear AOV to LDR RGBA across all renderer backends. The architecture is clean with a new isaaclab_ppisp package that maintains separation of concerns.


✅ What Works Well

  1. Clean Architecture: isaaclab.sensors.camera has no direct dependency on PPISP—the ISP cfg flows through to renderers via the loose Any type annotation, and resolution happens in prepare_cameras.

  2. Single Warp Kernel: The ISP pipeline (responsivity → exposure → vignetting → color homography → CRF → uint8 clamp) runs in one kernel per tick, minimizing GPU overhead.

  3. Renderer-Agnostic Design: All three backends (Isaac RTX, OVRTX, Newton Warp) integrate identically via PpispPipeline.apply().

  4. USD Auto-Discovery: CameraISPMode.AUTO_CAMERA and AUTO_ANY provide convenient stage traversal for PPISP shader discovery.

  5. Comprehensive Test Coverage: The synthetic gaussian scene tests validate semantic invariants (vignetting ratio, exposure lift, CRF clamping) rather than brittle pixel-exact comparisons.


🔍 Issues & Recommendations

P2: OVRTX Tonemapping Warning Is Not Actionable

File: source/isaaclab/isaaclab/sensors/camera/camera.py:181-184

# FIXME: settings set_bool is a no-op for ovrtx
# warning only since it affects only ParticleField3DGaussianSplat scene
logger.warning(
    "OVRTX backend with PPISP/HDR requires /rtx/rtpt/gaussian/skipTonemapping/enabled to be false."
)

The warning tells users what is required but not how to fix it. Since the kit-less OVRTX cannot toggle this at runtime, consider:

  • Documenting the pre-launch environment variable or external config required
  • Or adding this to the Known Limitations in the docs (which the PR does mention, but linking the warning to the docs section would help)

P3: Consider Validating data_types Contains RGB/RGBA When ISP Is Set

File: source/isaaclab/isaaclab/sensors/camera/camera_cfg.py

The renderer backends raise clear errors if isp_cfg is set without rgb/rgba in data_types, but this validation happens late (in set_outputs). Adding an early validation in CameraCfg.__post_init__ would provide faster feedback:

if self.isp_cfg is not None and not any(dt in self.data_types for dt in ["rgb", "rgba"]):
    raise ValueError("isp_cfg requires 'rgb' or 'rgba' in data_types")

P3: Changelog Version Update Missing

The checklist indicates: [ ] I have updated the changelog and the corresponding version in the extension's config/extension.toml file

The changelog fragments are present in changelog.d/, but if the extension versions need bumps in extension.toml, this should be verified before merge.


📝 Minor Observations

  1. wp.init() at module load (kernels.py:14) — This is the correct approach for ensuring Warp is ready before kernel compilation, avoiding per-call overhead.

  2. CRF center clamping (kernels.py:88: center = wp.clamp(_sigmoid(center_raw), 1.0e-6, 1.0 - 1.0e-6)) — Good numerical stability fix to avoid division by zero in the CRF curve segments.

  3. HDR scratch buffer allocation — Each renderer correctly allocates internal HDR storage when the user requests ISP but not explicit rgb_hdr output. The pattern is consistent across all three backends.


🏁 Verdict

Approve with minor suggestions. The PPISP integration is well-designed, properly tested, and maintains clean package boundaries. The P3 items are nice-to-have improvements that could be addressed in follow-up PRs.

The PR is ready for merge after CI completes (some checks still pending: Docker builds, installation tests, license check).


🔄 Update for commit a7a75192 (May 20, 2026)

The incremental changes address several important items:

Documentation & Changelogs:

  • ✅ Added comprehensive PPISP documentation in camera.rst covering Post-render Camera ISP pipeline, configuration modes, auto-discovery, and known limitations
  • ✅ Added helpful tips in humanoid imitation learning docs with links to pre-made datasets and checkpoints on Hugging Face
  • ✅ Changelog fragments properly added for all affected packages

Bug Fixes:

  • ✅ apply_external_force_torque now has an early-return fast path when both force_range and torque_range are zero—this restores throughput regression caused by PR #5265
  • ✅ Removed stale @pytest.mark.xfail on Newton environment tests (the cited Hydra issue was resolved in PR #5029)

Build/Install:

  • ✅ isaaclab_ppisp now correctly precedes renderer backends in CORE_ISAACLAB_SUBMODULES install order, ensuring proper dependency resolution

Test Fixes:

  • ✅ Fixed import ordering in test_ray_caster.py and test_ray_caster_patterns.py (imports moved after AppLauncher)

Contributor:

  • Added Nicolas Moenne-Loccoz to CONTRIBUTORS.md

The documentation additions are thorough and address the actionability concern raised in P2—the Known Limitations section now explicitly documents OVRTX tonemapping requirements. The previous review comments remain relevant.

@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch 2 times, most recently from a7a7519 to 8a2eb5e Compare May 20, 2026 11:27
Add the PPISP package and renderer integration for Isaac RTX, Newton Warp, and OVRTX, including RGB_HDR output contract support and synthetic Gaussian coverage.

Update install expectations and clean up optional-renderer tests so missing optional modules are reported as clean skips in CI.
@moennen
moennen force-pushed the nicolasm/ppisp-renderer-simple-integration branch from 8a2eb5e to 17d83fb Compare May 20, 2026 17:13
@kellyguo11
kellyguo11 merged commit 7b293e7 into isaac-sim:develop May 20, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Isaac Lab May 20, 2026
kellyguo11 pushed a commit that referenced this pull request May 29, 2026
…ab_ppisp (#5831)

## 1. Summary

- Unblocks nightly compile job
https://github.com/isaac-sim/IsaacLab/actions/runs/26494922179 by
seeding `source/isaaclab_ppisp/docs/CHANGELOG.rst` with a real `0.1.0`
entry.
- Layered prevention so this class of incident cannot wedge the nightly
again: self-heal in compile (auto-fix the narrow stub shape) + cmd_check
walk (block truly broken shapes at PR time) + per-package isolation in
`cmd_compile` (one bad package no longer kills the batch) + workflow
tolerance (commit/push still runs on partial success).
- 6 files changed: 234 insertions, 6 deletions.

## 2. Background

The `isaaclab_ppisp` package landed via #5499 (directory) + #5748
(CHANGELOG.rst + extension.toml) with the file containing exactly 20
bytes:

```
Changelog
---------
```

The compile-time regex in `Package.write_changelog_entry` requires a
blank line after the underline as an anchor for the prepend:

```python
re.search(r"^Changelog\n-+\s*\n\s*\n", text, re.MULTILINE)
```

The stub satisfies header + underline but not the trailing blank line.
The PR gate only inspected fragment-diff content, so the malformed
target file slipped through. When the next `nicolasm-ppisp-*.minor.rst`
fragments accumulated and the nightly compile tried to prepend, the
regex match failed, `cmd_compile` exited non-zero on the first package
error, and the workflow's commit/push step was skipped under default
`if: success()` — every successfully-compiled package's writes were
discarded with the failing one.

## 3. Changes

### 3.1 Seed entry for `isaaclab_ppisp`

`source/isaaclab_ppisp/docs/CHANGELOG.rst` carries a real `0.1.0
(2026-05-20)` Added section. Pre-commit's end-of-file fixer strips
trailing blank lines, so a content-bearing seed is the only stable shape
— relying on a bare `Changelog\n---------\n\n` would lose the blank line
on the next PR that touches the file.

### 3.2 Single source of truth for the header regex

```python
CHANGELOG_HEADER_RE = re.compile(r"^Changelog\n-+\s*\n\s*\n", re.MULTILINE)
```

Hoisted to module level in `tools/changelog/cli.py`. The producer
(`write_changelog_entry`) and the gate (`cmd_check`) share the same
compiled regex object — drift between gate and compile is structurally
impossible.

### 3.3 Self-healing compile

`write_changelog_entry` now normalizes the file in-memory before the
regex search:

```python
text = re.sub(r"^(Changelog\n-+)\n(?!\n)", r"\1\n\n", text, count=1, flags=re.MULTILINE)
```

Matches "header + dashes + one newline NOT followed by another newline"
and inserts the missing `\n`. Idempotent on well-formed files via the
negative lookahead. The compile writes the normalized text back to disk,
so a malformed file becomes canonical on first compile. The original
ppisp 20-byte stub would have self-healed silently without this PR.

### 3.4 PR-gate header walk

`cmd_check` walks `Package.discover()` and applies the same self-heal
normalization, then asserts `CHANGELOG_HEADER_RE` matches. The narrow
"missing blank line" case passes silently (the system will auto-fix).
Genuinely broken shapes — no `Changelog` line, no underline, wrong
underline char, leading whitespace, misspelled header — fail with an
`::error::` annotation listing the offending file and the seed-template
snippet contributors should copy.

### 3.5 Per-package isolation in `cmd_compile`

The compile loop replaces fail-fast `return 1` with `failures.append +
continue`. A package whose CHANGELOG.rst raises is skipped; the rest of
the batch continues. Exit code is non-zero only if any package failed,
with a summary block naming each failure. Defense-in-depth for failure
modes the PR gate doesn't catch: version mismatch between
`extension.toml` and `pyproject.toml`, filesystem permission errors,
direct pushes bypassing the PR gate, future failure modes added to
`Package.compile`.

### 3.6 Workflow tolerance for partial success

`.github/workflows/nightly-changelog.yml`:

- Compile step gets `continue-on-error: true` and a step id.
- Commit/push step guard changes from `if: ${{ !inputs.dry_run }}` to
`if: ${{ always() && !inputs.dry_run }}`. Successful packages' on-disk
writes are committed and pushed even when compile reported partial
failure.
- Trailing step `if: ${{ steps.compile.outcome == 'failure' }}`
re-asserts non-zero so the job tile stays red and the maintainer is
notified.

### 3.7 Per-PR pytest gate, path-filtered

`.github/workflows/changelog-check.yml` runs `pytest
tools/changelog/test/ -q` only when the PR touches `tools/changelog/**`
(inline `git diff` check, no third-party action). PRs that only add
fragments under `source/<pkg>/changelog.d/` skip the pytest step at zero
overhead.

### 3.8 Regression coverage

Six new tests in `tools/changelog/test/test_validate.py`:

- `test_changelog_header_re_accepts_minimum_stub` — locks the
minimum-valid shape.
- `test_changelog_header_re_rejects_unterminated_stub` — exact 20-byte
ppisp shape rejected by the raw regex.
- `test_every_managed_package_has_parseable_changelog_header` — walks
every managed package on disk, applies self-heal, asserts the regex
matches.
- `test_write_changelog_entry_self_heals_missing_blank_line` — compile
against the 20-byte stub produces a well-formed file.
- `test_write_changelog_entry_self_heal_is_noop_on_well_formed` —
well-formed files are unchanged (idempotence).
- `test_cmd_compile_continues_after_per_package_failure` — one bad
package, one good; good ships, bad is named in the summary, exit code 1.

## 4. Verification

- `pytest tools/changelog/test/` — 89 passed (was 83; +6).
- `./isaaclab.sh -f` — pre-commit clean.
- Self-heal verified: re-introduced the 20-byte stub, ran a synthetic
compile, on-disk file came back canonical with the new entry on top.
- Gate path verified: with a genuinely broken `CHANGELOG.rst` (no header
at all), `cli.py check develop` emits `::error::Malformed CHANGELOG.rst
…`. With the 20-byte self-healable stub, `cli.py check` passes (compile
would auto-fix).
- Per-package isolation verified: synthetic two-package fixture with one
broken, ran `cmd_compile --all`, good package wrote its CHANGELOG.rst
and deleted fragments, bad package was named in the failure summary,
exit 1.

## 5. Out of scope / follow-ups

- Cherry-pick to `release/3.0.0-beta2` (carries the same 20-byte stub).
Follow-up after this lands on develop.

## 6. Test plan

- [x] `pytest tools/changelog/test/` — 89/89 pass.
- [x] `./isaaclab.sh -f` — pre-commit clean.
- [x] Regression verified by reverting the seed.
- [ ] CI green on this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants