Commit 5806bd6e authored by rwiltz's avatar rwiltz Committed by Kelly Guo

Sets rendering mode for xr if xr is used (#318)

XR rendering requires DLSS RR to reduce the noise of visualization. This
PR:
-Adds xr rendering mode.
-Makes xr rendering mode the default unless explicitly set if xr is
enabled

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent f18fcaff
rtx.translucency.enabled = true
rtx.reflections.enabled = true
rtx.reflections.denoiser.enabled = true
rtx.directLighting.sampledLighting.denoisingTechnique = 5
rtx.directLighting.sampledLighting.enabled = true
rtx.sceneDb.ambientLightIntensity = 1.0
rtx.shadows.enabled = true
rtx.indirectDiffuse.enabled = true
rtx.indirectDiffuse.denoiser.enabled = true
rtx.domeLight.upperLowerStrategy = 4
rtx.ambientOcclusion.enabled = true
rtx.ambientOcclusion.denoiserMode = 0
rtx.raytracing.subpixel.mode = 1
rtx.raytracing.cached.enabled = true
# DLSS frame gen does not yet support tiled camera well
rtx-transient.dlssg.enabled = false
rtx-transient.dldenoiser.enabled = true
# Set the DLSS model
rtx.post.dlss.execMode = 2 # can be 0 (Performance), 1 (Balanced), 2 (Quality), or 3 (Auto)
# Avoids replicator warning
rtx.pathtracing.maxSamplesPerLaunch = 1000000
# Avoids silent trimming of tiles
rtx.viewTile.limit = 1000000
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.36.12" version = "0.36.13"
# Description # Description
title = "Isaac Lab framework for Robot Learning" title = "Isaac Lab framework for Robot Learning"
......
Changelog Changelog
--------- ---------
0.36.12 (2025-04-09) 0.36.13 (2025-04-09)
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Changed Changed
...@@ -12,7 +12,7 @@ Changed ...@@ -12,7 +12,7 @@ Changed
the cuda device, which results in NCCL errors on distributed setups. the cuda device, which results in NCCL errors on distributed setups.
0.36.11 (2025-04-01) 0.36.12 (2025-04-01)
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Fixed Fixed
...@@ -21,7 +21,7 @@ Fixed ...@@ -21,7 +21,7 @@ Fixed
* Added check in RecorderManager to ensure that the success indicator is only set if the termination manager is present. * Added check in RecorderManager to ensure that the success indicator is only set if the termination manager is present.
0.36.10 (2025-03-24) 0.36.11 (2025-03-24)
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Changed Changed
...@@ -31,8 +31,8 @@ Changed ...@@ -31,8 +31,8 @@ Changed
the default settings will be used from the experience files and the double definition is removed. the default settings will be used from the experience files and the double definition is removed.
0.36.9 (2025-03-17) 0.36.10 (2025-03-17)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Fixed Fixed
^^^^^ ^^^^^
...@@ -41,6 +41,15 @@ Fixed ...@@ -41,6 +41,15 @@ Fixed
:attr:`effort_limit` is set. :attr:`effort_limit` is set.
0.36.9 (2025-03-18)
~~~~~~~~~~~~~~~~~~~
Added
^^^^^^^
* Xr rendering mode, which is default when xr is used.
0.36.8 (2025-03-17) 0.36.8 (2025-03-17)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
......
...@@ -316,11 +316,12 @@ class AppLauncher: ...@@ -316,11 +316,12 @@ class AppLauncher:
arg_group.add_argument( arg_group.add_argument(
"--rendering_mode", "--rendering_mode",
type=str, type=str,
action=ExplicitAction,
default="balanced", default="balanced",
choices={"performance", "balanced", "quality"}, choices={"performance", "balanced", "quality", "xr"},
help=( help=(
"Sets the rendering mode. Preset settings files can be found in apps/rendering_modes." "Sets the rendering mode. Preset settings files can be found in apps/rendering_modes."
' Can be "performance", "balanced", or "quality".' ' Can be "performance", "balanced", "quality", or "xr".'
" Individual settings can be overwritten by using the RenderCfg class." " Individual settings can be overwritten by using the RenderCfg class."
), ),
) )
...@@ -351,6 +352,7 @@ class AppLauncher: ...@@ -351,6 +352,7 @@ class AppLauncher:
"xr": ([bool], False), "xr": ([bool], False),
"device": ([str], "cuda:0"), "device": ([str], "cuda:0"),
"experience": ([str], ""), "experience": ([str], ""),
"rendering_mode": ([str], "balanced"),
} }
"""A dictionary of arguments added manually by the :meth:`AppLauncher.add_app_launcher_args` method. """A dictionary of arguments added manually by the :meth:`AppLauncher.add_app_launcher_args` method.
...@@ -847,6 +849,11 @@ class AppLauncher: ...@@ -847,6 +849,11 @@ class AppLauncher:
rendering_mode = launcher_args.get("rendering_mode", "balanced") rendering_mode = launcher_args.get("rendering_mode", "balanced")
rendering_mode_explicitly_passed = launcher_args.pop("rendering_mode_explicit", False)
if self._xr and not rendering_mode_explicitly_passed:
# If no rendering mode is specified, default to the xr mode if we are running in XR
rendering_mode = "xr"
# parse preset file # parse preset file
repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..") repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..")
preset_filename = os.path.join(repo_path, f"apps/rendering_modes/{rendering_mode}.kit") preset_filename = os.path.join(repo_path, f"apps/rendering_modes/{rendering_mode}.kit")
......
...@@ -248,7 +248,7 @@ class RenderCfg: ...@@ -248,7 +248,7 @@ class RenderCfg:
rtx.translucency.enabled: False # .kit rtx.translucency.enabled: False # .kit
rtx_translucency_enabled: False # python""" rtx_translucency_enabled: False # python"""
rendering_mode: Literal["performance", "balanced", "quality"] | None = None rendering_mode: Literal["performance", "balanced", "quality", "xr"] | None = None
"""Sets the rendering mode. Behaves the same as the CLI arg '--rendering_mode'""" """Sets the rendering mode. Behaves the same as the CLI arg '--rendering_mode'"""
......
...@@ -291,7 +291,7 @@ class SimulationContext(_SimulationContext): ...@@ -291,7 +291,7 @@ class SimulationContext(_SimulationContext):
rendering_mode = self.cfg.render.rendering_mode rendering_mode = self.cfg.render.rendering_mode
if rendering_mode is not None: if rendering_mode is not None:
# check if preset is supported # check if preset is supported
supported_rendering_modes = ["performance", "balanced", "quality"] supported_rendering_modes = ["performance", "balanced", "quality", "xr"]
if rendering_mode not in supported_rendering_modes: if rendering_mode not in supported_rendering_modes:
raise ValueError( raise ValueError(
f"RenderCfg rendering mode '{rendering_mode}' not in supported modes {supported_rendering_modes}." f"RenderCfg rendering mode '{rendering_mode}' not in supported modes {supported_rendering_modes}."
......
...@@ -172,7 +172,7 @@ class TestSimulationRenderConfig(unittest.TestCase): ...@@ -172,7 +172,7 @@ class TestSimulationRenderConfig(unittest.TestCase):
# user-friendly setting overrides # user-friendly setting overrides
dlss_mode = ("/rtx/post/dlss/execMode", 5) dlss_mode = ("/rtx/post/dlss/execMode", 5)
rendering_modes = ["performance", "balanced", "quality"] rendering_modes = ["performance", "balanced", "quality", "xr"]
for rendering_mode in rendering_modes: for rendering_mode in rendering_modes:
# grab groundtruth preset settings # grab groundtruth preset settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment