Skip to content

Add the Newton OptiX renderer and render Newton cameras with SensorCamera - #9058

Merged
ooctipus merged 9 commits into
isaac-sim:mainfrom
StafaH:feature/newton-optix-renderer
Nov 18, 2026
Merged

ooctipus merged 9 commits into
isaac-sim:mainfrom
StafaH:feature/newton-optix-renderer

Conversation

@StafaH

@StafaH StafaH commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This adds a Newton OptiX camera renderer (presets=newton_optix), which uses RTX hardware ray tracing, and moves the Newton renderer onto Newton's SensorCamera, the only Newton camera with an OptiX backend. It builds on #9057, which bumped Newton to a revision with OptiX support.

  • Install: OptiX is opt-in through a new optix extra (--extra optix), which installs newton[optix]. Default installs are unchanged.
  • Rendering: the Newton backend builds its OptiX scene on first use and refits it once per scene state, shared by every camera. OptiX launches can't be captured in CUDA graphs, so OptiX renders eagerly. Particles and deformable surfaces aren't supported with OptiX yet.
  • Presets: the presets are now newton_warp and newton_optix. newton_renderer still works as a deprecated alias of newton_warp.
  • SensorCamera changes: outputs are still written in place into the camera buffers. Two visible differences come with the switch, and the affected goldens are regenerated:
    • Gaussian splats with Newton Warp are no longer double sRGB-encoded, so they render darker than before.
    • Cloth and soft bodies render in their authored colors instead of white.
  • CI: the kitless rendering job installs OptiX and runs a new OptiX golden test, which fails rather than skips when OptiX is missing.

Performance

Env steps per second from isaaclab benchmark runtime on an RTX PRO 6000 Blackwell. Each run is 200 measured steps after a 50-step warmup, at 4096 envs unless noted. Newton renders rgb, and OVRTX renders simple_shading_full_mdl, its fastest RGB mode. Shadows match across all three renderers.

Scene Camera Newton Warp Newton OptiX OVRTX OptiX vs Warp OptiX vs OVRTX
Franka cabinet 256×256 RGB, shadows 29.6k 127k 74.7k 4.3× 1.7×
Boston Dynamics Spot 256×256 RGB, shadows 47.9k 162k 91.1k 3.4× 1.8×
Unitree G1 on stairs 256×256 RGB, shadows 47.5k 157k 78.9k 3.3× 2.0×
ALOHA clutter (512 envs) 256×256 RGB, shadows 11.3k 24.2k — 2.1× —
Kuka-Allegro lift 64×64 RGB 183k 272k 181k 1.5× 1.5×

Spot, G1 on stairs and ALOHA clutter are render-benchmark scenes added for this comparison; they aren't part of this PR. ALOHA clutter runs at 512 envs because OVRTX host memory grows with every env in that scene, and OVRTX renders every env after the first incorrectly there, so it has no OVRTX number. The gain is largest when rendering is a big share of the step. At 128×128, OptiX's lead over Newton Warp drops to 2.3–3.2×, while its lead over OVRTX holds at 1.6–1.8×.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Validated locally:

  • The kitless Newton rendering goldens pass with Newton Warp, and the new OptiX test matches the same goldens (RGB, depth, normals and segmentation). Breaking the OptiX path makes it fail.
  • With Isaac Sim, the regenerated Kit goldens (franka_cloth, franka_soft and both Gaussian splat scenes) pass.
  • The OVPhysX goldens, renderer contract, OpenCV distortion, Newton manager and ray caster tests pass, as do the preset, Hydra, entrypoint and benchmark tests touched by the rename.
  • warp-optix is installed only with --extra optix, for both source and wheel installs.

@StafaH
StafaH requested a review from a team November 17, 2026 04:53
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request isaac-lab Related to Isaac Lab team infrastructure labels Nov 17, 2026
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes the Newton camera-rendering path used by camera tasks and benchmarks.

The PR appears safe to merge, with a non-blocking gap in automated OptiX coverage.

Findings

  1. P2 CI skips the OptiX test ▶

Summary

Adds Newton OptiX camera rendering and moves Newton cameras to SensorCamera.

  • Newton cameras now render through SensorCamera with Warp or OptiX.
  • Newton deformables now use their authored visual colors.
  • Segmentation uses one flat lookup, and depth replacement accepts any buffer shape.
  • The Newton Warp renderer preset is now named newton_warp.
  • Kamino’s DVI configuration now selects Newton’s SCC solver name.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  C[Camera poses and output buffers] --> R[Newton renderer]
  R --> S[SensorCamera]
  S --> W[Warp: captured rendering]
  S --> O[OptiX: eager rendering]
  W --> B[Camera output buffers]
  O --> B
  M[Newton model and scene state] --> S
Loading

Reviews (1) · Last reviewed commit: "Add the Newton OptiX renderer and render..." · Reviewed by Greptile

stage_variant: str, case: RenderCase, request: pytest.FixtureRequest, monkeypatch: pytest.MonkeyPatch
) -> None:
"""Newton OptiX renders the Newton Warp golden images."""
pytest.importorskip("warp_optix")

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.

P2 CI skips the OptiX test. The rendering CI image does not install the optix extra, and the rendering job adds only the OV packages. This new test therefore skips at importorskip("warp_optix"); the post-merge test list also omits it. Add an RTX GPU run that installs the extra, selects this test, and requires it to run rather than skip. Otherwise, a broken OptiX path can pass CI.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in b7cf0ca: the kitless legacy rendering job (an x86-64 GPU runner) now installs warp-optix~=0.3.0, matching newton[optix], so test_rendering_optix runs on pull requests instead of skipping; it matches the job's -k legacy selection. Its node is also in the rendering-correctness-kitless-legacy post-merge subset, and test_rendering_architecture.py accepts the OptiX variant of the main Newton scene so the subset stays validated.

@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

Needs attention: Design and architecture (1), Scope and over-engineering (1), API (1), Compatibility and deprecation (4), Implementation (1), Style consistency (4). Other reviewed categories look good.

  • PR description: Correct “non-breaking,” distinguish native views from public outputs, and qualify contiguous depth inputs; provide baseline/candidate render timings with revisions, workload command, hardware, backend, environment count, warmup, and metric.
  • Design and architecture: Renderer-local OptiX builds and timestamps duplicate ownership of one shared model; move build, refit, and invalidation into the Newton backend.
  • Scope and over-engineering: Minimal implementation: extend NewtonWarpRenderer, its configuration, NewtonBackend, newton_clone_utils.py, and task presets; resolve deformable colors once and collapse renderer-local acceleration ownership into the backend; no source modules were added. Suggested PR breakdown: 1. Newton pin/SCC adaptation, solver validation; 2. SensorCamera migration, camera contracts and Warp goldens; 3. deformable colors, cloth/soft goldens; 4. OptiX dispatch, packaging and presets, backend goldens and compatibility transitions.
  • API: Raw segmentation get_output views change from advertised int32 to uint32; preserve signed caller views and reinterpret only at the remapping launch.
  • Compatibility and deprecation: Breaking changes: legacy preset constructor keywords, PPISP CLI values, strided depth inputs, and version-one manifest identities lose compatibility; retain old behavior through warned, documented, tested transitions.
  • Implementation: OptiX initialization accepts particles and deformables despite its declared limitations, allowing incomplete images; reject incompatible geometry before allocating renderer resources.
  • Style consistency: The renderer page still counts three backends while introducing OptiX under Warp; make OptiX discoverable and correct the count.
  • Test quality: Test quality looks good.

Significant concerns. Posted 12 inline findings.

Automated review; human maintainers own approval decisions.


if self.cfg.create_default_light:
self.newton_sensor.utils.create_default_light(enable_shadows=self.cfg.enable_shadows)
if optix:

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.

🔴 Critical · Implementation — Reject unsupported OptiX geometry

OptiX builds shape acceleration data even when the model contains particles or deformables it cannot render, producing incomplete images. Reject those scenes before building OptiX resources.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Already rejected before any OptiX resources exist: initialize() constructs SensorCamera(model, backend="optix") first, and Newton raises RuntimeError("The OptiX camera backend does not support particles or deformable surfaces") for such models. The OptiX shapes are built only later, on the first render (now in NewtonBackend.refit_optix, 26b0e9c). Running the Newton golden suite with OptiX shows the deformable scenes failing with that error.

``renderer=newton_renderer``
``renderer=newton_warp``

On RTX GPUs, ``renderer=newton_optix`` traces the same scenes in hardware with OptiX. Install it

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.

🟡 Warning · Style Consistency — List OptiX as a renderer choice

OptiX is introduced inside the Warp card while this page still says there are three rendering backends. Give it a distinct discoverable choice and correct the count.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated in 26b0e9c: the overview now says the Newton renderer ray traces with Warp or, on RTX GPUs, with OptiX (renderer=newton_optix). OptiX is the same Newton renderer with a different ray tracing backend, so it stays on the Newton card with its own renderer=newton_optix choice and install line rather than counting as a fourth backend.

Comment thread examples/sensors/ppisp_camera.py Outdated
type=str,
choices=["newton_renderer", "isaac_rtx"],
default="newton_renderer",
choices=["newton_warp", "isaac_rtx"],

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.

🟡 Warning · Compatibility — Keep the PPISP CLI choice

Argparse rejects the previously accepted --renderer newton_renderer before Hydra's alias applies. Accept and normalize it, with a targeted warning, migration guidance, and coverage for both values.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: --renderer accepts the deprecated newton_renderer again, warns with a FutureWarning naming newton_warp, and normalizes it. The example has no CLI test harness, so the normalization is not covered separately.



def resolve_display_color(stage: Usd.Stage, prim_path: str) -> tuple[float, float, float] | None:
"""Return the sRGB display color of a prim's bound visual material, or ``None`` without one.

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.

🟡 Warning · Style Consistency — Correct the color fallback summary

The summary promises None without a bound material, but the function then returns an authored displayColor. Say None means no resolvable authored color.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the summary now says it returns the prim's sRGB display color, or None when no color is authored.

dim=buf.shape,
inputs=[buf, float(replacement)],
dim=buf.size,
inputs=[buf.flatten(), float(replacement)],

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.

🟡 Warning · Compatibility — Preserve strided depth inputs

The old rank-four kernel indexed Warp views using their strides; flatten() requires contiguous storage. Keep a stride-aware path for previously accepted views alongside arbitrary-rank contiguous handling.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: replace_background_depth_wp is reverted to its original four-dimensional, stride-aware kernel. The renderer passes it a four-dimensional view of its depth buffers instead.

ptr=self._hdr_scratch_wp.ptr, dtype=wp.vec3f, shape=shape, device=self.device, copy=False
)
# Newton clears HDR to black regardless of clear_color. A hit mask preserves dark geometry.
# Newton clears HDR to black, so a hit mask is needed to fill the background without darkening geometry.

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.

🟡 Warning · Style Consistency — Correct the HDR mask rationale

Replacing black pixels with the background would brighten dark geometry, not darken it. Describe the mask as preserving geometry while filling only missed rays.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the comment now says the hit mask fills only missed rays, so dark geometry keeps its color.

self._transform_mapping = self._scene_data_provider.create_mapping(list(self.backend.model.body_label))

self.newton_sensor = newton.sensors.SensorTiledCamera(
cfg = self.cfg

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.

🟡 Warning · Style Consistency — Use the configuration attribute directly

The cfg alias only shortens self.cfg and adds a second name for the same state, contrary to the direct-access guidance. Use self.cfg throughout initialization.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: initialize() uses self.cfg directly.

if not use_graph or backend.device.is_capturing:
if isinstance(self.cfg, NewtonOptixRendererCfg):
# OptiX work cannot be recorded in CUDA graphs.
if self._optix_timestamp != timestamp:

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.

🟡 Warning · Design Architecture — Give OptiX BVH one owner

Renderers sharing a Newton backend each build the model's OptiX shapes and track a separate refit timestamp. Put build, refit, and invalidation beside the backend's existing BVH ownership.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: NewtonBackend.refit_optix(timestamp) sits beside refit_bvh and owns the OptiX shapes: it builds them on first use and refits them once per state timestamp, tracked by optix_refit, which close() resets. Renderers sharing a backend now refit once.

_MISSING = object()
_PHYSICS_BACKEND_NAMES = {"PhysxCfg": "isaacsim_physx", "OvPhysxCfg": "ovphysx"}
_RENDERER_BACKEND_NAMES = {"isaac_rtx": "isaacsim_rtx", "newton_warp": "newton_renderer"}
_RENDERER_BACKEND_NAMES = {"isaac_rtx": "isaacsim_rtx"}

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.

🟡 Warning · Compatibility — Preserve version-one renderer identity

Removing this normalization changes Newton Warp's serialized run-manifest token from newton_renderer to newton_warp without changing the manifest version. Preserve the old token until a documented, warned, tested schema transition.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the newton_warp -> newton_renderer mapping is restored, so run manifests keep the version-one token; newton_renderer still resolves through the preset alias.

ovrtx: OVRTXRendererCfg = OVRTXRendererCfg()
isaacsim_rtx: IsaacRtxRendererCfg = IsaacRtxRendererCfg()
newton_renderer: NewtonWarpRendererCfg = NewtonWarpRendererCfg()
newton_warp: NewtonWarpRendererCfg = NewtonWarpRendererCfg()

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.

🟡 Warning · Compatibility — Preserve Python preset construction

MultiBackendRendererCfg(newton_renderer=...) no longer accepts the old field; Hydra's string alias cannot bridge constructor keywords. Keep the old customization functional through a warned, documented, tested deprecation transition.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This follows the existing preset-rename precedent (ovrtx_renderer -> ovrtx, isaacsim_rtx_renderer -> isaacsim_rtx): the deprecated name is kept through _LEGACY_PRESET_ALIASES, which covers the renderer=newton_renderer CLI selection and attribute access (cfg.newton_renderer), both with a FutureWarning. Keeping newton_renderer as a constructor field is not possible without it becoming a selectable preset of its own, since every public PresetCfg field is an alternative; the earlier renames made the same trade-off.

@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

Needs attention: Design and architecture (1), Compatibility and deprecation (4), Style consistency (3), Test quality (1). Other reviewed categories look good.

  • PR description: Replace “non-breaking” with documented compatibility changes; clarify native views versus public buffers, and provide Warp baseline/candidate latency measurements identifying revisions, command/workload, hardware, backend, environment count, outputs, and warmup.
  • Design and architecture: OptiX builds and refit timestamps are renderer-local despite sharing backend.model; move both to the existing backend BVH owner to prevent duplicate construction and refits.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: Breaking changes: PPISP rejects the old CLI choice, depth flattening excludes strided buffers, segmentation excludes int32 destinations, and run.json changes its renderer token; preserve these contracts through documented, tested transitions.
  • Implementation: Implementation looks good.
  • Style consistency: Initialization introduces cfg solely to abbreviate self.cfg, contrary to trusted direct-attribute guidance; remove the alias.
  • Test quality: The Newton pin test checks only the non-OptiX override, allowing the OptiX revision to drift unnoticed; assert both branches against the locked commit.

Significant concerns. Posted 9 inline findings.

Automated review; human maintainers own approval decisions.

``renderer=newton_renderer``
``renderer=newton_warp``

On RTX GPUs, ``renderer=newton_optix`` traces the same scenes in hardware with OptiX. Install it

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.

🟡 Warning · Style Consistency — Update the renderer overview

The new OptiX choice makes the page’s unchanged “three rendering backends” statement inaccurate. Update the overview to account for OptiX.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated in 26b0e9c: the overview now says the Newton renderer ray traces with Warp or, on RTX GPUs, with OptiX (renderer=newton_optix).

Comment thread examples/sensors/ppisp_camera.py Outdated
type=str,
choices=["newton_renderer", "isaac_rtx"],
default="newton_renderer",
choices=["newton_warp", "isaac_rtx"],

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.

🟡 Warning · Compatibility — Accept the previous CLI choice

The previously accepted --renderer newton_renderer now fails argparse validation; Hydra aliases do not reach this script. Accept and normalize it with a targeted FutureWarning, migration guidance, and transition coverage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: --renderer newton_renderer is accepted, emits a FutureWarning pointing to newton_warp, and is normalized before use.



def resolve_display_color(stage: Usd.Stage, prim_path: str) -> tuple[float, float, float] | None:
"""Return the sRGB display color of a prim's bound visual material, or ``None`` without one.

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.

🟡 Warning · Style Consistency — Correct the color fallback description

The summary promises None without a bound material, but the function returns an authored displayColor in that case. Say None means no resolvable color.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the summary now says None means no color is authored.

dim=buf.shape,
inputs=[buf, float(replacement)],
dim=buf.size,
inputs=[buf.flatten(), float(replacement)],

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.

🟡 Warning · Compatibility — Preserve strided depth views

The former four-dimensional kernel indexed strided Warp views; flatten() requires contiguous storage, so accepted sliced buffers stop updating. Retain a stride-aware path and validate both layouts.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the helper is unchanged from main, so strided views keep working; the renderer reshapes its contiguous (N, H, W) depth buffers to (N, H, W, 1) when calling it.

newton_spec = f"newton[sim] @ git+https://github.com/newton-physics/newton.git@{commit}"
assert newton_spec in dependencies
assert newton_spec in overrides
assert f"{newton_spec} ; extra != 'optix'" in overrides

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.

🟡 Warning · Test Quality — Check both Newton override branches

The pin test checks only the non-OptiX override. The new OptiX branch can drift from the locked commit while it passes. Assert that branch against the same commit.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the test also asserts the newton[sim,optix] @ ...@<locked commit> ; extra == 'optix' override, so both branches must match the locked revision.

self._transform_mapping = self._scene_data_provider.create_mapping(list(self.backend.model.body_label))

self.newton_sensor = newton.sensors.SensorTiledCamera(
cfg = self.cfg

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.

🟡 Warning · Style Consistency — Remove the configuration alias

cfg only abbreviates self.cfg throughout initialization, contrary to the contribution guide’s direct-attribute rule. Use self.cfg directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: the alias is gone; initialize() reads self.cfg.

if isinstance(self.cfg, NewtonOptixRendererCfg):
# OptiX work cannot be recorded in CUDA graphs.
if self._optix_timestamp != timestamp:
backend.model.bvh_refit_shapes(backend.state_0, backend="optix")

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.

🟡 Warning · Design Architecture — Centralize OptiX BVH ownership

Renderer instances share backend.model but each builds its OptiX BVH and caches refits separately. Move build and publication-based refit tracking to the existing backend BVH owner.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: OptiX build and publication-based refit tracking moved to NewtonBackend.refit_optix, next to the existing BVH refit cache.

_remap_shape_index,
shape_index.size,
[shape_index.flatten(), table, miss, unlabelled],
[out_view.flatten()],

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.

🟡 Warning · Compatibility — Keep int32 destinations accepted

Raw segmentation destinations previously accepted int32, but the new kernel requires uint32. Reinterpret compatible int32 destinations inside the converter and retain coverage for both forms.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: raw ids are bound as int32 views, and the converter reinterprets the destination as uint32 only for the launch, so both int32 and uint32 destinations work.

_MISSING = object()
_PHYSICS_BACKEND_NAMES = {"PhysxCfg": "isaacsim_physx", "OvPhysxCfg": "ovphysx"}
_RENDERER_BACKEND_NAMES = {"isaac_rtx": "isaacsim_rtx", "newton_warp": "newton_renderer"}
_RENDERER_BACKEND_NAMES = {"isaac_rtx": "isaacsim_rtx"}

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.

🟡 Warning · Compatibility — Bridge the serialized renderer token

Removing the mapping changes Newton Warp’s run.json renderer token from newton_renderer to newton_warp without a schema transition. Preserve the old serialized contract until migration is documented and tested.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 26b0e9c: run.json keeps recording the Newton Warp renderer as newton_renderer, and the run-summary test expectations are unchanged from main.

…mera

The Newton renderer now renders through Newton's SensorCamera instead of the deprecated SensorTiledCamera, which is required for Newton's OptiX backend. Its outputs are (view, height, width) arrays written in place into the camera buffers, as before.

NewtonOptixRendererCfg selects OptiX hardware ray tracing. It builds the model's OptiX shapes once and refits them once per scene state; OptiX work cannot be recorded in CUDA graphs, so it renders eagerly. The optix extra installs newton[optix], and the Newton override keeps that extra when it is requested. A golden-image test renders the main Newton scene with OptiX against the Newton Warp goldens.

SensorCamera colors deformable surfaces, so the Newton cloner passes each deformable's bound visual material color to Newton; cloth and soft bodies render in their authored colors instead of white, and their two goldens are regenerated.

The renderer presets are newton_warp and newton_optix, and newton_renderer is a deprecated alias of newton_warp. The segmentation remap is one lookup kernel over flat arrays, and replace_background_depth_wp accepts depth buffers of any shape.
The kitless legacy rendering job now installs warp-optix, matching newton[optix], so test_rendering_optix runs on pull requests instead of skipping, and post-merge CI runs it through the rendering subset. The rendering inventory test accepts the OptiX variant of the main Newton scene.
- The Newton backend owns the OptiX shapes like its BVH: refit_optix builds them on first use and refits them once per state timestamp, so renderers sharing a backend refit once.
- Raw segmentation outputs keep their int32 views; only the remap launch reinterprets them as uint32.
- replace_background_depth_wp is unchanged, so strided views keep working; the renderer passes it a four-dimensional view of its depth buffers.
- Run manifests keep recording the Newton Warp renderer as newton_renderer.
- The PPISP example accepts the deprecated --renderer newton_renderer with a FutureWarning.
- Each deformable's display color is resolved once for all builders that own it.
- The pin test checks both Newton override lines, and the renderer overview, color helper docstring, and HDR comment are corrected.
Drop comments that restate the code and shorten the new docstrings to their essentials.
@StafaH
StafaH force-pushed the feature/newton-optix-renderer branch from 513494a to debcbd6 Compare November 17, 2026 07:17
@StafaH

StafaH commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 17, 2026

@maxkra15 maxkra15 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.

CI still skips the OptiX test because pyoptix is missing from the test environment. Can we install it there and make the job fail if the test skips?

The Kit render job also has five golden failures, including both Gaussian splat scenes. Can we check those before merging?

…renderer

# Conflicts:
#	pyproject.toml
#	tools/wheel_builder/uv-overrides.txt
#	uv.lock


@configclass
class NewtonOptixRendererCfg(NewtonWarpRendererCfg):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not have render_type in NewtonWarpRendererCfg be literal["newton_optix", "newton_warp"] then instead of creating a new class just to override renderer_type

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was intentional since optix will get some additional config fields later

CI installed pyoptix only as a dependency in the user site, which the venv
does not see, so warp_optix failed to import and the test skipped. Name
pyoptix in the --no-deps overlay, and set ISAACLAB_TEST_REQUIRE_OPTIX on the
kitless legacy rendering job so a missing OptiX install fails the job.
@StafaH

StafaH commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 18, 2026
@StafaH

StafaH commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 18, 2026
Cloth and soft bodies now render in their authored colors, and SensorCamera
decodes sRGB Gaussian splat colors before shading, so splats are no longer
brightened by a second sRGB encode.
@ooctipus

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 18, 2026
@StafaH

StafaH commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 18, 2026
@ooctipus
ooctipus merged commit 94f35e6 into isaac-sim:main Nov 18, 2026
106 of 159 checks passed
@ooctipus
ooctipus deleted the feature/newton-optix-renderer branch November 18, 2026 07:01
kellyguo11 pushed a commit that referenced this pull request Nov 19, 2026
## Description

Follow-up to #9058. It documents `newton_optix` and makes the renderer
selectable wherever tasks expose renderer presets.

Tasks that use `MultiBackendRendererCfg` already pick up `newton_optix`,
because #9058 added it there. This PR covers the remaining gaps.

**Docs**
- Renderer concepts page: adds a Newton OptiX dropdown covering the
install extra, supported platforms, the same outputs as Newton Warp, no
particles/deformables/Gaussians, and that `use_cuda_graph` is ignored.
- Adds `newton_optix` to:
- the renderer preset tables in `backends_and_presets.rst` and
`hydra.rst`;
- the renderer choice table in `configure_rendering.rst` and the how-to
index;
  - the camera output matrix and the PPISP note;
  - the scene data provider table and the Vulkan known issue;
  - the API reference (`NewtonOptixRendererCfg`).
- Adds the `optix` extra to the installation extras table.

**Environment browser**
- Regenerated with `tools/update_environments_rst.py`. Camera tasks now
list `newton_optix`.
- The regeneration also refreshes rows that were stale on `main`: new
tasks, the `newton_renderer` → `newton_warp` rename, and
`Isaac-Velocity-Rough-G1` now listing only `rsl_rl`, which matches its
registration.
- Command builder:
- Selecting `newton_optix` adds `--extra optix` and shows a short hint
that it needs an RTX GPU and a recent driver.
- The preferred Newton renderer is now `newton_warp`. Before this it
still pointed at the removed `newton_renderer` name.
  - Card chips now show Warp/OptiX.
- Benchmark snapshots that record `newton_renderer` are normalized to
`newton_warp`, so Newton benchmark bars still render.

**Tasks**
- The render benchmark camera gets
`newton_optix=NewtonOptixRendererCfg(enable_shadows=True)`, matching its
Warp override. The microduck warehouse demo gets the same treatment.
- The Soft and Cloth Franka lift camera tasks now reject
`renderer=newton_optix` at config validation.
- Before this, the command builder offered it, and it then failed at
runtime with `The OptiX camera backend does not support particles or
deformable surfaces`.
- The Cable task renders correctly with OptiX, so it stays allowed. I
checked this by comparing its frames against Newton Warp.

The hint does not pin a minimum driver version. If OptiX 9.1 needs a
specific minimum driver, it can be added there.

## Type of change

- Documentation update
- Bug fix (non-breaking change which fixes an issue)

## Test plan

- `uv run python tools/update_environments_rst.py --check`
- `pytest` for `test_render_benchmark_cfg.py`, `test_preset_cli.py`,
`test_hydra.py`, `test_cartpole_camera_presets.py` and
`test_shadow_hand_camera_presets.py`: 137 passed.
- `is_task_run_launchable`: OptiX is rejected for Soft and Cloth. It is
accepted for Cable, Cartpole-Camera and KukaAllegro-Camera.
- Clean docs build: `sphinx -W --keep-going -E` succeeded.
- Headless Chrome on the built environments page:
- the hint shows only for `newton_optix`, and `--extra optix` is added
to the command;
  - no physics choice auto-selects OptiX;
  - Newton benchmark bars render;
  - no page errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
StafaH pushed a commit that referenced this pull request Dec 1, 2026
# Description

`renderer=newton_optix` needs `warp-optix` and `pyoptix`, which only the
`optix` extra installs (#9058 made it opt-in). Neither container image
selects that extra, so `newton_optix` fails in the published images.
Image `latest-main-892354c2` has no `warp_optix`. In its runs on OSMO,
all 225 `newton_optix` runs on rigid-body camera tasks (Cartpole-Camera,
Cube-Shadow-Camera and KukaAllegro Lift and Reorient, both manager-based
and Direct, with every physics backend) fail before training:

```
ModuleNotFoundError: No module named 'warp_optix'
...
RuntimeError: The OptiX camera backend requires the newton[optix] extra
```

This PR:

- **Base image.** Adds `--extra optix` to the base image's
`IMAGE_EXTRAS`, next to `ov` and `fovi`.
- **Kitless image.** Adds it to the kitless image's `uv sync`. Both
packages are marked x86-64 and Windows only, so the arm64 kitless image
is unchanged.
- **Docs.** Documents in the Newton OptiX renderer section that the
x86-64 images include it (the arm64 kit-less image does not), and that
OptiX 9.1 needs a 590-series or newer NVIDIA driver. With an older
driver the import fails with `ImportError: Unsupported ABI version`.

The lockfile already contains both packages, so `uv sync --frozen` needs
no lock change. `uv export --frozen` with each image's extras now yields
`pyoptix==9.1.1` and `warp-optix==0.3.0` for x86-64 Linux; on `main` it
yields neither.

**Validation.** Image `latest-main-892354c2` on L40s. Cartpole-Camera,
`physics=newton_mjwarp renderer=newton_optix presets=theia_tiny`,
rsl_rl, 5 iterations:

| | Driver 580.95 | Driver 595.58 |
|---|---|---|
| Image as is | `requires the newton[optix] extra`, exit 1 | same, exit
1 |
| + `warp-optix==0.3.0 pyoptix==9.1.1` (the locked versions,
`--no-deps`) | `ImportError: Unsupported ABI version`, exit 1 | trains
5/5, exit 0 |

- `docker/test` contract tests: 43 passed, 4 skipped. `test_docker.py`,
which builds images, was not run.
- No changelog fragment: the change touches no package under `source/`.
- **Not done here:** an image build. CI's docker-license-check scans the
built image. `warp-optix` declares `Apache-2.0 AND BSD-3-Clause AND
LicenseRef-NVIDIA-OptiX`, which the substring rule accepts. Please
confirm the NVIDIA OptiX license term is fine for the distributed
images.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (no package
touched)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: fanes <[email protected]>
StafaH added a commit that referenced this pull request Dec 4, 2026
… Quickstart (#9387)

# Description

The tutorial notebooks were hard to find, and both of them failed on
current `main`. This PR:

- **Makes the notebooks discoverable:** adds a short "Notebooks" section
to the README and a pointer in the Quickstart "Next steps".
- **Makes local Jupyter the primary path:** section 1 of each notebook
now starts with a single `uv run ... jupyter lab notebooks/` command run
from the repo root. Colab instructions remain as a "Using this notebook
in Google Colab:" aside. The free-tier Colab GPU cannot run these
notebooks.
- **Guards the install cell:** it now does nothing outside Colab, so
"Run All" locally no longer reinstalls torch over a checkout. In Colab
it now installs from `main` instead of `release/3.0.0`, so the installed
code matches the notebook.
- **Updates the notebooks to the current `main` APIs:**
- Removed RSL-RL helpers `check_rsl_rl_version` and
`handle_deprecated_rsl_rl_cfg` (#7784). `create_rsl_rl_runner` is now
imported from `isaaclab_rl.entrypoints.backends.runner_rsl_rl`.
  - Removed `VBDSolverCfg.rigid_compliant_alm` (#9057).
  - Renamed renderer preset `newton_renderer` to `newton_warp` (#9058).
- rsl-rl 6 logger buffers: `step_buffers["Training/mean_reward"]` and
`length_buffer`.

Fixes the reported errors:
- `ImportError: cannot import name 'check_rsl_rl_version'` in
`training.ipynb`
- `TypeError: VBDSolverCfg.__init__() got an unexpected keyword argument
'rigid_compliant_alm'` in `explore.ipynb`
- Notebooks on `main` installing Isaac Lab from `release/3.0.0` (they
now install from `main`; switch to the PyPI wheel once 3.1 is released)

Validation:
- Executed both notebooks end to end with `jupyter nbconvert --execute`,
using the documented launch environment on an RTX PRO 6000.
  - Every section renders its video.
- Training converges: mean reward reaches about 26, episodes run the
full 12 s, and velocity error is about 0.08 m/s.
- The Colab install line resolves against `main` (`uv pip install
--dry-run`). A full Colab run has not been done.

No changelog fragment is needed, since nothing under `source/` changes.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Release backport

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `main`

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md)
to any test changes
- [ ] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump package versions — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
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 enhancement New feature or request infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants