Key Concepts and Glossary#

This page explains how an ovclash query works and defines the terms that the other pages use. ovclash is a clash detection library: it finds the meshes of a USD scene that touch, interpenetrate or come closer than a tolerance, and the point clouds that hit a mesh. This page ships as docs/consumer/concepts.md in the SDK archive. Each Glossary entry links the page that owns the topic.

How a query flows#

stage -> scope (search sets A and B) -> settings (query kind, times) -> pipeline run
      -> overlaps and their records -> overlap reports
      -> clash records -> store or export          (Suite API only)
  1. Stage. A runtime queries one USD stage at a time. It opens the stage from a file on the local file system, or borrows a live ovstage Stage that your application owns. Opening or attaching a stage replaces the previous one and clears the scope.

  2. Scope. The scope names the prims to test, as two search sets of prim paths, A and B. Each path also covers its descendants. Set A alone is tested against itself; with both sets, A is tested against B. With both sets empty, the query covers the whole stage while full-scene traversal is on, as it is for a new runtime. Invisible prims are left out by default.

  3. Settings. The settings decide what the run looks for. Equal start and end times select a static query, which also searches for duplicate meshes. Different times select a dynamic query, which evaluates the stage at each sample time. A positive tolerance reports near misses (soft clashes) as well as touching and interpenetrating meshes (hard clashes). Point-vs-mesh queries are off by default; enabling them adds point-cloud results to the mesh results.

  4. Pipeline run. A run is a sequence of steps: find and cook the meshes, build the bounding volume hierarchy (BVH), run the broad phase and the narrow phase, and process the results. Run the steps one at a time, all at once, or asynchronously with progress and cancellation.

  5. Overlaps. The run reports each clashing pair of prims as one overlap. An overlap carries the two prim paths, a clash hash and one record per frame in which the pair overlaps. Each record holds the number of overlapping triangles or points, the time, the minimum distance and, when computed, the maximum local depth. Duplicate mesh pairs come in a separate list.

  6. Overlap reports. On request, a report returns the geometry behind one record: the face indices of each mesh, the intersection outline, or the indices of clashing points. Its buffers are borrowed from the runtime, so release the report before the next pipeline step or run.

  7. Clash records. The Suite API turns overlaps into persistent records under a named query. A ClashQuery holds the query definition, a ClashInfo one clash with its review fields and state, and a ClashFrameInfo one frame of that clash.

  8. Stores and exports. Fetch-and-save writes the clash records of a completed run into a store: a SQLite .ovclashdb file, a JSON directory store or a store of your own. When the store already holds results of the query, fetch-and-save matches each new result to its stored clash by the clash hash and, with state updates on, updates the clash states. Export turns rows of results into a JSON or HTML document.

Two API layers#

ovclash has two API layers in one native library. The Canonical API, <ovclash/ovclash.h> and the ovclash Python package, gives direct control of the engine: settings, scope, pipeline steps and results, steps 1 to 6 of How a query flows. The Suite API, <ovclash_suite/*.h> and the ovclash_suite Python package, is built on it. It runs the same steps and adds the product workflow of steps 7 and 8: named queries, stores, clash states and export. The canonical API calls a result an overlap; the Suite API calls its persisted form a clash. Same-named types in the two Python packages are different types, so pick one package and stay in it. choosing_an_api.md compares the layers.

Glossary#

Term

Meaning

Async pipeline

A pipeline run on a worker thread, behind a handle that you poll, finish or cancel (ClashRuntime.run_async(), ClashDetection.run_async_pipeline(), ovclash_run_pipeline_async). One async operation can be live per runtime. See async_pipelines.md.

Attached stage

A live ovstage Stage that your application owns and lends to a runtime instead of a file path (attach_ovstage(), ovclash_ovstage_attach_stage). The runtime reads the stage’s Default time as its owner populated it. Other times come from the owner through a callback, or, when the owner describes the stage’s composition, from private populations that the runtime evaluates itself without moving the stage. See ovstage_integration.md.

Backend

The scene-reading implementation that the native library was built with. Released packages use the ovstage backend. backend_info() and ovclash_get_backend_info() report it. See overview.md.

Bounding volume hierarchy (BVH)

A tree of nested bounding boxes over the meshes of a run. A pipeline step builds it, the broad phase queries it for candidate pairs, and a dynamic query rebuilds it for each sample time. See performance.md.

Broad phase

The pipeline step that pairs meshes whose world bounds overlap. Only these candidate pairs reach the narrow phase, so the bounds settings can add candidates but never decide a clash. See settings.md.

C ABI

The C interface of the native library, in the public headers that the SDK archive ships: the canonical <ovclash/ovclash.h> and the Suite <ovclash_suite/*.h>. ABI stands for application binary interface. See c_api_conventions.md.

Canonical API

The lower API layer, with direct control of the engine: the C ABI in <ovclash/ovclash.h> and the ovclash Python package (ClashRuntime, RunSettings, OverlapReport). See choosing_an_api.md.

Clash

Any result of a query: two meshes that touch, interpenetrate or come within the tolerance, a duplicate mesh pair, or a point cloud that hits a mesh. The Suite API’s OverlapType classifies a clash record as NORMAL (mesh-vs-mesh), DUPLICATE or POINT_CLOUD_MESH.

Clash hash

A hash of the two prim paths of an overlap, as two 64-bit words (clashHash, clash_hash). A store keeps it as the clash’s overlap_id: 0x followed by lowercase hexadecimal digits. Fetch-and-save matches results to stored clashes by query and clash hash. Key your own code on it or on name0 and name1, never on the overlap index. See developer_guide.md.

Clash Processor

The Python program of the clash_suite_api sample. Each run executes one query through the Suite API on a stage and search sets that its command line names, saves the results and exports reports, without code of your own. The run_custom_clash launchers set up a runtime and run it. See samples.md.

Clash record

The Suite API’s persisted form of one clash (ClashInfo): its detection results, six penetration-depth axes, and review fields such as state, priority, person in charge and comment. It belongs to a query and has one frame per sample. See persistence.md.

Clash state

The review state of a clash record: NEW, ACTIVE, APPROVED, RESOLVED, CLOSED or INVALID. With state updates on, the Python default, fetch-and-save sets a first detection to NEW, a re-detected clash to ACTIVE and a clash that is no longer detected to RESOLVED. An APPROVED clash stays APPROVED while its detected contents are exactly unchanged. Fetch-and-save never assigns CLOSED or INVALID. See persistence.md.

Compatibility package

omni.physxclashdetectioncore, which exposes the Suite API under the module names of the Kit extension, for code that you port from Kit. New code imports ovclash_suite. See kit_compatibility.md.

Contact

A mesh-vs-mesh clash with a minimum distance of 0 whose maximum local depth is at most the depth epsilon, or exactly 0 when the depth epsilon is not positive. ClashInfo.is_contact tests it. See persistence.md.

Context

The canonical runtime: ovclash_context_t in C, held by ClashRuntime in Python. It owns the stage, the settings, the scope, the pipeline state, the results and the last-error text. Serialize the calls on one context. The Suite runtime (ovclash_suite_runtime_t, ClashDetection) is its Suite counterpart. See threading_and_ownership.md.

Cooking

Building the collision data of a mesh from its triangles: a hierarchy of triangle bounds inside the mesh, which PhysX calls the midphase tree, that the narrow phase queries. PhysX cooks the meshes. A mesh that cannot be cooked is skipped and missing from the results; the cooked-mesh count of the query statistics shows it. See settings.md.

Data handle

An open built-in store in the Suite C ABI, ovclash_suite_data_t: ovclash_suite_data_create() makes a SQLite one and ovclash_suite_data_create_directory() a JSON directory one. The built-in Python serializers wrap one. Fetch-and-save takes either a data handle or the callback table of a custom store. See persistence.md.

Depenetration

The displacement that separates the two meshes of a clash along an axis (ovclash_depenetrate_meshes), or their penetration depth along a direction (ClashDetection.compute_penetration_depth(), ovclash_suite_compute_penetration_depth). Mesh-only. See developer_guide.md.

Depth epsilon

A penetration depth in stage units (depth_epsilon, SETTING_DEPTH_EPSILON), -1.0 by default. A mesh-vs-mesh clash with a minimum distance of 0 whose maximum local depth is at most a positive depth epsilon is a contact. While discard_touching_contacts is set, it is also the run’s contact epsilon: while depth is computed, overlaps shallower than it are dropped. See settings.md.

DLPack

An open protocol for passing array memory between Python libraries without copying. The buffers of an overlap report export through it, and through the numpy() and warp() adapters. See threading_and_ownership.md.

Duplicate

A pair of meshes with identical mesh data at equal poses, within the pose epsilon. Only a static query searches for them. only_find_duplicates restricts a run to that search. The canonical API lists duplicates apart from overlaps; the Suite API saves them as DUPLICATE records when the query’s SETTING_DUP_MESHES is set. See suite_workflows.md.

Dynamic query

A query sampled over a time range: its start and end times differ, and the run evaluates the stage at each sample time. It does not search for duplicates. See performance.md.

Export

A JSON or HTML document built from column definitions and rows (export_to_json(), export_to_html(), ovclash_suite_export_rows_json, ovclash_suite_export_rows_html). Suite API only. See export.md.

Fetch-and-save

The Suite operation that writes the clash records of a completed run for one query into an open store and updates the states of the clashes already stored (ClashDetection.fetch_and_save_overlaps(), ovclash_suite_runtime_fetch_and_save_begin). See persistence.md.

Frame

One time sample of an overlap or clash record. In the canonical API a frame is a record index within an overlap. In the Suite API it is a ClashFrameInfo with the sample’s metrics, both world matrices and its face, outline and point buffers. A static clash and a duplicate have one frame. See persistence.md.

Full-scene traversal

Whole-stage selection when both search sets are empty (enable_full_scene, OVCLASH_SETTINGS_FLAG_FULL_SCENE). It is on for a new runtime. With the canonical API a non-empty scope turns it off, and an empty scope then selects nothing until you turn it on again. See developer_guide.md.

Hard clash

A mesh-vs-mesh clash with a minimum distance of 0, so the meshes touch or interpenetrate, that is not a contact. ClashInfo.is_hard_clash tests it. See persistence.md.

Kit

NVIDIA Omniverse Kit, the application framework that hosts the Kit clash detection extension. ovclash runs without Kit; its compatibility package keeps the extension’s module names for code that you port. See kit_compatibility.md.

Legacy container

A Kit-era .clashDetection file: a 16-byte header followed by a SQLite database. The Suite API reads and writes it through the SQLite store. See legacy_container.md.

Matrix decomposition mode

How the ovstage backend decomposes mesh matrices. The default uses OpenUSD-compatible math. An opt-in mode selects the original ovclash math for comparisons, and it can change zero-tolerance results. See README.md.

Maximum local depth

An estimate of how deep two meshes interpenetrate, in stage units (maxLocalDepth, max_local_depth). It is computed only when depth computation is enabled; otherwise a mesh-vs-mesh record reads -1.0, “not computed”. A point-vs-mesh record always reads 0.0. See settings.md.

Mesh hash

A hash of a mesh’s data (meshHash0, meshHash1), reported for both meshes of an overlap or duplicate. Both meshes of a duplicate pair have the same mesh hash. See developer_guide.md.

Narrow phase

The pipeline step that tests each broad-phase candidate pair exactly, with PhysX mesh queries, and decides whether it clashes. See performance.md.

OpenUSD

The open-source USD library (pxr in Python, usd-core on PyPI). ovclash links no OpenUSD of its own: the pinned ovstage runtime carries a namespaced build of it and supplies the USD runtime of the released packages, so they need no usd-core. An unpublished OpenUSD reference build of ovclash exists for parity checks, which compare its results with those of the released packages; where it behaves differently, the headers say so. See compatibility.md.

ovx headers

The <ovx/...> C headers that the ovstage package ships in its include/ directory, such as ovx/string_types.h (or the older ovx/types.h). The public ovclash headers include them for shared types. The SDK archive ships only ovx/dlpack/dlpack.h. See c_quickstart.md.

Overlap

One clashing pair of prims that a run reports: the two prim paths (name0, name1), a clash hash, a pair type and one record per frame. In a point-vs-mesh pair, name0 is the point cloud. See developer_guide.md.

Overlap index

The position of an overlap in the results of one run. It is an identifier, not a rank: two runs over the same stage can report the same overlaps in another order. See developer_guide.md.

Overlap record

The data of one overlap in one frame: the number of overlapping elements (triangles or points), the time in seconds, the minimum distance and the maximum local depth. An overlap of a static query has one record. See developer_guide.md.

Overlap report

The geometry behind one overlap record, on request: the face indices of either mesh, the intersection outline as segments, or the indices of clashing points. Its buffers are borrowed from the runtime. The ovclash package hands them to NumPy, Warp or any DLPack consumer without copying. See threading_and_ownership.md.

ovstage

The runtime through which ovclash reads USD. It is a separate Python package, pinned to one exact version per ovclash release, and it supplies the USD runtime. See compatibility.md.

Owner operation

Work on a caller-owned ovstage Stage, such as creating, populating or destroying it, that runs under the process-wide gate that clash evaluation also takes (ovclash_suite.run_ovstage_owner_operation(), ovclash_ovstage_run_owner_operation, ovclash_suite_run_ovstage_owner_operation). See ovstage_integration.md.

PhysX

NVIDIA’s physics SDK. ovclash uses its mesh cooking and its mesh-vs-mesh geometry queries; it runs no simulation. See settings.md.

Pipeline

The ordered steps of one run, created from the current settings. A static query has 11 steps, and a dynamic query has 7 plus one per sample time. Run the steps in ascending order. See async_pipelines.md.

Point cloud

A UsdGeomPoints prim, the USD schema for a set of points. A point-vs-mesh query tests point clouds against meshes and reports the indices of the clashing points. See developer_guide.md.

Point-cloud settings

A Suite API record (PointCloudSettings) that belongs to no query: a source point-cloud prim path, a destination path, rendering flags and a level-of-detail limit. A store keeps it and reads it back, but ovclash never acts on it. See persistence.md.

Point-vs-mesh query

A test of UsdGeomPoints prims against meshes (enable_point_clouds, SETTING_ENABLE_POINT_CLOUDS). It is off by default, and it adds its results to the mesh-vs-mesh results instead of replacing them. It ignores the tolerance and reports point indices. See developer_guide.md.

Pose epsilon

The per-element tolerance for comparing two world transforms (pose_epsilon, ovclash_set_pose_epsilon, SETTING_POSE_EPSILON), 1e-6 by default. It decides when meshes share a pose and when a pair is a duplicate. See settings.md.

Prim

One object of a USD stage, addressed by its prim path, such as /World/Pipe. A query tests the mesh prims in its scope and, in a point-vs-mesh query, UsdGeomPoints prims. See developer_guide.md.

Query

One clash detection over a stage: a scope and the settings that a run applies to it. Static, dynamic and point-vs-mesh queries are its kinds. The Suite API also persists a query definition (ClashQuery): a name, the scope paths of sets A and B, settings keyed by SettingId member names, ROI paths and a comment. A store can hold several queries, each with its own clash records. See persistence.md.

Query statistics

The counters of one run: meshes, shared meshes, cooked meshes and point clouds (get_query_stats(), ovclash_get_query_stats). Fewer cooked meshes than meshes minus shared meshes means that some meshes are missing from the results. See limitations.md.

ROI paths

The region-of-interest include and exclude paths of a query. They are stored and read back, but detection does not use them. See settings.md.

Sample launcher

A script beside a shipped sample that selects a runtime and runs the sample: run_<sample>_python.sh or .bat, in the SDK archive also run_<sample>_cpp, and run_custom_clash for the Clash Processor. A package carries the launchers of its own platform only. See samples.md.

Sample times

The times at which a dynamic query evaluates the stage: the start time, then steps of 1 / time_codes_per_second seconds, until the next time passes the end time. Query and result times are in seconds, not USD time codes. Multiply a time by the stage’s effective rate (timeCodesPerSecond, else framesPerSecond, else 24) to get a time code. See settings.md.

Scope

The prims a query tests, as two search sets of prim paths, A and B (paths1 and paths2 in C; object_a_path and object_b_path on a Suite query). Each path also covers its descendants. Set A alone is tested against itself. With both sets, A is tested against B, and a mesh in both sets belongs to A only. See developer_guide.md.

SDK archive

The C/C++ and Python package of a release: the public headers, the native library, the Python packages, the CMake and pkg-config package files, the samples and these pages as Markdown under docs/consumer/. It does not contain ovstage. See overview.md.

Search set

One of the two lists of prim paths of a scope, A and B. Each path also covers its descendants. The Scope entry gives the selection rules. See developer_guide.md.

Settings

The values that control a run: the query kind and times, the tolerance, depth computation, point clouds, threading and engine limits. The canonical RunSettings, the Suite SettingId keys and the C settings structs describe one native table, with different types and some different defaults. See settings.md.

Soft clash

A mesh-vs-mesh clash with a positive minimum distance: the meshes do not touch, but they are closer than the tolerance. Only a positive tolerance produces soft clashes. ClashInfo.is_soft_clash tests it. See persistence.md.

Stage

The USD scene that a runtime queries: a file on the local file system, or an attached ovstage Stage. Opening or attaching a stage replaces the previous one and clears the scope. See developer_guide.md.

Stage units

The linear unit of the stage. The tolerance, minimum distances and depths are in stage units, so the stage’s metersPerUnit applies to them. See developer_guide.md.

Static query

A single-sample query: its start and end times are equal. It evaluates the stage at that one time, and it also searches for duplicate meshes. See suite_workflows.md.

Store

Where the Suite API keeps queries, clash records, frames and point-cloud settings: a SQLite .ovclashdb file, a JSON directory store, a legacy .clashDetection container or a custom store. ClashData is the facade over each of them. See persistence.md.

Suite API

The API layer built on the canonical API: the C ABI in <ovclash_suite/*.h> and the ovclash_suite Python package (ClashDetection, ClashData, ClashQuery). It adds named queries, stores, fetch-and-save, clash states and export. See choosing_an_api.md.

Time code

A position on the USD timeline of a stage, the unit of its startTimeCode and endTimeCode. The stage’s effective rate (timeCodesPerSecond, else framesPerSecond, else 24) converts it: seconds equal the time code divided by the rate. ovclash query and result times are in seconds, not time codes. See settings.md.

Tolerance

The clearance distance, in stage units. Mesh pairs closer than it count as clashing. The default, 0, reports only touching or interpenetrating meshes. A negative value counts as 0, and point-vs-mesh tests ignore the tolerance. See settings.md.

USD

Universal Scene Description: the scene format and composition model of the stages that ovclash queries. The released packages read USD through ovstage. See compatibility.md.

USDRT

The runtime USD scene representation of Kit. The USDRT settings remain for compatibility and have no effect in ovclash. See settings.md.

Warp

NVIDIA Warp, a Python framework for GPU and CPU arrays (warp-lang on PyPI). The warp() adapter of an overlap-report buffer returns a Warp array without copying. See threading_and_ownership.md.

Wheel

The ovclash Python package that pip installs. It holds the Python packages and the native library, with no headers and no documentation pages, and pip installs the pinned ovstage with it. See README.md.