Application flow

From NVIDIA-Omniverse/ovrtx · View interactive version

Application flow is an AI agent skill from the GitHub repository NVIDIA-Omniverse/ovrtx. High-level overview of a typical ovrtx application lifecycle. Use when user asks how to structure an ovrtx program, what the main steps are, or how the pieces fit together.

How to use this skill

Skill file

Application Flow

When to Use

Use this skill when the user asks how to structure an ovrtx program, what the main steps are, or how the pieces fit together.

Inputs

Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.

Prerequisites

Instructions

  1. Identify the requested language and lifecycle stage before choosing an example.
  2. Read the referenced snippet that matches the requested stage and language.
  3. Preserve the normal ovrtx order: create or initialize the renderer, load or compose USD, step or wait for work, read outputs when needed, then release C resources explicitly.
  4. Apply the async, status-query, error-handling, and warmup skills when the workflow crosses those concerns.
  5. When changing code, run the narrow example or docs test that owns the snippet whenever practical.

Output Format

Scripts

This skill has no scripts.

Limitations

Overview

Every ovrtx application follows the same core lifecycle, whether in Python or C. This skill gives the high-level sequence and points to the detailed skill for each step.

Runtime Verification

Run the minimal example first when validating an ovrtx environment:

| Path | Command | Success signal |

|------|---------|----------------|

| Python minimal | cd examples/python/minimal && uv run main.py --png | Writes _output/render.png; compare it to img/example-minimal.jpg. |

| C minimal (Linux) | cd examples/c/minimal && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build && ./build/static/minimal | Writes out.png; compare it to img/example-minimal.jpg. |

| C minimal (Windows) | cd examples/c/minimal && cmake -B build && cmake --build build --config Release && .\build\static\Release\minimal.exe | Writes out.png; compare it to img/example-minimal.jpg. |

Do not claim runtime validation from parse-only checks, docs-only checks, or execution on a host without a supported RTX GPU and driver.

Key Concepts

The USD stage contains three prim types that work together to produce rendered output:

/World/Camera          ← Camera prim (sensor definition)
/Render/Camera         ← RenderProduct prim (render configuration)
    /Render/Camera/LdrColor  ← RenderVar prim (output variable)
    /Render/Camera/HdrColor  ← RenderVar prim (output variable)

Key implications for agents:

Lifecycle

1. Create renderer         → renderer-creation
2. Load USD scene(s)       → loading-usd
3. [Optional] Clone prims  → cloning-prims
4. Render loop:
   a. Write attributes     → writing-transforms, writing-attributes
   b. Step renderer        → stepping-and-rendering
   c. Read output          → reading-render-output
5. Cleanup

Python

Source: examples/python/minimal/main.py snippet create-renderer

Source (continued): examples/python/minimal/main.py snippet add-usd

Source (continued): examples/python/minimal/main.py snippet step

Source (continued): examples/python/minimal/main.py snippet read-render-output

For the full lifecycle with attribute writes, bindings, and cloning, compose the relevant skill snippets.

C

Source: examples/c/minimal/main.cpp snippet create-renderer

Source (continued): examples/c/minimal/main.cpp snippet load-usd-and-wait

Source (continued): examples/c/minimal/main.cpp snippet step-renderer

Source (continued): examples/c/minimal/main.cpp snippet fetch-results

Source (continued): examples/c/minimal/main.cpp snippet map-rendered-output-cpu

Source (continued): examples/c/minimal/main.cpp snippet unmap-and-cleanup

Key Differences: Python vs C

| Aspect | Python | C |

|--------|--------|---|

| Renderer lifetime | GC or explicit del | ovrtx_destroy_renderer() |

| USD loading | open_usd() blocks | ovrtx_open_usd_from_file() is async; must poll/wait |

| Step | step() returns outputs directly | ovrtx_step() + ovrtx_wait_op() + ovrtx_fetch_results() |

| Output access | var = render_vars["/Render/Camera/LdrColor"].map() | ovrtx_map_render_var_output() + ovrtx_unmap_render_var_output() |

| Result cleanup | Automatic (GC) | Must call ovrtx_destroy_results() |

| Error handling | Python exceptions (RuntimeError) | Check ovrtx_result_t.status + ovrtx_get_last_error() |

Troubleshooting

In Attached Mode (ovrtx 0.4+)

The renderer-owned scene operations described for standalone mode are deprecated in

0.4. For current code, manage scene data with ovstage, advance its write floor, attach

it to ovrtx, and call Python step(..., ordinal=...) (or the C attached update/step

pair). Keep the standalone flow only for compatibility work.

See docs/core/ovstage_integration.rst, skills/update-0_3-0_4-c/SKILL.md and skills/update-0_3-0_4-python/SKILL.md.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.