Omniverse Realtime Viewer
OpenAIOfficialCreated by NVIDIA OmniverseDistributed by OpenAI
- Skill
- Meta (authoring, orchestration, planning, memory)
- 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 orchestrator for developing USD-based viewer applications. It provides a structured approach to selecting implementation recipes, enforcing architectural conventions, and managing dependencies. By utilizing a set of focused reference documents, it guides developers through the lifecycle of building, configuring, and validating viewer applications, ensuring consistent behavior across different delivery paths such as local workstations or streaming environments.
What it does
- Routes development requests to specific implementation recipes based on the target delivery path.
- Enforces architectural rules for USD rendering, stage management, and UI integration.
- Provides guidance on camera selection, input handling, and viewport interaction.
- Standardizes the integration of AOV switching and render product configuration.
- Facilitates the capture of validation evidence for viewer readiness.
- Maintains separation between user-provided USD files and application-specific session state.
When to use it
- When initiating the development of a new USD viewer application within the Omniverse ecosystem.
- When determining the appropriate delivery path for a viewer, such as local native or streaming.
- When needing to implement consistent camera, selection, or UI behavior across viewer projects.
- When integrating advanced rendering features like AOV switching into an existing viewer.
Advantages
- Ensures architectural consistency across diverse viewer implementations.
- Provides a clear, modular path for adding specific capabilities like input routing or data display.
- Promotes clean separation of concerns between stage data and viewer-owned state.
- Standardizes the validation process for consistent delivery.
Usage examples
- “I need to build a browser-based viewer for USD files.”
- The agent will route you to the streaming viewer recipe, providing guidance on WebRTC stream setup, UI integration, and viewport interaction.
- “How do I implement AOV switching in my local USD viewer?”
- The agent will provide the AOV switching reference, detailing how to map render vars and update the display state on the server.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/openai/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
This is the top-level entry point for the Omniverse Realtime Viewer skill package. It is self-contained: all required routing, conventions, and validation guidance live in the selected references.
Use the focused reference documents as implementation recipes. This file chooses the right recipes and preserves the architectural rules that must hold across all generated viewer apps.
Instructions
Start by classifying the requested viewer, then read only the references needed
for that delivery path and feature set. Implement the render path first, layer
interaction and UI behavior on top of it, and finish by capturing validation
evidence from references/validation.md.
Read Order
Read
references/routing.mdto choose the delivery path and focused references.Read
references/conventions.mdbefore implementing camera, input, selection, viewport, streaming protocol, scene loading, or environment behavior.For broad viewer requests, read
references/usd-viewer-app/README.md.If the delivery path is unclear, read
references/streaming-vs-local/README.md.If the prompt includes layout, panels, controls, inspectors, status, or UX, read
references/viewer-ux-workflow/README.mdand then the focused viewer UI references. This applies to React/WebRTC, Tauri, Electron,ovui,ovwidgets, and Dear ImGui apps; "frontend" means user-facing UI, not only browser UI.For viewport interaction, read
references/viewer-input-routing/README.mdbeforereferences/camera-controls/README.md,references/native-picking-selection/README.md, orreferences/object-selection/README.md.Read only the focused capability references needed for the requested app.
Use
references/validation.mdto capture review evidence before handoff.
Non-Negotiables
Use
ovrtxfor all USD and 3D rendering.Browser apps display an
ovstreamWebRTC video stream plus UI. The browser does not render USD geometry.Do not substitute WebGL, Three.js, Babylon.js, PlayCanvas, A-Frame, model-viewer, react-three-fiber, glTF browser viewers, or other client-side 3D renderers.
If local validation cannot run because the GPU/runtime environment is absent, scaffold the
ovrtxpath and document the runtime requirement. Do not add a browser-renderer fallback.Keep user USD files unmodified. Viewer cameras, render products, render vars, settings, selection metadata, and runtime state belong in session/composite layers or app state.
Keep one owner for
renderer.step(), stage mutation, native picking, selection writes, and live attribute writes.Keep dependency acquisition in
references/dependencies/README.mdand deployment choices inreferences/cloud-deployment/README.md; do not duplicate package locations or deployment setup.
Focused Reference Families
Entry points and recipes:
references/usd-viewer-app/README.md,references/streaming-viewer-recipe/README.md,references/ovui-local-viewer-recipe/README.md,references/streaming-vs-local/README.md,references/electron-shm-viewer/README.md,references/ovwidgets-editor-shell/README.md.Rendering and stage:
references/ovrtx-rendering/README.md,references/stage-loading/README.md,references/stage-management/README.md,references/render-settings/README.md,references/aov-switching/README.md,references/stage-hierarchy/README.md,references/stage-queries/README.md,references/stage-attribute-reads/README.md,references/prim-transform-safety/README.md,references/usd-sample-data/README.md.Delivery and runtime:
references/streaming-server/README.md,references/streaming-client/README.md,references/streaming-messages/README.md,references/streaming-lifecycle/README.md,references/local-viewer/README.md,references/tauri-local-viewer/README.md,references/cpp-native-viewer/README.md,references/headless-shm-cli/README.md,references/viewer-backend-interface/README.md,references/webgl-shm-transport/README.md.Viewer UI/UX:
references/viewer-ux-workflow/README.md,references/viewer-layout-patterns/README.md,references/viewer-control-patterns/README.md,references/viewer-data-view-patterns/README.md,references/viewer-feedback-status/README.md.Interaction:
references/viewer-input-routing/README.md,references/camera-controls/README.md,references/object-selection/README.md,references/native-picking-selection/README.md,references/selection-feedback/README.md,references/selection-animation/README.md,references/transform-manipulator/README.md,references/gl-viewport-overlay/README.md,references/ovui-library/README.md,references/prim-pick-effects/README.md,references/prim-info-display/README.md,references/viewport-overlays/README.md.Infrastructure:
references/dependencies/README.md,references/windows-native-setup/README.md,references/cloud-assets/README.md,references/cloud-deployment/README.md,references/troubleshooting/README.md.
Build Workflow
Classify the prompt by delivery path, target user, required capabilities, runtime environment, validation needs, and explicit constraints.
Select a small reference set. Start with the recipe or routing reference, then add focused capabilities such as camera, picking, hierarchy, properties, render settings, transform tools, cloud assets, or deployment.
Read selected references before writing app code. Follow their build order, import order, data-channel contracts, and renderer ownership rules.
Implement the core render path first, then input routing and camera, then selection and data panels, then scene/settings features, then packaging or deployment.
Treat the selected references as the behavior contract for API shape, compatibility, and generated project structure.
Capture validation evidence before calling the viewer ready.
Examples
For a browser viewer request, use the streaming recipe references plus camera, picking, hierarchy, properties, render settings, and stream-status references.
For a local workstation viewer request, use the local or native delivery references plus renderer setup, stage loading, viewport input, and validation.
Completion Checklist
Selected references match the user's intent and delivery path.
No code path uses a browser-side 3D renderer for USD.
The generated app has one clear owner for render stepping and stage mutation.
User USD files remain untouched by viewer-owned session data.
Camera, input, selection, scene loading, and stream behavior follow
references/conventions.md.Setup/build/run results and visual interaction evidence are captured with
references/validation.md.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- BENCHMARK.md5.5 KiB
- LICENSEAdded by AutoGineer10.0 KiB
- SKILL.md7.4 KiB
- agents/openai.yaml315 B
- evals/evals.json8.1 KiB
- references/aov-switching/README.md15.2 KiB
- references/camera-auto-select/README.md7.4 KiB
- references/camera-controls/README.md17.1 KiB
- references/camera-picker/README.md9.7 KiB
- references/cloud-assets/README.md10.4 KiB
- references/cloud-deployment/README.md18.0 KiB
- references/conventions.md5.3 KiB
- references/cpp-native-viewer/README.md2.4 KiB
- references/cpp-native-viewer/interaction-features.md19.2 KiB
- references/cpp-native-viewer/presentation-loop.md9.0 KiB
- references/cpp-native-viewer/project-build.md6.4 KiB
- references/cpp-native-viewer/renderer-session.md4.5 KiB
- references/cpp-native-viewer/validation.md3.3 KiB
- references/dependencies/README.md3.4 KiB
- references/dependencies/electron-shm.md1.5 KiB
- references/dependencies/environment-validation.md4.4 KiB
- references/dependencies/frontend.md2.3 KiB
- references/dependencies/local-openusd-gpu.md4.4 KiB
- references/dependencies/nvidia-runtime.md9.0 KiB
- references/dependencies/ovrtx.md2.4 KiB
- references/dependencies/ovstream.md2.5 KiB
- references/dependencies/quick-setup.md5.3 KiB
- references/electron-shm-viewer/README.md2.2 KiB
- references/electron-shm-viewer/architecture-project.md6.3 KiB
- references/electron-shm-viewer/electron-client.md5.6 KiB
- references/electron-shm-viewer/protocol-interaction-lifecycle.md6.9 KiB
- references/electron-shm-viewer/python-shm-server.md4.9 KiB
- references/electron-shm-viewer/validation.md2.8 KiB
- references/gl-viewport-overlay/README.md7.9 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.2 KiB
- references/huggingface-usd/README.md7.7 KiB
- references/local-viewer/README.md15.0 KiB
- references/native-picking-selection/README.md10.4 KiB
- references/object-selection/README.md9.4 KiB
- references/ovrtx-rendering/README.md18.2 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.md3.7 KiB
- references/ovui-local-viewer-recipe/interaction-features.md16.1 KiB
- references/ovui-local-viewer-recipe/project-structure.md6.2 KiB
- references/ovui-local-viewer-recipe/setup-shell-renderer.md14.3 KiB
- references/ovui-local-viewer-recipe/validation-build-order.md5.5 KiB
- references/ovwidgets-editor-shell/README.md8.6 KiB
- references/prim-info-display/README.md9.3 KiB
- references/prim-pick-effects/README.md5.9 KiB
- references/prim-transform-safety/README.md8.2 KiB
- references/render-settings/README.md9.9 KiB
- references/routing.md16.5 KiB
- references/seg-outline-highlight/README.md1.4 KiB
- references/selection-animation/README.md9.7 KiB
- references/selection-feedback/README.md6.6 KiB
- references/stage-attribute-reads/README.md5.5 KiB
- references/stage-hierarchy/README.md17.1 KiB
- references/stage-hierarchy/fallback-worker-protocol.md3.5 KiB
- references/stage-loading/README.md19.3 KiB
- references/stage-management/README.md10.1 KiB
- references/stage-queries/README.md5.3 KiB
- references/streaming-client/README.md17.4 KiB
- references/streaming-lifecycle/README.md8.8 KiB
- references/streaming-messages/README.md16.5 KiB
- references/streaming-messages/server-handler-map.md3.1 KiB
- references/streaming-server/README.md18.6 KiB
- references/streaming-server/frame-loop-and-continuity.md3.3 KiB
- references/streaming-viewer-recipe/README.md4.8 KiB
- references/streaming-viewer-recipe/client-protocol.md11.0 KiB
- references/streaming-viewer-recipe/interaction-features.md13.0 KiB
- references/streaming-viewer-recipe/project-structure.md7.0 KiB
- references/streaming-viewer-recipe/server-runtime.md16.8 KiB
- references/streaming-viewer-recipe/validation-build-order.md5.8 KiB
- references/streaming-vs-local/README.md8.1 KiB
- references/tauri-local-viewer/README.md18.2 KiB
- references/tauri-shm-transform-gizmo/README.md11.8 KiB
- references/transform-manipulator/README.md15.0 KiB
- references/troubleshooting/README.md7.2 KiB
- references/troubleshooting/scenario-playbooks.md18.8 KiB
- references/usd-sample-data/README.md11.7 KiB
- references/usd-viewer-app/README.md7.5 KiB
- references/validation.md3.0 KiB
- references/viewer-backend-interface/README.md17.7 KiB
- references/viewer-control-patterns/README.md4.8 KiB
- references/viewer-data-view-patterns/README.md4.8 KiB
- references/viewer-feedback-status/README.md4.9 KiB
- references/viewer-input-routing/README.md7.8 KiB
- references/viewer-layout-patterns/README.md4.7 KiB
- references/viewer-ux-workflow/README.md4.6 KiB
- references/viewport-overlays/README.md4.8 KiB
- references/viewport-resize/README.md8.5 KiB
- references/webgl-shm-transport/README.md14.5 KiB
- references/windows-native-setup/README.md5.7 KiB
- skill-card.md2.9 KiB
- skill.oms.sig28.6 KiB
references/camera-controls/README.md
Camera Controls
Triggers
Use this skill for requests mentioning orbit camera, pan, zoom, camera controls, viewport navigation, fit to scene, camera aspect, letterbox coordinates, camera gizmos, row-major camera matrices, or cameras inside geometry.
ovrtx does not provide native camera input handling. The camera is a USD prim, and the app updates its omni:xform every frame or after input changes.
Read viewer-input-routing first when the task involves WebRTC/SHM input
callbacks, ovui button ids, viewport input gating, wheel events, or
click-vs-drag dispatch. This skill owns camera state and camera math.
Input Mapping
This section is a camera-facing summary. viewer-input-routing is the primary
source for transport normalization and input ownership.
For local ovui callbacks, button ids differ from the OrbitCamera helper:
ovui:
0=left,1=right,2=middleOrbitCamera:0=left,1=middle,2=rightLocal ovui maps exactly as
0 -> left/orbit,2 -> middle/pan, and1 -> right/dolly.
def camera_button_from_ovui(button: int) -> int | None:
return {0: 0, 2: 1, 1: 2}.get(button)For WebRTC ovstream.InputEvent callbacks, do not treat raw button integers
as browser DOM button ids. ovstream.MouseButton uses NONE=0, LEFT=1,
MIDDLE=2, RIGHT=3. Normalize to the shared camera helper convention before
calling camera or pick code:
def camera_button_from_ovstream(raw_button) -> int | None:
try:
button = raw_button if isinstance(raw_button, ovstream.MouseButton) else ovstream.MouseButton(raw_button)
except Exception:
return None
if button == ovstream.MouseButton.LEFT:
return 0
if button == ovstream.MouseButton.MIDDLE:
return 1
if button == ovstream.MouseButton.RIGHT:
return 2
return NoneUse left drag for orbit, middle drag for pan, right drag for dolly/zoom, and wheel for zoom. For desktop apps with modifier keys, use Alt+LMB for orbit, Alt+MMB for pan, Alt+RMB for dolly. Optionally support RMB+WASD fly mode for free camera movement. Left-click selection should fire only on release when movement stayed below the drag threshold.
Render Aspect
When creating or explicitly reconfiguring the render product resolution, update camera viewport dimensions and projection aspect in the same operation. For USD cameras, keep horizontal aperture stable and derive vertical aperture from the render size:
def update_camera_aspect(stage, camera_path: str, width: int, height: int) -> None:
cam = stage.GetPrimAtPath(camera_path)
if not cam or not cam.IsValid() or width <= 0 or height <= 0:
return
h_attr = cam.GetAttribute("horizontalAperture")
v_attr = cam.GetAttribute("verticalAperture")
h_aperture = float(h_attr.Get() or 20.955)
v_attr.Set(h_aperture * float(height) / float(width))Browser streaming should keep a fixed server render resolution, display the video with object-fit: contain, and avoid sending resize messages for CSS layout changes. NVST handles letterbox coordinate mapping for WebRTC input carried as binary InputEvent structs; app-owned DOM math should still use the visible image rectangle before orbit, pan, zoom, or pick calculations.
Input transport rules:
WebRTC: use the NVST native input channel and handle
InputEventstructs from ovstream callbacks.SHM: use
ovstream.ShmClient.send_input_event()from Python, orovstream_shm_client_send_input_event()from C, withInputEventstructs; do not send JSONmouseInput.In-process: call camera controller methods directly from the Python/C++ UI event loop.
For browser-streamed React apps, gate native input with an app-level viewport
ownership flag. UI panels should send setViewportInputActive {active:false};
the viewport sends active:true on pointer entry/down and active:false on
pointer leave. The server should ignore native input while inactive and cancel
any drag state:
def set_viewport_input_active(self, active: bool) -> None:
self._viewport_input_active = bool(active)
if not self._viewport_input_active:
self.camera.cancel_interaction()
def handle_input(self, event):
if not self._viewport_input_active:
self.camera.cancel_interaction()
return
# Normal orbit, pan, zoom, and click-to-pick handling.This prevents sidebar, tree, top-bar, and inspector interactions from reaching the orbit controller as stale WebRTC mouse input.
For WebRTC servers, initialize the viewport input gate to active when the only
native input source is the stream surface. Otherwise the first mouse-down of a
click can arrive before the React setViewportInputActive {active:true} data
channel message, and the release will not be recognized as a click. DOM panels
should still send active:false on pointer enter/down to disable camera and
picking while the user interacts with UI chrome.
Drag Threshold (Click vs Drag Discrimination)
A short press-and-release should be treated as a click (selection, context menu),
not a drag (orbit, pan, dolly). Track movement from press to release and compare
against a threshold. The default desktop threshold is a 1 px delta: any move
event with abs(dx) > 1.0 or abs(dy) > 1.0 turns the gesture into a drag.
DRAG_THRESHOLD_PX = 1.0 # pixels of movement before press becomes drag
class InputState:
def __init__(self):
self.last_x: float = 0.0
self.last_y: float = 0.0
self.exceeded_threshold: bool = False
def on_press(self, x: float, y: float):
self.last_x = x
self.last_y = y
self.exceeded_threshold = False
def on_move(self, x: float, y: float) -> bool:
"""Returns True if this motion exceeds the drag threshold."""
dx = x - self.last_x
dy = y - self.last_y
self.last_x = x
self.last_y = y
if not self.exceeded_threshold:
if abs(dx) > DRAG_THRESHOLD_PX or abs(dy) > DRAG_THRESHOLD_PX:
self.exceeded_threshold = True
return self.exceeded_threshold
def was_click(self) -> bool:
"""Call on release — True means the gesture was a click, not a drag."""
return not self.exceeded_thresholdUsage rules:
LMB: if
was_click()→ fire selection pick at release position. If threshold exceeded → it was an orbit drag, do not select.RMB: if
was_click()→ show context menu (seelocal-viewer). If threshold exceeded → it was a look/dolly, suppress menu.MMB: always pan (no click action on middle button).
Transform gizmo: if the press begins on or near a selected transform handle/pivot, enter transform-drag mode for the whole mouse-down and suppress orbit and click-pick on release.
Use the same coordinate space passed to the camera helper. Local and Tauri pointer events should be mapped through the letterboxed image rect first, so the camera sees render-pixel coordinates.
Use a 1 px threshold for precise desktop input. Increase to 8–10 only for touch-first input.
For browser-streamed React apps, a 4–6 px threshold is often more tolerant of WebRTC/browser pointer jitter around click selection.
Gizmo Hit Testing And Input Ownership
For lightweight local viewers that combine a SceneView overlay with app-owned
mouse callbacks, keep a single input owner for each mouse-down. Project the
selected prim pivot into the visible rendered image rectangle and treat a press
near that point as transform intent; otherwise route the press through normal
camera/pick behavior.
def project_world_to_viewport(point, view, proj, image_rect, widget_origin):
p = np.array([point[0], point[1], point[2], 1.0], dtype=np.float64)
clip = proj @ (view @ p)
if abs(float(clip[3])) < 1e-8:
return None
ndc = clip[:3] / clip[3]
if not np.isfinite(ndc).all() or ndc[2] < -1.0 or ndc[2] > 1.0:
return None
off_x, off_y, draw_w, draw_h = image_rect
x = widget_origin[0] + off_x + (ndc[0] * 0.5 + 0.5) * draw_w
y = widget_origin[1] + off_y + (1.0 - (ndc[1] * 0.5 + 0.5)) * draw_h
return float(x), float(y)
def pointer_is_near_selected_gizmo(screen_x, screen_y, selected_pivot):
projected = project_world_to_viewport(selected_pivot, view, proj, image_rect, widget_origin)
if projected is None:
return False
dx = screen_x - projected[0]
dy = screen_y - projected[1]
return dx * dx + dy * dy <= 160.0 * 160.0This fallback does not replace a real axis-handle manipulator when the shell has one. It ensures the viewer still satisfies direct manipulation when a standalone ovui build displays the gizmo but does not deliver lower-level handle drag events into the app's transform model.
Sanitize State
NaN camera state poisons projection, picking, overlays, and ovrtx writes.
MIN_DISTANCE = 0.01
MAX_ELEVATION = math.pi / 2 - 0.01
def sanitize_camera(camera) -> None:
if not math.isfinite(float(camera.azimuth)):
camera.azimuth = -1.5708
if not math.isfinite(float(camera.elevation)):
camera.elevation = 0.0
camera.elevation = max(-MAX_ELEVATION, min(MAX_ELEVATION, camera.elevation))
try:
camera.distance = max(MIN_DISTANCE, float(camera.distance))
except Exception:
camera.distance = MIN_DISTANCE
if not math.isfinite(camera.distance):
camera.distance = MIN_DISTANCE
target = np.asarray(camera.target, dtype=np.float64)
if target.shape != (3,) or not np.isfinite(target).all():
target = np.array([-74.5, 103.0, -22.5], dtype=np.float64)
camera.target = targetCall this before handling input and before generating matrices.
Row-Major ovrtx Camera Matrix
ovrtx consumes USD GfMatrix4d row-vector layout:
M = np.eye(4, dtype=np.float64)
M[0, :3] = right # X basis
M[1, :3] = up # Y basis
M[2, :3] = -forward # camera local -Z looks forward
M[3, :3] = eye # translationFor Y-up scenes:
forward = target - eye
forward /= np.linalg.norm(forward)
world_up = np.array([0.0, 1.0, 0.0])
right = np.cross(forward, world_up); right /= np.linalg.norm(right)
up = np.cross(right, forward)Use world_up = [0, 0, 1] for Z-up scenes. The common mistake is putting axes in columns, which puts the camera inside or under geometry.
If your camera helper returns a GL view matrix, convert it:
world_matrix = np.ascontiguousarray(np.linalg.inv(view_matrix).T, dtype=np.float64)Write To ovrtx
xform = np.ascontiguousarray(camera.get_camera_xform(), dtype=np.float64)
if xform.shape == (4, 4) and np.isfinite(xform).all():
renderer.write_attribute(
prim_paths=["/Session/Cameras/Main"],
attribute_name="omni:xform",
tensor=xform.reshape(1, 4, 4),
semantic=ovrtx.Semantic.XFORM_MAT4x4,
prim_mode=ovrtx.PrimMode.CREATE_NEW,
)Use the actual inline session camera path from stage-loading.
Fit Camera To Stage
Search for authored UsdGeom.Camera prims first. If the app policy allows
stage cameras, copy the selected authored camera's focal length, apertures,
clipping range, projection, and transform into the viewer camera before falling
back to bounds fitting.
If no authored camera exists, compute a world bbox via stage-hierarchy, then
set target to the bbox center and distance from max dimension and focal
length/field of view. Choose the initial view for the kind of stage:
For general object/prop scenes, a three-quarter orbit view is usually safe.
For Z-up exterior or architectural scenes, avoid a steep roof-down first view. Prefer a lower elevation overview so walls, entrances, windows, racks, and scene context are visible.
For very wide or flat scenes, increase distance and lower elevation rather than aiming straight down.
When the first view matters, render 4-6 candidate camera poses, build a small contact sheet, and choose the least occluded view. Candidate sets should vary azimuth, elevation, and distance while keeping the same bbox target.
Inline Local Camera Gizmo
For local ovui, build the gizmo directly in the viewport ZStack with omni.ui_scene.SceneView; do not use the streaming server's headless overlay compositor.
class OverlayCamera(sc.AbstractManipulatorModel):
def get_as_floats(self, item):
if item == self.get_item("projection"):
f = 1.0 / math.tan(math.radians(30.0))
return [f,0,0,0, 0,f,0,0, 0,0,-1.002,-1, 0,0,-0.2002,0]
if item == self.get_item("view"):
return [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,-4,1]
return []
class OrbitRingManipulator(sc.Manipulator):
def __init__(self, on_orbit_delta, pixel_scale: float, **kwargs):
super().__init__(**kwargs)
self._on_orbit_delta = on_orbit_delta
self._pixel_scale = float(pixel_scale)
self._drag = sc.DragGesture(on_changed_fn=self._on_changed, on_began_fn=lambda _s: self.invalidate(), on_ended_fn=lambda _s: self.invalidate())
self._drag.mouse_button = 0
def on_build(self):
for axis, color in enumerate((0xD134BCFF, 0x9EFF6BFF, 0x94C7FFFF)):
pts = [([math.cos(i*math.tau/72), math.sin(i*math.tau/72), 0], [math.cos(i*math.tau/72), 0, math.sin(i*math.tau/72)], [0, math.cos(i*math.tau/72), math.sin(i*math.tau/72)])[axis] for i in range(73)]
for a, b in zip(pts, pts[1:]):
sc.Line(a, b, color=color, thickness=3.0, intersection_thickness=18.0, gesture=self._drag)
sc.Screen(gesture=self._drag)
def _on_changed(self, sender):
payload = getattr(sender, "gesture_payload", None)
if payload is not None:
dx_ndc, dy_ndc = payload.mouse_moved
self._on_orbit_delta(float(dx_ndc), float(-dy_ndc), self._pixel_scale)Toggle the gizmo from a header button. DragGesture instances must be created once and reused.
Gotchas
Use
omni:xform, not authored USDxformOp:*, for live ovrtx camera updates.Use
Semantic.XFORM_MAT4x4andPrimMode.CREATE_NEW.Skip writes if the 4x4 matrix is non-finite.
Clamp local mouse coordinates through the visible rendered image rect so letterboxing does not skew orbit/pick math.
Alt+Modifier Input Mapping (Desktop Apps)
For Qt or native windowing with modifier keys:
def on_mouse_press(event):
if event.modifiers() & Alt:
if event.button() == LeftButton:
mode = "orbit"
elif event.button() == MiddleButton:
mode = "pan"
elif event.button() == RightButton:
mode = "dolly"
elif event.button() == RightButton:
mode = "fly_look" # enter RMB+WASD fly mode
elif event.button() == LeftButton:
mode = "select" # click-to-select (fire on release if no drag)WASD Fly Mode
When the right mouse button is held, enable keyboard-driven fly movement:
class FlyState:
def __init__(self):
self.keys_held: set[str] = set()
self.speed = 2.0 # units/second, adjustable via scroll wheel while RMB held
def update(self, camera, dt: float):
if not self.keys_held:
return
forward = camera.forward_vector()
right = camera.right_vector()
up = camera.world_up # [0,0,1] for Z-up, [0,1,0] for Y-up
move = np.zeros(3, dtype=np.float64)
if "w" in self.keys_held: move += forward
if "s" in self.keys_held: move -= forward
if "d" in self.keys_held: move += right
if "a" in self.keys_held: move -= right
if "e" in self.keys_held: move += up
if "q" in self.keys_held: move -= up
norm = np.linalg.norm(move)
if norm > 1e-6:
move = move / norm * self.speed * dt
camera.target += move
# eye moves with target (no orbit change)While in fly mode, mouse movement rotates the camera view (adjust azimuth/elevation without changing distance). Scroll wheel adjusts fly speed.
Generated Module Checklist - camera.py
[ ]
OrbitCamera.__init__(width: int, height: int)[ ]
OrbitCamera.on_mouse_button_down(x: float, y: float, button: int) -> None[ ]
OrbitCamera.on_mouse_button_up(x: float, y: float, button: int) -> bool[ ]
OrbitCamera.on_mouse_move(x: float, y: float) -> None[ ]
OrbitCamera.orbit_delta(dx: float, dy: float, scale: float = 1.0) -> None[ ]
OrbitCamera.on_scroll(delta: float) -> None[ ]
OrbitCamera.get_camera_xform() -> np.ndarray[ ]
OrbitCamera.get_view_matrix() -> np.ndarray[ ]
OrbitCamera.get_projection_matrix(aspect_ratio=None) -> np.ndarray[ ]
OrbitCamera._sanitize_state() -> None[ ] Press/release state distinguishes click from drag using the 1 px threshold.
[ ] Matrix rows are right, up, negative-forward, translation.
Generated Module Checklist - server input routing
[ ]
MessageHandler.on_input(event) -> None[ ] Mouse move calls
camera.on_mouse_move(x, y).[ ] Left-button release calls
camera.on_mouse_button_up(..., 0)and picks only when it returnsTrue.[ ] Middle-button input maps to camera button
1.[ ] Right-button input maps to camera button
2.[ ] Wheel input calls
camera.on_scroll(delta).[ ] Browser pointer events are not duplicated as JSON messages.
See also: viewer-input-routing, local-viewer, stage-loading, stage-hierarchy, prim-info-display, viewport-overlays.
Requirements and compatibility
Written for: OpenAI Codex
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.
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
- OpenAI (Official)
- Distributed by
- OpenAI
- Source
- openai/plugins · plugins/nvidia/skills/omniverse-realtime-viewer · commit d420d13
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (written by AutoGineer)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Omniverse or OpenAI.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download omniverse-realtime-viewer.zip