Omniverse Realtime Viewer
NVIDIAOfficialCreated by NVIDIA Omniverse
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Omniverse Realtime Viewer skill acts as a central routing and architectural framework for developing USD-based 3D viewer applications. It provides a structured approach to composing rendering, scene state, and delivery mechanisms, ensuring that developers can integrate OVRTX rendering, OVStage scene management, and various UI or streaming adapters effectively. The skill emphasizes a modular architecture where the viewer runtime, UI/input adapters, and delivery systems are decoupled, allowing for consistent behavior across local and streamed environments.
What it does
- Provides a routing architecture for USD viewer apps, XR delivery, and GPU-accelerated rendering.
- Defines the separation of concerns between viewer runtime, UI adapters, and delivery systems.
- Offers guidance on integrating OVRTX for high-fidelity 3D rendering.
- Establishes conventions for camera interaction, scene state management, and input handling.
- Supports the implementation of specialized features like stylized rendering and CAE/CFD visualization.
- Provides protocols for agent-to-UI communication and scene control.
When to use it
- When starting the development of a new USD-based realtime viewer application.
- When integrating advanced rendering features like stylized visualization or AOV switching.
- When building XR or spatial editing capabilities into an existing Omniverse application.
- When you need to standardize the architecture for local and streamed viewer deployments.
- When implementing chat-driven scene control or agent-based inspection of a 3D scene.
Advantages
- Promotes a clean, modular architecture that separates rendering logic from UI and transport.
- Ensures consistent behavior across different delivery methods, such as local windows or WebRTC streaming.
- Provides clear paths for extending functionality without disrupting the core viewer runtime.
- Facilitates the integration of complex simulation and visualization data into the viewer.
- Standardizes conventions for scene state, selection, and camera control.
Usage examples
- “How do I set up a basic USD viewer application using the Omniverse Realtime Viewer architecture?”
- The agent will guide you to start with the viewer app reference, resolve dependencies, and implement the core runtime owner to manage the OVStage and OVRTX renderer.
- “I need to add stylized rendering to my existing viewer. Where should I start?”
- The agent will direct you to the stylized visualization references to implement the required USD/Lua/CUDA nodes within your existing runtime owner.
- “How can I enable an AI agent to control the viewer scene?”
- The agent will point to the A2UI Scene Copilot reference to implement an operation interface that allows the agent to send commands through the existing runtime owner.
- “How do I switch between different render outputs like beauty and depth in my viewer?”
- The agent will explain how to use the AOV switching reference to map RenderVars and update the RenderProduct's orderedVars through the runtime owner.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/omniverse-realtime-viewer/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip omniverse-realtime-viewer.zip -d .agents/skills
Documentation by NVIDIA Omniverse
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
Omniverse Realtime Viewer
Build responsive USD viewers by composing OVRTX rendering, OVStage scene state, and the delivery/UI libraries appropriate to the app. Use this package for viewer architecture and interaction; use each selected SDK's upstream guidance for installation and exact release-specific APIs.
Start With The App
When delivery is explicit, select its recipe through
references/routing.mdand follow its current phase. Otherwise start withreferences/usd-viewer-app/README.md. For an existing app, keep its architecture and read only the references for the requested change. Broad app, conventions and UI catalogs are lookups as needed.Resolve the selected libraries through
references/dependencies/README.md. Preserve the project's manifest unless an upgrade is requested.Build a working frame and camera interaction in the chosen shell, then add the requested capabilities. Read
references/conventions.mdfor shared input, camera, selection, and protocol conventions.Use
references/viewer-ux-workflow/README.mdfor broader interface design. Loading, selection feedback, errors, and input responsiveness belong in the first working app, alongside rendering.Validate the actual delivery path with
references/validation.md. A browser screenshot does not validate a native window or a different transport.
Architecture
| Owner | Responsibility |
|---|---|
| Viewer runtime | Own the live OVStage, publication clock, OVRTX renderer, scene changes, and render stepping. |
| UI and input adapter | Display frames and copied app state; send user intent to the runtime owner. |
| Storage/query/simulation workers | Perform their assigned work and return results through the selected integration boundary. |
| Delivery adapter | Present locally or stream through ovstream; respect frame ownership and backpressure. |
Use OVRTX for USD/3D rendering. Browser apps display its WebRTC video; local apps present its output through their native shell. A missing GPU means rendering is unverified, not a reason to substitute a browser 3D renderer.
Keep viewer cameras, settings, effects, and transient edits in app-owned session
or runtime state so the source USD stays intact. Serialize scene mutation and
render stepping through the runtime owner. Read
references/ovstage-ovrtx-integration/README.md for that loop, then the population
or data-plane references when implementing scene loading or attribute writes.
Keep expensive loading and metadata work off the UI and render threads. Keep transport details behind a delivery adapter so camera, selection, properties, and loading state can be reused across local and streamed shells.
Add Capabilities As Needed
Use references/routing.md to select camera/picking, scene management, render
settings, cloud assets, simulation, editor tools, deployment, or CAE/CFD
visualization. Read the selected capability's implementation flow and its linked
contract; the full reference catalog is not a prerequisite for a first frame.
For simulation, use the routing reference's Simulation Ecosystem section plus
references/realtime-sim-integration/README.md. For UI-driven forces or control,
add references/interaction-round-trip/README.md.
For example scenes, use references/usd-sample-data/README.md. When a runtime
failure needs diagnosis, use references/troubleshooting/README.md and the
selected SDK's matching release guidance before changing the architecture.
Solid Modeling: Upstream First
For usd-brep, exact BRep, solid modeling, kernel failures, CAD topology, or
BrepArray questions, first read references/dependencies/README.md → USD BRep. Follow the
owning repository's current agent guidance, skills, operation docs, and package
API before selecting local integration references. Discover the upstream router
rather than assuming skill names or directory layouts remain fixed. Upstream
owns modeling semantics, schema rules, tuning, and diagnostics; this package
owns OVRTX display, worker handoff, selection mapping, and publication timing.
GPU Processing And Stylized Viewers
For custom GPU processing, chained outputs and lens sampling, read
references/spg-processing/README.md. For toon, ink, technical/X-Ray styles,
geometry strokes or full wireframe, continue to
references/stylized-visualization/implementation.md. Its USD/Lua/CUDA starting
node and geometry/depth/composite build sequence work with the selected viewer
recipe; use references/stylized-visualization/style-recipes.md for the preset
math and references/stylized-visualization/README.md for supporting contracts.
Implement the result inside the existing OVRTX/runtime owner and deliver the
published processed output. These instructions do not require a sample checkout
or a prior stylized-rendering implementation.
For an optional usd-brep geometry source, first read
references/dependencies/README.md → USD BRep and the owning repository's
current agent guidance, skills, and operation docs; then read
references/stylized-visualization/usd-brep-source.md for the display boundary.
XR Viewers
For headsets, immersive viewers, or spatial editors, start with
references/xr-viewer-recipe/README.md. Resolve SDK setup and contracts through
references/dependencies/ovxr.md; the library owns OpenXR lifecycle and frame
submission. For controllers, hands, navigation, or scene tools, add
references/xr-spatial-input/README.md and
references/ovxr-python-interactions/README.md. For projection-integrated UI,
read references/ovxr-composition-ui/README.md and
references/ovxr-composition-ui-validation/README.md.
Files
- ATTRIBUTION.mdAdded by AutoGineer943 B
- BENCHMARK.md13.4 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md6.4 KiB
- evals/evals.json7.0 KiB
- references/a2ui-scene-copilot/README.md10.9 KiB
- references/aov-switching/README.md10.5 KiB
- references/cae-cfd-visualization/README.md10.1 KiB
- references/cae-cfd-visualization/cae-data-ingestion.md5.6 KiB
- references/cae-cfd-visualization/coordinate-systems-and-up-axis.md11.0 KiB
- references/cae-cfd-visualization/data-and-operators.md11.7 KiB
- references/cae-cfd-visualization/driving-cae-viz-via-ovstage.md6.4 KiB
- references/cae-cfd-visualization/emitter-and-seed-sources.md16.3 KiB
- references/cae-cfd-visualization/glyphs.md7.1 KiB
- references/cae-cfd-visualization/ovstage-render-and-camera.md11.0 KiB
- references/cae-cfd-visualization/ovui-controls.md13.2 KiB
- references/cae-cfd-visualization/rtwt-blueprint-recreation.md11.9 KiB
- references/cae-cfd-visualization/streaming-cae-viewer.md25.9 KiB
- references/cae-cfd-visualization/temporal-playback.md9.2 KiB
- references/cae-cfd-visualization/usd-authoring-and-materials.md21.5 KiB
- references/cae-cfd-visualization/volume-rendering.md2.5 KiB
- references/camera-auto-select/README.md9.0 KiB
- references/camera-controls/README.md20.9 KiB
- references/camera-picker/README.md9.5 KiB
- references/cloud-assets/README.md4.5 KiB
- references/cloud-deployment/README.md19.6 KiB
- references/cloud-deployment/container-image-build.md2.2 KiB
- references/cloud-deployment/gpu-container-runtime.md2.8 KiB
- references/cloud-deployment/nvcf-self-hosted.md8.4 KiB
- references/cloud-deployment/nvcf-viewer-container-contract.md4.8 KiB
- references/cloud-deployment/webrtc-network-diagnostics.md3.9 KiB
- references/cloudxr-opaque-data-channel/README.md1.1 KiB
- references/conventions.md7.4 KiB
- references/cpp-native-viewer/README.md4.9 KiB
- references/cpp-native-viewer/build-details.md5.2 KiB
- references/cpp-native-viewer/interaction-features.md11.3 KiB
- references/cpp-native-viewer/presentation-loop.md8.0 KiB
- references/cpp-native-viewer/project-build.md3.4 KiB
- references/cpp-native-viewer/renderer-session.md7.1 KiB
- references/cpp-native-viewer/validation.md3.4 KiB
- references/dependencies/README.md6.8 KiB
- references/dependencies/electron-shm.md1.5 KiB
- references/dependencies/environment-validation.md6.6 KiB
- references/dependencies/frontend.md2.3 KiB
- references/dependencies/local-openusd-gpu.md8.7 KiB
- references/dependencies/nvidia-runtime.md14.8 KiB
- references/dependencies/ovrtx.md3.1 KiB
- references/dependencies/ovstream.md3.3 KiB
- references/dependencies/ovxr.md2.3 KiB
- references/dependencies/quick-setup.md2.6 KiB
- references/dependencies/skia-yoga.md936 B
- references/electron-shm-viewer/README.md2.5 KiB
- references/electron-shm-viewer/architecture-project.md6.3 KiB
- references/electron-shm-viewer/electron-client.md6.5 KiB
- references/electron-shm-viewer/protocol-interaction-lifecycle.md7.9 KiB
- references/electron-shm-viewer/python-shm-server.md5.5 KiB
- references/electron-shm-viewer/validation.md2.8 KiB
- references/exact-brep-in-usd/README.md2.5 KiB
- references/gl-viewport-overlay/README.md8.0 KiB
- references/gl-viewport-overlay/architecture.md4.1 KiB
- references/gl-viewport-overlay/example-gizmo.md5.5 KiB
- references/gl-viewport-overlay/interaction-pattern.md4.0 KiB
- references/gl-viewport-overlay/projection-alignment.md4.3 KiB
- references/headless-shm-cli/README.md12.3 KiB
- references/huggingface-usd/README.md7.7 KiB
- references/interaction-round-trip/README.md40.1 KiB
- references/local-viewer/README.md17.8 KiB
- references/native-picking-selection/README.md13.1 KiB
- references/navigation-presets/README.md4.6 KiB
- references/navigation-presets/preset-camera-ops.md5.1 KiB
- references/newton-physics/README.md8.8 KiB
- references/object-selection/README.md11.1 KiB
- references/ovrtx-rendering/README.md23.0 KiB
- references/ovstage-data-plane/README.md3.5 KiB
- references/ovstage-live-geometry/README.md3.3 KiB
- references/ovstage-ovrtx-integration/README.md5.0 KiB
- references/ovstage-population/README.md3.7 KiB
- references/ovstage-runtime/README.md3.1 KiB
- references/ovui-library/README.md3.3 KiB
- references/ovui-library/api-reference.md4.3 KiB
- references/ovui-library/extending.md4.8 KiB
- references/ovui-local-viewer-recipe/README.md4.7 KiB
- references/ovui-local-viewer-recipe/interaction-features.md16.9 KiB
- references/ovui-local-viewer-recipe/project-structure.md6.2 KiB
- references/ovui-local-viewer-recipe/setup-shell-renderer.md16.4 KiB
- references/ovui-local-viewer-recipe/validation-build-order.md6.1 KiB
- references/ovwidgets-editor-shell/README.md5.4 KiB
- references/ovxr-composition-ui-validation/README.md7.1 KiB
- references/ovxr-composition-ui-validation/evidence-gates.md3.5 KiB
- references/ovxr-composition-ui-validation/frustum-placement.md2.4 KiB
- references/ovxr-composition-ui-validation/library-only-validation.md8.1 KiB
- references/ovxr-composition-ui-validation/owned-orchestration.md5.3 KiB
- references/ovxr-composition-ui-validation/viewer-evidence.md4.0 KiB
- references/ovxr-composition-ui/README.md8.5 KiB
- references/ovxr-composition-ui/async-raster-pipeline.md5.0 KiB
- references/ovxr-composition-ui/compositor-passes-and-sync.md6.4 KiB
- references/ovxr-composition-ui/depth-tools.md5.0 KiB
- references/ovxr-composition-ui/editor-document-model.md4.8 KiB
- references/ovxr-composition-ui/experience-quality.md8.5 KiB
- references/ovxr-composition-ui/foveation-and-edge-math.md3.5 KiB
- references/ovxr-composition-ui/library-only-compositor.md10.4 KiB
- references/ovxr-composition-ui/native-build-and-discovery.md4.6 KiB
- references/ovxr-composition-ui/performance-and-telemetry.md7.9 KiB
- references/ovxr-composition-ui/primary-projection-compositor.md3.5 KiB
- references/ovxr-composition-ui/primary-projection.md4.1 KiB
- references/ovxr-composition-ui/projection-and-depth.md5.3 KiB
- references/ovxr-composition-ui/raster-abi.md3.0 KiB
- references/ovxr-composition-ui/sdk-frame-backend.md1.6 KiB
- references/ovxr-composition-ui/skia-yoga.md2.8 KiB
- references/ovxr-composition-ui/spatial-interaction.md5.6 KiB
- references/ovxr-composition-ui/spatial-surfaces-and-interaction.md10.4 KiB
- references/ovxr-composition-ui/telemetry-contract.md3.8 KiB
- references/ovxr-composition-ui/validation-and-live-gates.md3.9 KiB
- references/ovxr-foveation-and-display/README.md1.1 KiB
- references/ovxr-frame-loop-and-readback/README.md1.2 KiB
- references/ovxr-library-runtime/README.md1.1 KiB
- references/ovxr-library-runtime/ar-compositing.md4.4 KiB
- references/ovxr-library-runtime/frame-input-order.md2.2 KiB
- references/ovxr-library-runtime/library-only.md1.1 KiB
- references/ovxr-library-runtime/live-ar-controls.md4.3 KiB
- references/ovxr-library-runtime/mirror-lifetime.md4.1 KiB
- references/ovxr-library-runtime/settings-and-lifetime.md3.9 KiB
- references/ovxr-library-runtime/viewer-assembly.md225 B
- references/ovxr-openxr-runtime/README.md1012 B
- references/ovxr-python-interactions/README.md1.8 KiB
- references/ovxr-python-interactions/architecture.md5.5 KiB
- references/ovxr-python-interactions/feature-patterns.md7.4 KiB
- references/physics-simulation/README.md7.1 KiB
- references/prim-info-display/README.md10.9 KiB
- references/prim-pick-effects/README.md7.3 KiB
- references/prim-transform-safety/README.md8.6 KiB
- references/realtime-sim-integration/README.md7.0 KiB
- references/render-settings/README.md12.6 KiB
- references/routing.md37.7 KiB
- references/section-views/README.md5.8 KiB
- references/seg-outline-highlight/README.md1.5 KiB
- references/selection-animation/README.md5.0 KiB
- references/selection-feedback/README.md7.5 KiB
- references/smlib-brep-pitfalls/README.md2.5 KiB
- references/spg-processing/README.md8.0 KiB
- references/stage-attribute-reads/README.md6.2 KiB
- references/stage-hierarchy/README.md20.3 KiB
- references/stage-hierarchy/fallback-worker-protocol.md7.4 KiB
- references/stage-loading/README.md7.1 KiB
- references/stage-management/README.md6.6 KiB
- references/stage-queries/README.md6.1 KiB
- references/streaming-client/README.md25.6 KiB
- references/streaming-lifecycle/README.md4.6 KiB
- references/streaming-messages/README.md19.5 KiB
- references/streaming-messages/server-handler-map.md3.1 KiB
- references/streaming-server/README.md17.7 KiB
- references/streaming-server/frame-loop-and-continuity.md3.8 KiB
- references/streaming-viewer-recipe/README.md1.9 KiB
- references/streaming-viewer-recipe/client-protocol.md14.2 KiB
- references/streaming-viewer-recipe/interaction-features.md13.8 KiB
- references/streaming-viewer-recipe/project-structure.md7.3 KiB
- references/streaming-viewer-recipe/server-runtime.md20.2 KiB
- references/streaming-viewer-recipe/validation-build-order.md8.5 KiB
- references/streaming-vs-local/README.md9.4 KiB
- references/stylized-visualization/README.md8.7 KiB
- references/stylized-visualization/aov-guide-contracts.md8.1 KiB
- references/stylized-visualization/implementation.md11.4 KiB
- references/stylized-visualization/line-compositor-delivery.md7.7 KiB
- references/stylized-visualization/mesh-xray.md10.1 KiB
- references/stylized-visualization/reproduction-validation.md10.2 KiB
- references/stylized-visualization/style-composition-contract.md5.4 KiB
- references/stylized-visualization/style-recipes.md14.7 KiB
- references/stylized-visualization/usd-brep-source.md4.9 KiB
- references/subprocess-geometry-bridge/README.md3.5 KiB
- references/tauri-local-viewer/README.md6.7 KiB
- references/tauri-shm-transform-gizmo/README.md12.3 KiB
- references/transform-manipulator/README.md17.1 KiB
- references/troubleshooting/README.md11.2 KiB
- references/troubleshooting/scenario-playbooks.md24.7 KiB
- references/usd-sample-data/README.md12.0 KiB
- references/usd-viewer-app/README.md5.0 KiB
- references/validation.md6.3 KiB
- references/viewer-backend-interface/README.md20.1 KiB
- references/viewer-control-patterns/README.md4.8 KiB
- references/viewer-data-view-patterns/README.md5.6 KiB
- references/viewer-feedback-status/README.md5.0 KiB
- references/viewer-input-routing/README.md11.9 KiB
- references/viewer-layout-patterns/README.md4.7 KiB
- references/viewer-ux-workflow/README.md5.2 KiB
- references/viewport-overlays/README.md9.9 KiB
- references/viewport-overlays/cuda-compositing.md6.6 KiB
- references/viewport-resize/README.md4.0 KiB
- references/vulkan-compositing/README.md6.1 KiB
- references/vulkan-compositing/depth-overlays.md15.7 KiB
- references/vulkan-compositing/interop-and-lifecycle.md6.6 KiB
- references/webgl-shm-transport/README.md14.5 KiB
- references/windows-native-setup/README.md11.6 KiB
- references/xr-client-connection/README.md1.1 KiB
- references/xr-client-message-contract/README.md8.5 KiB
- references/xr-desktop-mirror/README.md13.8 KiB
- references/xr-session-modes-and-passthrough/README.md930 B
- references/xr-spatial-input/README.md2.3 KiB
- references/xr-spatial-input/advanced-tools.md5.2 KiB
- references/xr-spatial-input/controllers.md16.3 KiB
- references/xr-spatial-input/feature-validation.md4.9 KiB
- references/xr-spatial-input/gesture-arbitration.md4.9 KiB
- references/xr-spatial-input/gesture-filtering.md5.5 KiB
- references/xr-spatial-input/hand-recognizers.md4.0 KiB
- references/xr-spatial-input/hands.md10.3 KiB
- references/xr-spatial-input/navigation.md13.5 KiB
- references/xr-spatial-input/physics-interaction.md23.2 KiB
- references/xr-spatial-input/simulation-lifecycle.md5.9 KiB
- references/xr-spatial-input/stage-composition.md4.9 KiB
- references/xr-spatial-input/teleport-acceptance.md5.2 KiB
- references/xr-spatial-input/webxr-client.md3.9 KiB
- references/xr-tracking-anchor-and-scale/README.md950 B
- references/xr-viewer-recipe/README.md10.5 KiB
- skill-card.md7.7 KiB
- skill.oms.sig58.2 KiB
references/cae-cfd-visualization/ovui-controls.md
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
CAE/CFD Visualization: ovui Window Shell And Interactive Controls
Triggers
Use this reference for the ovui window shell plus the interactive header
controls that drive a CAE/CFD visualization pipeline: representation
(points/surface/isosurface/slice/streamlines) and field selectors, iso-value and
slice-position sliders, colormap choice, orbit-camera navigation over a rendered
viewport, and sample-preset one-click scenes. It documents the thread-safe path
from an ovui callback to a single serialized render loop that owns every stage
rebuild and renderer.step.
This is the interactive-controls surface for the CAE/CFD viewer. For the generic
window bootstrap read local-viewer and ovui-local-viewer-recipe; for button
normalization and click-vs-drag dispatch read viewer-input-routing; for control
widget selection read viewer-control-patterns; for renderer ownership,
ordinals, and the write floor read the ovstage-* references and
conventions.md.
Ownership Model (Non-Negotiable)
One serialized loop owns every OVStage write and every renderer.step. ovui
callbacks run on the UI thread and MUST NOT touch OVStage or the renderer
directly. A callback does exactly one of two things:
mutates local, numpy-only input/camera state (through the
InputController), orenqueues a command onto a thread-safe queue that the loop drains.
Because the loop drains all queued commands — including stage rebuilds — before
it ever calls renderer.step, a step can never run while the stage is being
rebuilt. This is the same single-owner rule as conventions.md, applied to an
interactive CAE control surface.
ovui Shell Considerations
Use these behavior checks with the currently installed ovui API. Do not generate defensive hasattr/alternate-bootstrap branches
around them unless a targeted compatibility check proves the wheel changed the
contract; if the wheel changed, update this reference instead.
ui.init("...", width=W, height=H, max_fps=60)returnsNone. There is no app handle to hold, and in particular there is noapp.step_and_present().Run
ui.run_async()alongside the update coroutine in an application-owned asyncio loop. Userun_until_closedfromlocal-viewerto cancel and await both tasks before destroying the runtime, window, and backend.The render-loop coroutine calls
runtime.tick(dt)thenawait asyncio.sleep(1.0 / 120.0)— notsleep(0). A busy spin (sleep(0)) pegs a CPU core and starves the OS message pump, which reads as a hung window. Yield at ~120 Hz instead.Create one fill-window:
ui.Window("...", fill_app_window=True, flags=ui.WINDOW_FLAGS_NO_TITLE_BAR). Wrap theflags=construction in try/except and fall back to a no-flagsui.Window(..., fill_app_window=True); some wheel signatures reject theflagskwarg.Viewport =
ui.ByteImageProviderdrawn withui.ImageWithProvider(provider, fill_policy=ui.IwpFillPolicy.IWP_PRESERVE_ASPECT_FIT). Push frames withprovider.set_data_array(rgba_uint8, [w, h])where the array is C-contiguousHxWx4uint8 RGBA (no B/R swap) and the size list is[width, height].Layer a transparent
ui.Rectanglewithopaque_for_mouse_events = TrueABOVE the image, inside the image's ownui.ZStack. The rect captures camera drags over the viewport while the header controls above the ZStack stay clickable.
import asyncio, time
import omni.ui as ui
ui.init("CAE ovui Viewer", width=W, height=H, max_fps=60) # returns None
provider = runtime.viewport.provider
try:
window = ui.Window("CAE ovui Viewer", width=W, height=H,
fill_app_window=True, flags=ui.WINDOW_FLAGS_NO_TITLE_BAR)
except Exception:
window = ui.Window("CAE ovui Viewer", width=W, height=H, fill_app_window=True)
with window.frame:
with ui.VStack(spacing=0):
build_header() # ComboBoxes + FloatSliders (below)
with ui.ZStack(height=ui.Fraction(1)):
ui.ImageWithProvider(provider,
fill_policy=ui.IwpFillPolicy.IWP_PRESERVE_ASPECT_FIT)
hit = ui.Rectangle(style={"background_color": 0x00000000})
hit.opaque_for_mouse_events = True # captures camera drags
wire_hit_rect(hit, runtime) # mouse callbacks -> InputController
async def render_loop():
prev = time.time()
while True:
try:
now = time.time(); dt = now - prev; prev = now
runtime.tick(dt) # advances state, pushes frames
except Exception as exc: # never let one frame kill the loop
print(f"[app] render_loop error: {exc}", flush=True)
await asyncio.sleep(1.0 / 120.0) # NOT sleep(0)
# Use the run_until_closed helper from local-viewer in the application.
try:
asyncio.run(run_until_closed(render_loop(), ui.run_async()))
finally:
runtime.close() # app-owned cleanup: stop/join the render owner
window.destroy()
ui.shutdown()Use ui.color("#76b900") or ui.color(r, g, b, a) for style colors instead of
packing integers by hand. The helper produces ovui's 0xAABBGGRR format.
Header Controls (ComboBoxes + FloatSliders)
The header carries: a representation ComboBox (points/surface/isosurface/slice/ streamlines), a field ComboBox (populated from the loaded dataset), an iso-value FloatSlider (0–1 fraction of the field range), a slice-position FloatSlider (0–1 along the slice axis), and a colormap ComboBox. Each control's callback ONLY enqueues a command — it never touches OVStage or the renderer. Wrap every callback in try/except; an unguarded ovui callback exception can tear down the app loop.
ComboBox:
combo = ui.ComboBox(default_idx, *items), thencombo.model.add_item_changed_fn(callback). Read the selection inside the callback withmodel.get_item_value_model().as_intand index into the item list; guard the index and fall back to a sensible default when out of range.FloatSlider:
slider = ui.FloatSlider(min=0.0, max=1.0), seed it withslider.model.set_value(initial), thenslider.model.add_value_changed_fn(callback). Read withmodel.get_value_as_float().Populate the field ComboBox from real dataset field names. Pre-load the dataset once before building the header (the reference calls
runtime._ensure_dataset()and readsruntime.fields) so the dropdown shows actual fields rather than a guess; fall back to the current field name if the dataset has not loaded.
def _on_representation_changed(model, *_):
try:
idx = model.get_item_value_model().as_int
mode = REPRESENTATIONS[idx] if 0 <= idx < len(REPRESENTATIONS) else "surface"
runtime.enqueue_representation(mode) # enqueue only
except Exception as exc:
print(f"[app] representation callback error: {exc}")
def _on_iso_changed(model, *_):
try:
runtime.enqueue_iso(float(model.get_value_as_float())) # 0..1 fraction
except Exception as exc:
print(f"[app] iso callback error: {exc}")The enqueue methods (enqueue_load, enqueue_colormap, enqueue_representation,
enqueue_field, enqueue_iso, enqueue_slice) each put a (kind, payload)
tuple on the runtime's queue.Queue. They are the only UI-thread-safe way to
change pipeline state.
The Single Serialized Loop
The UI thread enqueues intent; the owner coalesces it and dispatches bounded scientific work. It continues camera interaction and rendering while computation runs, then publishes copied results for the current request and generation. Classify the result with control-to-publication routing: colors and geometry arrays update existing prims, while type/composition changes replace affected structure. A new dataset uses the scene-replacement path.
tick(dt):
accept and coalesce compatible UI intent
dispatch scientific work if its bounded slot is free
accept completed current-generation results
publish changed arrays or commit a prepared scene replacement
commit camera changes and render the completed publicationKeep local control drafts until the corresponding accepted state arrives; an intermediate result must not overwrite a newer drag target. Reset and preset replacement discard superseded drafts. Fit on a new dataset only when that is the selected camera policy; field, colormap and iso/slice edits preserve the view.
_render_current() enforces the write-floor ordering from conventions.md and
the ovstage-* references: get the row-major camera xform, commit_camera_pose
writes omni:xform at a new ordinal and advances the write floor, then
step_extract(ordinal=...) renders at that ordinal — never above the floor — and
the resulting RGBA is pushed to the viewport provider.
Camera Navigation
Implement pure NumPy camera math (OrbitCamera in the suggested camera.py)
using camera controls, so it works before
the OV stack is installed. Implement the InputController in the suggested
input.py using input routing; it translates
ovui mouse events into camera moves and flags the runtime camera-dirty; it never
writes OV state.
Gestures:
orbit(spherical azimuth/elevation),pan(move target in the camera right/up plane),dolly(exponential distance change),zoom(wheel), andfit(frame an AABB: target = center, distance from max extent and FOV with a 1.5× margin, plus derived near/far clip).Button remap (matches
conventions.md):{0: orbit, 2: pan, 1: dolly}; wheel = zoom (positive steps zoom in). A press becomes a drag only after motion exceeds a 1.0 px threshold, and the first post-threshold step is measured from the down-point so it is not jumpy.get_camera_xform()returns a row-major float64 4×4: row 0 = right, row 1 = up, row 2 =-forward, row 3 = eye. State is sanitized before matrices are built — distance/elevation clamped, non-finite lanes scrubbed — so the loop never commits a non-finite pose.
Sample-Preset Pattern
To reproduce a named sample scene in one click, keep a small registry of presets,
each a dict of {dataset, representation, field, colormap} (optionally iso/slice
fractions). Applying a preset is a single enqueued command that the loop drains
and applies as one configuration through the same publication routing as the
individual controls, so no preset code touches OVStage directly. A preset
button resolves the named entry and enqueues it. The owner updates existing
arrays or replaces structure according to the requested changes. A new dataset
follows scene replacement with the selected camera policy.
# presets.py — a registry; the app is adding this module.
PRESETS = {
"StaticMixer temperature": dict(dataset="static_mixer.npz",
representation="surface", field="Temp", colormap="viridis"),
"Disk isosurface": dict(dataset="disk_out_ref.npz",
representation="isosurface", field="Pres", colormap="turbo"),
}
def apply_preset(runtime, name):
runtime.enqueue_preset(dict(PRESETS[name])) # app-owned typed commandCommit a preset as one coherent requested configuration so intermediate field and representation choices cannot publish into the replacement dataset.
Gotchas
Buffered stdout when redirected: Python buffers stdout when it is not a TTY, so piping logs to a file can hide
[status]/[render]lines until exit. Runpython -u -m <app>(orflush=Trueon prints) to see logs live.Friendly field names: resolve a display name like
"Temperature"to the real dataset field (e.g."Temp") against the actual field list on every rebuild, so coloring never silently falls back to the wrong field. Implement this as an application-owned case-insensitive alias map, then require a visible selection or error when no unambiguous field exists.First-frame RTX shader compile: a fresh process's first
renderer.stepcompiles RTX shaders and can take minutes. The GPU may look idle and the window may look frozen — this is not a hang. Allow a long first-frame timeout (for example, 300 s) and poll rather than assuming failure.Never let one frame kill the loop: wrap
tick, command application, and every mouse/control callback in try/except; log and continue so a single bad frame or callback does not tear down the window.
Suggested Application Modules
app.py— ovui shell:ui.init/ui.Window, header ComboBoxes + FloatSliders, ZStack image + transparent hit rect, update/presentation task ownership.runtime.py— serializedViewerRuntime: enqueue methods, coalesced last-wins queue drain, tick, and write-floor commit + step.camera.py— orbit/pan/dolly/zoom/fit and a sanitized row-major camera xform.input.py— button remap, drag threshold, and camera-dirty state.viewport.py—ByteImageProviderwrapper and letterbox mapping.config.py,__main__.py— fixed render size, interactive/test modes, and preflight env order.
See also: local-viewer, ovui-local-viewer-recipe, viewer-input-routing,
viewer-control-patterns, camera-controls, conventions.md,
ovstage-runtime, ovstage-ovrtx-integration, ovrtx-rendering.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python, Needs Node.js
The author says: Orchestrator skill. Downstream focused references may require NVIDIA GPUs, ovrtx, ovstream, ovui, OpenUSD, Python, Node/React, Tauri, Electron, C++, or cloud GPU deployment access depending on the selected viewer path.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Omniverse
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/omniverse-realtime-viewer · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Omniverse or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download omniverse-realtime-viewer.zip