Repository navigation
Conversation
[Medium impact] Fixes frame handling in the Newton RTX visualizer. The PR appears safe to merge, with a non-blocking request for focused regression tests. Findings
SummaryUpdates the Newton RTX adapter to present additional DLSS images and capture the latest returned image.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Returned render products] --> B[Collect color images]
B --> C{Intermediate image?}
C -->|Yes| D{Window shown and no fullscreen image?}
D -->|No| E[Skip intermediate image]
D -->|Yes| F[Blit and present image]
F --> G[Restore prepared UI state]
C -->|No| H[Copy or blit latest image]
H --> I[Native final presentation]
A --> J[Capture searches frames in reverse order]
Reviews (1) · Last reviewed commit: "Fix dropped DLSS frames in the Newton RT..." · Reviewed by Greptile |
| if intermediate: | ||
| frame = self._displayed_frame | ||
| prepared = self.gui is not None and self.gui._frame_prepared | ||
| self._present(frame.texture or None, frame.width, frame.height) | ||
| if self.gui is not None: | ||
| # Reuse the prepared UI without processing buttons again. The native | ||
| # prepare_frame counts the final presentation; count this extra one. | ||
| self.gui._frame_prepared = prepared | ||
| self.gui._update_fps() |
There was a problem hiding this comment.
Multi-image behavior lacks regression tests
The existing RTX tests check motion, pause, and markers, but do not count presentations or check which returned image is captured. They can pass even if this fix stops working.
Add focused tests for _accept_render and get_frame using distinct fake images. Check that every image reaches the window, capture returns the last image, and intermediate presentations reuse prepared UI data.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2). Other reviewed categories look good.
- PR description: Qualify “Present each returned image” as windowed, non-fullscreen LdrColor output, add exact commands and base/head revisions to the performance evidence, and trim only the duplicated scope sentence from Merge notes.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The new _accept_render override leaves products untyped, and get_frame omits latest-frame selection; annotate the override and document the changed multi-image capture contract.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 2 inline findings.
Automated review; human maintainers own approval decisions.
| @@ -362,6 +362,48 @@ def _init_window(self) -> None: | |||
| super()._init_window() | |||
| self._patch_viewer_panel() | |||
|
|
|||
| def _accept_render(self, products) -> None: | |||
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Untyped products parameter
products carries no type hint while adjacent methods such as get_frame annotate every argument. Annotate the render-product mapping type, under a TYPE_CHECKING guard if the ovrtx import must stay runtime-only.
| @@ -377,7 +419,7 @@ def get_frame(self, target_image: wp.array | None = None) -> wp.array: | |||
| if products is None: | |||
| raise RuntimeError("Perspective capture requires a completed Newton RTX frame.") | |||
| for product in products.values(): | |||
| for frame in product.frames: | |||
| for frame in reversed(product.frames): | |||
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Stale get_frame docstring
Frame iteration now reverses so the latest image is captured, but the docstring still says only "the completed RTX image". State that the most recent frame is selected when a render returns multiple images.
bf786dd to
3b3b4c0
Compare
|
Closing as superseded by #8585, which replaced the Newton This does not establish that DLSS multi-image handling is fixed in the replacement pipeline: |
|
Follow-up investigation against the current OVRTX camera pipeline: #8881. The documented multi-frame API and current |
…mes (#8882) # Description When DLSS frame generation returns an intermediate image before the real camera capture, OVRTX readback currently publishes the first image and discards the real one. Select the frame with the latest capture end time before extracting any camera outputs or running PPISP. Keep the direct single-frame path and the existing validation for missing products/frames. Extend the existing renderer contracts to verify real capture pixels, other requested outputs, and matching asynchronous capture metadata, including an output list whose newest frame is neither first nor last. Add the `isaaclab_ov` changelog fragment. No dependency or public API changes. Fixes #8881. Follows #8583, whose original adapter was removed by #8585. ## Visual comparison **Scene:** An orange cube moves sideways against a plain grey background, viewed straight on from a fixed camera. The cube appears nearly square because one face points toward the camera. The top row shows the full frames; the bottom row enlarges the blue-box region. The right column shows the pixel-difference heatmap. Recorded native images from the same DLSS-enabled render request: **before** is the intermediate image selected by `frames[0]`; **after** is the latest real capture selected by this fix, 8.33 ms newer. The lower row enlarges identical bounds. The heatmap shows the maximum absolute RGB channel difference per pixel on a fixed 0–80 scale.  At frame 2, 129,036 RGB channel values differ before the fix (maximum error 78/255). The fixed output has **zero pixel differences** from the generation-disabled control. These are recorded pixels; the image panels use nearest-neighbor display. <details> <summary>Second recorded capture: frame 15</summary>  At frame 15, the selected capture changes from 258.33 ms to 266.67 ms. The baseline differs in 87,969 RGB channel values (maximum error 79/255); the fixed output again exactly matches the control. </details> ## Validation - Existing regression assertions failed before the fix: wrong intermediate RGB values in delayed observations and actual CPU extraction. They pass after the fix. - Full renderer contract file: **53 passed**, including all five GPU integration cases: ```bash uv run python -m pytest -q source/isaaclab_ov/test/test_ovrtx_renderer_contract.py ``` Validation used a separate uv environment with verified imports from this worktree and pinned OVRTX `0.6.0.1791947691`, OVStage `0.3.0.1791986420`, and Warp `1.17.0`. Torch deprecation warnings and native runtime warnings were observed. - Repository formatting/lint (`uv run isaaclab -f`), changelog validation, and `git diff --check` passed. Independent review found no blocking issues. - Native reproduction used a moving cube at 1280×720, 60 Hz, on RTX 5090 / driver `610.57.04`. With generation disabled, all 16 steps returned one frame; enabled, all 16 returned two: an earlier intermediate followed by the real capture. - Replaying the unchanged baseline/fixed readback methods against those native timestamps and saved pixels showed: | Saved step | Baseline capture delay | Baseline differing RGBA channel values | Fixed differing values | | --- | ---: | ---: | ---: | | 2 | 8.33 ms | 129,036 | 0 | | 15 | 8.33 ms | 87,969 | 0 | At both saved steps, fixed output exactly matched the generation-disabled control. Successful native activation used an LDR-only render product together with explicit settings schemas, `limitedOps=false`, inverse-compositing settings, and a RenderSettings product relationship; the required companion setting was not isolated. The synthetic missing-AOV case is test coverage, not a native observation. This change selects the correct single camera observation. Presenting every generated image at a higher window cadence is separate work. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks with `uv run isaaclab --format`. - [x] I have documented the changed behavior in the package changelog. - [ ] My changes generate no new warnings (dependency/runtime warnings observed as described above). - [x] I have validated the changed behavior and applied the test-audit criteria to the test changes. - [x] I have added a changelog fragment for every touched source package. - [x] My name already exists in `CONTRIBUTORS.md`.
Summary
With DLSS frame generation enabled, Newton RTX can return multiple images per render request. The current acceptance path stops after the first image, dropping subsequent images and reducing the presentation rate.
For windowed, non-fullscreen LdrColor output, present each returned image and reuse prepared UI draw data for intermediate presentations. Retain the latest color image for capture; headless and fullscreen sensor-view paths skip intermediate presentations. Include an
isaaclab_visualizerschangelog fragment. No dependency changes are required.Test plan
At
bf786dd8e:49/49 passed. The multi-image regression uses three distinct images, checks intermediate presentation order and reuse of prepared UI state, and verifies that capture owns the latest image. Reverting capture to the first image makes the regression fail. Full repository formatting/lint and changelog checks passed; tests emitted dependency deprecation warnings.
Fresh measurements used stock core velocity tasks on an RTX 5090, one environment, zero actions, 1920×1080, asynchronous rendering, VSync disabled, and DLSS frame generation enabled. Each run used 200 warm-up environment steps followed by a 20-second measurement.
Isaac-Velocity-Flat-G1Isaac-Velocity-Rough-G1Both runs used
bf786dd8eand locked Newton71eeba16a717d4dcf0b9dd7056a7b6f863054dc3. The baseline selected Newton's inherited_accept_render, the presentation path used at basead3631474; the candidate selected this PR's override. This isolates the presentation change without changing physics or dependencies.The baseline presented 557/1114 returned images in each task. The fix presented 1116/1116 (flat) and 1110/1110 (rough). FPS counts window presentations; it does not measure physics acceleration. The flat zero-action robot emitted stock MJWarp contact-capacity warnings; runtime/dependency warnings and rough-run asset-cleanup warnings were also observed.
Reproduce the presentation benchmark
Save the following as
/tmp/benchmark-dlss-review.py:From this branch, with the
rsl-rlandovrtxextras installed and a window display available:Depends on / setup
isaac-sim/IsaacLabdevelopjnskkmhr/IsaacLabjnskkmhr/PR_DLSS_frame_dropisaac-sim/IsaacLabType of change
Release backport
developChecklist
uv run isaaclab --format.CONTRIBUTORS.md.Merge notes
Targets
develop. The underlying first-image-only acceptance behavior is in Newton; this adapter override may be removable once an equivalent upstream fix is adopted.