Interactive rigid-body physics simulation driving GPU ray-traced rendering. Uses ovphysx for CPU-mode physics and ovrtx for RTX rendering, connected through their shared DLPack tensor interface.
Each frame:
- A heavy dynamic capsule is driven back and forth by a velocity write.
ovphysx_stepsimulates contacts with the lighter dynamic objects.- World-space poses are read back via
ovphysx_read_tensor_binding. - Poses are pushed into the renderer via
ovrtx_set_xform_pos_rot_scale. ovrtx_step+ Vulkan/CUDA interop presents the frame.
- NVIDIA RTX GPU with a recent driver
- CUDA Toolkit 12.x
- Vulkan SDK (provides
glslc) - CMake 3.18+
- C++17 compiler (GCC 11+ / MSVC 2019+)
- Git
Download the pre-built tarball for your platform from the NVIDIA-Omniverse/PhysX releases page and extract it somewhere convenient, e.g.:
Linux
# Example: ovphysx-linux-x86_64-0.2.8
tar -xf ovphysx-linux-x86_64-0.2.8.tar.gz -C ~/localWindows
# Example: ovphysx-windows-x86_64-0.2.8
Expand-Archive ovphysx-windows-x86_64-0.2.8.zip -DestinationPath C:\localgit clone https://github.com/JohnTwenty/ovx-mockup
cd ovx-mockup
git submodule update --init --depth=1The submodule (third-party/ovrtx, pinned to v0.2.0) provides two things:
- The cmake module that auto-downloads the ovrtx pre-built binary at configure time.
- The Vulkan/CUDA helper sources shared with the
vulkan-interopexample.
The cmake configure step downloads the ovrtx pre-built binary from GitHub
Releases automatically into _deps/. No manual step is needed if your
machine can reach github.com.
If the download is blocked (corporate proxy, air-gap network): download
the zip manually from the
ovrtx releases page,
extract it, and pass the path with -DOVRTX_DIR=... (see below).
| Platform | Package filename |
|---|---|
| Linux x86_64 | ovrtx@0.2.0.manylinux_2_35_x86_64.zip |
| Linux aarch64 | ovrtx@0.2.0.manylinux_2_35_aarch64.zip |
| Windows x86_64 | ovrtx@0.2.0.windows-x86_64.zip |
cmake -B build \
-DCMAKE_PREFIX_PATH=/path/to/ovphysx-linux-x86_64-0.2.8/ovphysx
cmake --build build --parallelcmake -B build `
-DCMAKE_PREFIX_PATH="C:\local\ovphysx-windows-x86_64-0.2.8\ovphysx"
cmake --build build --config ReleasePass both package paths so cmake never attempts a network download:
cmake -B build \
-DCMAKE_PREFIX_PATH=/path/to/ovphysx-linux-x86_64-0.2.8/ovphysx \
-DOVRTX_DIR=/path/to/ovrtx@0.2.0.manylinux_2_35_x86_64
cmake --build build --parallelOn Windows:
cmake -B build `
-DCMAKE_PREFIX_PATH="C:\local\ovphysx-windows-x86_64-0.2.8\ovphysx" `
-DOVRTX_DIR="C:\local\ovrtx@0.2.0.windows-x86_64"
cmake --build build --config Release-DOVRTX_DIR tells cmake where to find the pre-extracted ovrtx package.
ovrtx_fetch() detects it via find_package and skips the download.
Other dependencies (glfw3, glm, volk, unordered_dense) are fetched from
GitHub at configure time; if those are also blocked, install them via your
system package manager or vcpkg and cmake will find them automatically.
./build/ovrtx-interop-physx # Linux
.\build\Release\ovrtx-interop-physx.exe # WindowsThe binary expects physics_boxes.usda and compiled shaders in the same
directory; CMake post-build commands deploy them automatically.
Optional arguments:
ovrtx-interop-physx [usd_file] [render_product] [up_axis] [duration_s]
ovx-mockup/
├── CMakeLists.txt main build file (~120 lines)
├── src/
│ └── main.cpp application code (physics + render loop)
├── assets/
│ └── physics_boxes.usda USD scene (rigid bodies + lights + camera)
└── third-party/
└── ovrtx/ git submodule @ v0.2.0
examples/c/
cmake/ovrtx.cmake fetches pre-built ovrtx binary
vulkan-interop/
shaders/ GLSL sources compiled at build time
src/ Vulkan/CUDA helpers (referenced, not copied)
The only files this project owns are CMakeLists.txt, src/main.cpp, and
assets/physics_boxes.usda. Everything else is either fetched at build time
or referenced from the submodule.