Skip to content
Machine Learning
Skill

/spg

Sensor Processing Graphs: run your own GPU code as a pass over RTX render outputs. Covers the three-file node contract in CUDA and Slang, wiring a graph in USD, built-in nodes, cross-frame state, sensor composites, ray generation, scene queries and diagnosis. Use when the user

From plugin
ovrtx
27041 skills

Claude Code

$ npx -y skills add nvidia-omniverse/ovrtx --skill spg --agent claude-code

SKILL.md

spg.SKILL.md
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: CC-BY-4.0 AND Apache-2.0
name: spg
description: >
  Sensor Processing Graphs: run your own GPU code as a pass over RTX render outputs.
  Covers the three-file node contract in CUDA and Slang, wiring a graph in USD, built-in
  nodes, cross-frame state, sensor composites, ray generation, scene queries and
  diagnosis. Use when the user asks to add SPG to a scene, write or debug an SPG node or
  launch script, work with `.cu.lua` or `.slang.lua`, author `info:spg:sourceAsset`,
  `omni:rtx:aov`, `orderedVars` or a `spg:` built-in node, post-process an AOV on the GPU,
  read a lidar or radar point cloud in a kernel, trace the scene from a node, or work out
  why an SPG output is empty or black.
license: CC-BY-4.0 AND Apache-2.0
author: NVIDIA ovrtx
tags:
  - ovrtx
  - spg
  - cuda
  - slang
  - usd
tools:
  - Read
  - Grep
  - Shell
  - Edit
  - Write

Sensor Processing Graphs

When to Use

Any task where the user's own GPU code has to run inside the renderer, over the images or sensor data the renderer produces. Trigger vocabulary: SPG, `.cu.lua`, `.slang.lua`, `info:spg:sourceAsset`, `subIdentifier`, `omni:rtx:aov`, `orderedVars`, `cuda.kernel`, `slang.compute`, `slang.dispatch`, `spg:rtx.spg.stdlib/...`, "post-process the AOV", "custom kernel on the render output", "my SPG AOV is black". Not this skill: reading a finished AOV back on the host, which is `reading-render-output`.

Task → Sections

Read **The Model**, **Instructions** and **The Traps** for any task. Then only what the row names.

| The user asks for | Also read | |---|---| | A new node that transforms an AOV | The Three Files, Choosing a Backend, Values, Resources, Launch Geometry | | Wiring an existing node into a scene | Wiring the Graph | | A common operation with no code | Built-In Nodes | | A node that remembers a previous frame | Cross-Frame State | | Data built in Lua on the GPU | Uploading Data | | Retuning a value without reloading | Runtime Changes | | Lidar or radar point cloud input | Sensor Composites | | A node that traces the scene | Ray Generation | | Pre-compiled `.ptx` / `.slang-module` / `.spv` | Pre-Compiled Sources | | A node that reads its camera, a prim of the scene, or its product | Scene Queries | | An output that is empty, black or wrong | Troubleshooting |

Prerequisites

  • ovrtx 0.4 or later. SPG is enabled by default.
  • A working stage, camera RenderProduct and step loop; Slang requires Vulkan (the default).
  • CUDA or Slang/HLSL compute and USD authoring are assumed; this skill maps them onto SPG.

Inputs

The user's scene file, their kernel if they have one, and which backend they want. If they have not said, choose by what the node needs: **Choosing a Backend**.

**Every `examples/` and `docs/` path below is relative to the ovrtx public root**: `rendering/ovrtx/public/` in the kit repository, the package root in an installed ovrtx.

Precedence when facts conflict: the code under `examples/python/spg-*` first, then the pages under `docs/spg/`, then this skill. Every code reference below names a snippet marker in a runnable example, a pair of comments `// [snippet:name]` and `// [/snippet:name]` (`--` in `.lua`, `#` in `.py` and `.usda`); read the file between the markers, not memory.

The Model

SPG runs a directed graph of GPU nodes inside the renderer's frame, over its Arbitrary Output Variables (AOVs). Everything stays on the GPU.

**A node is three files that share a name**: the GPU code, `Kernel.cu` or `Kernel.slang`; the launch script beside it, `Kernel.cu.lua` or `Kernel.slang.lua`, which validates inputs, describes outputs and returns the launch configuration; and the USD shader definition, `Kernel.usda`, which declares the ports and points at the GPU source.

Three facts drive most mistakes:

1. **The launch script is found by appending `.lua` to the source asset path**, and cannot be redirected. `GrayscaleKernel.cu` pairs with `GrayscaleKernel.cu.lua`. 2. **The launch script's function runs once per rendered frame**, on the CPU, before the GPU work, and sees resource *descriptors* (shape, dtype, rank), never pixel or point *data*. 3. **Execution is driven backwards from what is asked for.** A node whose output nothing consumes and which publishes no RenderVar never runs at all.

Instructions

1. **Decide built-in or custom.** If a stdlib node covers the operation, author only a USD Shader prim and write no code: **Built-In Nodes**. Do not invent node IDs. 2. **Write the GPU code**, one entry point, named the same in all three files and `extern "C"` on CUDA so the symbol survives. 3. **Write the launch script**, one global Lua function of that name taking `(inputs, outputs)`, assigning a descriptor to every declared output, which is otherwise never backed, and returning a launch configuration. 4. **Write the shader definition**: `info:implementationSource = "sourceAsset"`, `info:spg:sourceAsset` at the GPU file, `subIdentifier` naming the entry point, and one `opaque inputs:`/`outputs:` port per resource. Details in **The Three Files**. 5. **Wire it into the scene**: **Wiring the Graph**. 6. **Verify by content, not by exit code.** A node that never ran leaves an AOV of zeros, so a clean run proves nothing. Assert something only your node could have produced, such as `R == G == B` in every pixel of a grayscale output. If you cannot run anything, hand the user the command and the check rather than reporting the work as verified.

The smallest complete node, in all three files:

> **Source (kernel):** `examples/python/spg-grayscale/GrayscaleKernel.cu` snippet `grayscale-kernel-template` > **Source (launch script):** `examples/python/spg-grayscale/GrayscaleKernel.cu.lua` snippet `grayscale-launch-template` > **Source (shader definition):** `examples/python/spg-grayscale/GrayscaleKernel.usda` snippet `shad

Read more
@nvidia-omniverse
Ships withovrtx

ovrtx is a C and Python library for embedding Omniverse RTX sensor simulation and visualization directly into applications.

Stars on GitHub

Momentum

stars in total
270
Star history of nvidia-omniverse/ovrtx on GitHub, a chart by star-history.com

Other skills on ovrtx.

application-flow

application-flow

High-level overview of a typical ovrtx application lifecycle. Use when user asks how to structure an ovrtx program, what the main…

async-operations

async-operations

Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async…

attribute-bindings

attribute-bindings

Replacing persistent ovrtx attribute bindings with reusable ovstage queries for repeated writes or maps. Use when user asks about…

binding-materials

binding-materials

Binding materials to prims at runtime. Use when user asks to assign a material, change a material, set material binding, or swap…

camera-outputs-rt2

camera-outputs-rt2

Available camera render outputs for Real-Time Path Tracing (RT2) mode. Use when user asks what AOVs/render vars are available,…

cloning-prims

cloning-prims

Cloning USD subtrees to create copies at new paths. Use when user asks to clone, duplicate, copy a prim, or create instances of…

More skills from other plugins.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

mlflow4d29k
@mlflow@mlflowInstall Skill
hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills2w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast8d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai5d7.3k
@civitai@civitaiInstall Skill

Questions about spg.

Which coding agents can use spg?
spg installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.