Python: Planet System#

Animated planetary system demo using ovrtx Python bindings. Demonstrates loading a USD scene and injecting additional geometry via add_usd_reference_from_string, using bind_attribute/map_attribute for zero-copy transform updates, and GPU-accelerated animation with Warp kernels. Planets orbit a central cube with hierarchical animation (orbit parent rotation + planet self-spin).

By default, rendered frames are streamed to rerun.io for live visualization. Frames can also be saved to disk as PNGs.

“Create a Python animation example that loads a base scene, injects generated runtime geometry, creates persistent transform bindings, updates many transforms efficiently each simulation step using CPU or GPU compute, renders frames, optionally streams or saves them, and cleans up bindings explicitly.”

Planet system example output

Prerequisites#

  • Python 3.10–3.13

  • uv

Running#

uv run main.py

Options#

Flag

Description

--gpu

Device on which to copy animated transforms <cpu|gpu> Default: cpu

--num-planets N

Number of planets, 1–1000 (default: 36)

--png

Save rendered frames as PNGs to _output/

--no-rr

Disable rerun.io streaming

--log

Enable carb log file in _output/

The first time you run the example, the driver compiles and caches shaders. Subsequent runs are much faster.