Backends#
ovclash builds one shared library, ovclash, against one of two scene-access
backends. The backend is chosen at build time.
Backend |
Role |
|---|---|
ovstage |
The product backend. It reads the scene through ovstage, a separate runtime package. Every released wheel and SDK archive is an ovstage build. |
OpenUSD |
A permanently retained reference implementation on the OpenUSD library. It is never published. |
The OpenUSD build gives the same public contract a second, independent implementation, which runs against the same tests. Every ovclash CI pipeline builds and tests it. Its wheel and SDK archive are developer artifacts, and release verification rejects them.
Parity requirement. For the same stage and settings, the two backends must report the same overlap pairs, counts, face indices, distances and depths. This holds with ovstage in its default OPENUSD matrix-decomposition mode. The only exceptions are report order and the differences recorded on this page. Any other difference is a parity defect: correct the ovstage result, and do not change the OpenUSD reference to make a comparison pass.
The OVCLASH matrix-decomposition mode is an opt-in ovstage mode for comparison. It uses the original ovclash decomposition math. It can change clash membership and report payloads. It keeps ovstage scene access and does not switch backends. See Comparing ovstage matrix decompositions.
The consumer documentation describes the ovstage backend only. This page is the one place that describes OpenUSD behavior.
Selecting a backend#
You do not select a backend at run time. It is a compile-time property of the library you loaded:
The CMake option
OVCLASH_OVSTAGE_ONLYfixes it at build time.build_ovstage.*andbuild_openusd.*set the option for you. They install into_build/install/ovstage/and_build/install/openusd/; see Backends and trees.No environment variable or API call switches a library that is already loaded. To use the other backend, load the other library.
For the Python packages, set
OVCLASH_SUITE_LIBorOVCLASH_LIBto the library’s absolute path before the first import.OVCLASH_BACKENDandovclash_suite.ClashDetection(backend=...)look like backend switches and are not. Environment variables describes both.
Variable |
Values |
Required |
Default |
Effect |
|---|---|---|---|---|
|
|
No |
|
|
|
The absolute path of a native library |
With the SDK archive’s Python packages |
Unset: the wheel loads the library it bundles |
Both Python packages load this library. It wins when both variables are set. A relative path raises |
|
The absolute path of a native library |
As |
Unset |
Read when |
The two backends link OpenUSD, the library that reads USD (Universal Scene Description) scenes, differently:
ovstage has no direct OpenUSD linkage. The build forces
OVCLASH_USE_NAMESPACED_USDoff for it and prints itsUSD modeasnone. Scene access goes through the ovstage API.OpenUSD requires
OVCLASH_USE_NAMESPACED_USDon, and links namespaced, Python-free OpenUSD. Its wheel and SDK archive bundle that OpenUSD closure; the ovstage packages depend on the pinnedovstagedistribution instead.
To ask a loaded library which backend it is, call backend_info;
Identifying the loaded library describes
the fields.
Backend markers lists the files that record
the backend in an install tree and in each package, and
Package identity gives the version, contents
and publication status of each backend’s packages.
USD coexistence describes the plugin-path variables that
matter when another OpenUSD build shares the process.
What the backend changes#
This table lists the recorded divergences that a caller can observe. Equal aggregate clash counts alone do not prove that per-pair payloads match.
Area |
Behavior |
Consequence |
|---|---|---|
Overlap-report buffer ownership |
ovstage hands out borrowed views into context-owned storage. The OpenUSD engine allocates buffers per report, and |
Release every report, and never hold one across a pipeline step or run. That is correct on both backends. On OpenUSD a skipped release leaks, and releasing the context does not recover the buffers. |
Cancellation scope |
ovstage’s cancel flag is a per-context atomic. OpenUSD’s is a process-global volatile flag; the backend has no per-context cancellation. |
On OpenUSD, cancelling one context can abort another context’s run in the same process, and a set flag makes later |
Out-of-memory flag |
ovstage records an allocation failure per context, and the call that hit it fails with |
On OpenUSD, check |
Async progress polling |
ovstage returns a locked snapshot clamped to the counted work. The OpenUSD engine reads its progress counters without synchronization. The Suite API, the product layer, forwards |
An OpenUSD |
Async launch and completion |
OpenUSD rejects |
Open the stage before you launch. Decide completion from |
Pipeline status fidelity |
On ovstage, |
On OpenUSD a failed phase can still report success and leave incomplete results. Cross-check |
Uniform per-point widths |
ovstage collapses a per-point width array whose values are all equal back to that single width. The OpenUSD engine keys off the array length alone and reports |
|
Point size changed between the steps of one run |
ovstage tests and reports a new |
Results differ for that run’s later samples. Change the point size between runs, not between steps. |
Subcomponent filtering changed between the steps of one run |
ovstage fixes the |
Results differ for the rest of that run. Change the setting between runs, not between steps. |
Threading controls |
|
Report order only. Counts, membership and per-pair data do not change on either backend. See Overlap ordering is not contractual. |
Instanced point clouds |
ovstage sees a |
Results differ for callers that enable |
Unresolved transform animation |
ovstage sometimes cannot prove from authored data whether a mesh’s transform is animated, for example when an active transform operation has no initial value. It then treats the mesh as non-static. |
With |
Cooked-mesh counter |
|
A failed cook lowers the count only on ovstage. Comparing it with |
|
ovstage resolves |
On OpenUSD, payloads, references and MDL (Material Definition Language) assets on a Nucleus host, an Omniverse asset server, fail to load, so their geometry is missing from the results. Use local copies of those assets. On both backends the stage itself must be a local file. |
Query memory |
On ovstage, |
In a long-lived OpenUSD process, reset the context between queries to return memory. |
The C API Reference documents smaller per-call differences on each function. Examples:
which rejections record last-error text;
what
ovclash_set_sort_modeandovclash_set_point_clouds_experimentaldo on each backend. On OpenUSD the latter selects another multithreaded point-vs-mesh path when point clouds are enabled and multithreading is active; ovstage stores it and never reads it;that ovstage ignores the
stageIdargument ofovclash_set_scope;which steps a duplicate-only run (
ovclash_set_only_find_duplicates) skips. OpenUSD stops its narrow phase, the exact test of each candidate pair, after the duplicate test; ovstage skips the BVH, broad-phase and narrow-phase steps;when per-pair details go stale. OpenUSD reports them stale when a prim of the pair no longer exists (
... result details are stale because a prim of the pair no longer exists (stage replaced or prim removed); run the pipeline again). ovstage reports them stale when their mesh selection was replaced, by a new stage, the mesh-selection step of a new run or a failedovclash_get_prim_matrixread (... result details are stale because their mesh selection was replaced; run the pipeline again);the rejection text of
ovclash_create_overlap_meshes, which fails on both backends:ovclash_create_overlap_meshes: not supported by the ovclash OpenUSD backendon OpenUSD;that the Python
ClashRuntime.set_ovstage_dynamic_matrix_cache()raisesRuntimeErroron OpenUSD, which does not export the setter.
Mesh instancing is not a backend difference. On ovstage, expandInstanceProxies() replaces
each prototype-space mesh with one mesh per placement. Instanced meshes, including mesh-typed
instance roots and nested placements, are therefore collided at their world placements on both
backends. tests/python_tests/test_typed_instance_roots.py and
tests/python_tests/test_nested_instance_visibility.py cover these cases.
Threading controls on each backend#
None of the three controls changes which pairs overlap or what is reported about them;
testThreadingControlsDoNotChangeOverlapSet checks this on both backends.
Performance describes the product behavior and the
defaults.
Carbonite is NVIDIA’s plugin and runtime framework; its
carb.tasking scheduler is one of the worker sources that these settings choose between. Each
setting is optional and has the same type and fresh-context default on both backends.
Setting |
Type |
Default |
OpenUSD backend |
ovstage backend |
|---|---|---|---|---|
|
|
|
Forces serial execution. Multithreading also requires the Carbonite tasking interface. |
Forces serial execution of every parallel phase. Also disables sampled-matrix prefetch and the helper thread that populates static transforms. |
|
|
|
Selects between two Carbonite broad-phase and narrow-phase implementations. Matters only when multithreading is active. With multithreading active, the new manager returns overlaps in a run-dependent order. |
True selects Carbonite and its scheduler budget and ignores |
|
|
|
Read only by the legacy task manager, as its task split. The new manager takes its worker count from Carbonite. |
Read only by the |
After detection, the same controls choose the workers for native report extraction and for
fetch-and-save frame preparation on both backends. new_task_manager=false selects std::thread
workers bounded by nb_tasks on OpenUSD as well.
Not backend differences#
These behaviors are often mistaken for ovstage limitations. They are limitations of the standalone product and behave the same on both backends; see Limitations.
ovclash_create_overlap_meshesalways fails.ovclash_release_overlap_meshesandovclash_delete_duplicate_meshesare no-ops.ovclash_get_timeline_datareports a fixed host timeline.
To read the open stage’s own timeline, call ovclash_get_stage_timeline_data. Both backends
answer it from the stage’s root-layer metadata. A stage attached with
ovclash_ovstage_attach_stage reports its binding’s values. An attachment with a composition
also checks metersPerUnit and timeCodesPerSecond against that composition at its first
finite-time read.
Overlap ordering is not contractual#
The index passed to ovclash_get_overlap_data is an identifier, not a rank.
Overlap index order is not contractual
states the consumer rule and shows how to sort. The order differs between the backends, and on
OpenUSD it can differ from run to run (see Threading controls on each backend).
The order comes from the shared clash engine, so sorting in the OpenUSD adapter would not make the backends agree. A deterministic order would have to be a product feature, specified in the header and applied on both backends.
See also#
ovclash Overview – what ships, and how to query the loaded runtime.
Limitations – what the product does not do, with workarounds.
Asynchronous Pipelines – cancellation, progress and finish status of async runs.
Threading and Ownership – threading controls and result order.
C API Reference – per-function backend notes.