ovclash Technical Guide#

The Technical Guide explains how ovclash works inside. It covers how ovclash is built, how each backend runs the clash pipeline, where the code lives, and which rules keep the results correct and fast. ovclash is the standalone clash-detection product in this repository. It ships as a Python wheel and as a C/C++ SDK archive.

ovstage, the runtime through which ovclash reads USD, is the product backend and the optimization target. The OpenUSD backend is an unpublished parity reference. With the default OPENUSD matrix decomposition mode, its consumer-visible results must match ovstage, except for the differences listed in Backends.

Who should read it#

Read this guide when you change ovclash itself: the C++ runtime, the C ABIs (C application binary interfaces), the Python bindings, the build and packaging scripts, the samples or the tests. It assumes that you can build ovclash from a source checkout, as Local Development describes.

If you only use ovclash, start with the Developer Guide, the C API reference and the Python API reference instead.

Read it together with:

  • Contributing: what a change contains, the validation it needs, and the license and documentation rules;

  • AGENTS.md in the ovclash/ folder: the engineering constraints and the build, package and validation entry points;

  • the C++ code style and the Python code style;

  • the documentation index, docs/README.md: every page, and which pages ship in the SDK archive.

Sources of truth#

  • When this guide and the code disagree, the code is right. The public headers and the Python docstrings state the contract.

  • The guide keeps no API inventory. Doxygen, the C/C++ documentation generator, generates the C API reference from the headers. Autodoc, the docstring reader of the Sphinx documentation generator, generates the Python API reference from the docstrings.

  • Every C entry point of the canonical API returns an ovclash_result_t status. The three string getters ovclash_get_result_string, ovclash_get_last_error and ovclash_get_version_string are the only exceptions.

Topic pages#

Page

What it covers

Architecture overview

The API surfaces and features, the runtime mental model, the source tree, the Python package layering and native library loading, how to add functionality, and a glossary.

Build system and packaging

Build-script rules, dependency staging and overrides, CMake targets, what each backend compiles, Visual Studio debugging, local ovstage source builds, the SDK install tree, the Python wheel, build provenance and packaging policy.

Runtime architecture

How the OpenUSD and ovstage backends implement the canonical C ABI: stage populations, transform reads, sample schedules, lifecycle locking and overlap report order.

Suite runtime and fetch

The Suite runtime wrapper and the fetch-and-save driver: batch limits, threading, failure handling, clash-state reconciliation and write performance.

Persistence, export and legacy migration

The SQLite and JSON directory stores, schema versions, native JSON and HTML export, and legacy .clashDetection containers.

Sample internals

The Suite, canonical and legacy samples: their structure, how the packages ship them and how test_samples checks them.

ovRTX clash sample app

The developer viewer on ovRTX, NVIDIA’s RTX rendering runtime: launching, setup, version pins, validation, debugging and the implementation rules of its scene backends.

Testing and validation internals

What the native and Python tests cover, validation scheduling and sharding, the native Suite test build, and the KPI (performance benchmark) harness code and baseline collection.

Engine performance internals

Hot-path rules for dynamic runs, the rebuild of the bounding volume hierarchy (BVH), how to measure dynamic-run cost, instanced geometry sharing, parallel cooking and narrow phase, narrow-phase reuse and duplicate contacts.

Transform evaluation internals

Matrix decomposition parity, the numeric transform reference, raw transform classification, matrix windows and prefetch, and transform binding.

ovstage source extraction internals

Instancing identity, static source extraction, Earliest-topology recovery, subcomponent kinds and source diagnostics.

Generated outputs#

Every generated, local-only output lives under _build/, which is never itself a CMake build tree. Backends and trees in Local Development describes the layout of the compile, install, distribution, validation and dependency trees.

Dependency downloads#

The build stages its dependencies from Packman, NVIDIA’s package fetcher, and the pinned ovstage wheel under _build/deps/. Unless an override names a wheel you already have, the build downloads the exact platform wheel, ovstage==<OVSTAGE_VERSION>, anonymously from the configured package index (public PyPI by default) into the project-local _build/deps/downloads/ovstage cache. Every build checks the wheel against its committed SHA-256 pin in OVSTAGE_SHA256SUMS.

  • Dependency staging gives the order in which the build selects the ovstage wheel, the pin check and the checks of the include tree of the ovx headers.

  • Dependency sources in Local Development lists what the first build downloads and the overrides a contributor sets.

Installed packages#

A build installs the SDK install tree into _build/install/<backend>, and packaging writes the SDK archive and the Python wheel to _build/dist/<backend>.

Package

What sets it apart

Details

SDK install tree

An install tree keeps the native test programs, and an ovstage install tree also the complete ovstage runtime closure, for native tests and diagnostics.

SDK install tree

SDK archive

No archive ships the native test programs or their symbols. The ovstage archive leaves out the ovstage loader, the runtime and their native closure. It pins ovstage==<pin> in requirements.txt and describes that runtime in ovclash-runtime-dependencies.json and ovclash-runtime-closure.json.

SDK install tree

Python wheel

The ovstage wheel depends on the same public ovstage package at the pinned version.

Python wheel

A consumer of the SDK archive installs requirements.txt into the interpreter its tools use. find_package(ovclash) selects that interpreter through OVCLASH_PYTHON_EXECUTABLE, and OVCLASH_OVSTAGE_PACKAGE_DIR names the package directory directly. CMake variables in the C/C++ Quickstart defines both variables, with their defaults and meanings. Installing the ovstage runtime there gives the consumer steps.

Numbered section references#

A released CHANGELOG.md entry cites this guide by an old section number. This table maps that number to the page that now covers it.

Section number

Page

14.1

Overlap report ordering in Runtime architecture