Limitations#

This page lists what standalone ovclash does not do, and how to work around each limit. The released wheel and SDK archive read USD through the ovstage backend, so every row applies to them. An unpublished reference build that reads USD through OpenUSD differs in places; the comments in the public headers, such as <ovclash/ovclash.h>, name each difference.

Related pages:

  • Kit Compatibility lists the Kit Python names that the omni.physxclashdetectioncore package does not provide.

  • Troubleshooting lists error messages with their causes and fixes.

  • Settings gives every setting’s default and effect.

Kept only for Kit compatibility#

These entry points and settings exist so that code written for the Kit clash interface still builds and runs. None of them changes clash results.

Feature

Behavior in ovclash

Use instead

ovclash_create_overlap_meshes

Always returns OVCLASH_STATUS_ERROR and records a “not supported” error. Debug-mesh creation is Kit-only.

ovclash_create_overlap_report_ex. It reports colliding faces, outline segments and colliding point indices.

ovclash_release_overlap_meshes

Does nothing. It returns success unless the context is null or an async run is active.

Nothing. There are never debug meshes to release.

ovclash_delete_duplicate_meshes

Does nothing. It returns success unless the context is null or an async run is active. Stage editing is Kit-only, so the duplicates stay reported.

Remove duplicates in your own pipeline. Read the pairs with ovclash_get_duplicated_meshes_data (Python: ClashRuntime.get_duplicate()).

ovclash_get_timeline_data

Returns fixed values: every time is 0.0 and timeCodesPerSecond is 24.0. It ignores the open stage, and no call changes it.

ovclash_get_stage_timeline_data reads the stage’s own timeline. See Take the sampled range from the stage.

use_usdrt

Stored, read back and written into persisted query settings. Nothing reads it: USDRT, Kit’s runtime scene representation, is not part of ovclash. This covers ovclash_set_use_usdrt, OVCLASH_SETTINGS_FLAG_USDRT, OVCLASH_SUITE_SETTING_USE_USDRT (Python: SettingId.SETTING_USE_USDRT) and RunSettings.use_usdrt.

Nothing needed.

ROI include and exclude paths

The ROI paths (region of interest) ClashQuery.roi_include_path and ClashQuery.roi_exclude_path (C: ovclash_suite_query_set_roi_include_path and ovclash_suite_query_set_roi_exclude_path) are persisted for Kit record compatibility. No query reads them.

An A/B scope, the two search sets of prim paths: ovclash_set_scope_paths or ClashRuntime.set_scope on the canonical API. On the Suite API: ovclash_suite_set_scope or ClashDetection.set_scope_paths.

PointCloudSettings

A persisted record only. The serializers store it and read it back. ovclash does not generate or process point clouds from it.

Author point clouds in your own pipeline. ovclash collides existing UsdGeomPoints prims.

ovclash_set_point_clouds_experimental

Stored but never read.

Nothing needed.

Result and run limits#

Feature

Limitation

Workaround

Overlap index order

The index passed to ovclash_get_overlap_data is an identifier, not a rank. Two runs over the same stage with the same settings report the same overlaps and data. The order can differ.

Key on name0/name1 or clashHash, and sort in your own code. See Key overlaps by prim pair and Overlap index order is not contractual.

Meshes that cannot be cooked

PhysX cannot cook some meshes, for example one whose triangles are all degenerate. ovclash drops such a mesh from the run. The run still succeeds, and the pairs of that mesh are missing.

Compare nbCookedMeshes from ovclash_get_query_stats with nbMeshes minus nbSharedMeshes. A lower count means meshes were dropped. ovclash_get_last_error gives the number of meshes that failed to cook and names the first one. Read it before any other call on the context. A mesh whose triangulation yields no triangles is dropped with only a log line. With logging on (ovclash_set_log), every dropped mesh is printed. See Detect dropped meshes.

Duplicate search in dynamic runs

Duplicate-mesh search is off for a dynamic query. ovclash_set_only_find_duplicates with an ovclash_set_times range whose start and end differ reports nothing.

Search for duplicates with a static query, where the start time equals the end time. See Dynamic runs.

Point-cloud depth

Depth is mesh-only. A point-vs-mesh overlap reports a maximum local depth (maxLocalDepth) of 0.0 in every mode. ovclash_compute_max_local_depth and the Suite depth calls fail for it.

Check the overlap type before you request depth. Canonical API: compare type with OVCLASH_OVERLAP_PAIR_TYPE_POINT_VS_MESH (Python: ovclash.OverlapType.POINT_VS_MESH). Suite C: compare ovclash_suite_overlap_data_t::type with OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH, or call ovclash_suite_clash_info_is_point_cloud_clash() for a stored clash. Suite Python: call ClashDetection.is_depth_computation_supported(overlap_type), for example with ClashInfo.overlap_type. See The depth entry points are mesh-only.

Point-cloud widths in reports

ovclash_overlap_report_t::pointSize0 holds one width for the whole cloud. It excludes the scaling of the prim transform. When the authored per-point widths are all equal, it holds that width. When they vary, it is 0.0.

Read the widths from USD by the indices in collidingPoints0. Or set one width for every point with ovclash_set_point_size.

Settings changed between steps

A run fixes ovclash_set_subcomponent_filtering, the subcomponent filter that skips a pair whose two meshes share a subcomponent root, when it selects meshes, so a later change has no effect on that run. A change to ovclash_set_point_size between ovclash_run_pipeline_step calls applies from the run’s next sample on, so one run mixes two sizes.

Change settings only between runs.

Thread-count setting

ovclash_set_nb_tasks is ignored in single-threaded mode. It is also ignored under the new task manager, which is on by default.

Turn the new task manager off: ovclash_set_new_task_manager(context, false) in C, or runtime.set_run_settings(runtime.get_run_settings(), new_task_manager=False) on a Python ClashRuntime. See Threading.

Asynchronous pipelines

There is no timeout. ovclash_finish_pipeline blocks until the worker stops. ovclash_cancel_pipeline only requests a stop. A worker that never stops can only be abandoned with the process.

Poll ovclash_is_pipeline_running against your own deadline, and cancel when it passes. Then call ovclash_finish_pipeline exactly once. See Cancel a run after a deadline.

Scene limits#

Feature

Limitation

Workaround

Stage location

The stage you open must be an existing local file. ovclash_open_stage checks that the path exists before it loads anything, so a URI such as omniverse://... is rejected as the stage path.

Copy the root layer to a local path. References, payloads and assets inside the stage may still use omniverse:// URLs; see Opening a stage stalls on an unreachable omniverse:// host.

Instanced point clouds

ovclash drops a UsdGeomPoints prim under an instanceable prim, one marked instanceable = true so that USD shares its subtree between instances, so that cloud collides with nothing. This matters only when point clouds are enabled; they are off by default.

Keep point clouds out of instanceable prims. ovclash collides a non-instanced cloud normally.

Unresolved transform animation

ovclash_set_purge_permanent_static_overlaps is on by default and drops pairs whose meshes are static for the whole run. A mesh counts as static only when ovclash can prove it from authored data. When an active transform operation of the mesh or of an ancestor has no authored initial value, the mesh counts as non-static, and a dynamic run keeps its pairs. On a stage attached with ovclash_ovstage_attach_stage without a composition, every mesh counts as non-static unless the binding’s capabilities field sets OVCLASH_OVSTAGE_CAP_AUTHORED_TRANSFORM_UPDATES.

Author an initial value for every active transform operation on the mesh and its ancestors. For an attached stage, supply its composition (Python: attach_ovstage(..., composition_root=..., composition_layers=...)): ovclash then classifies the meshes from its own population of that composition, as for a file; see Engine-evaluated time. Otherwise set the capability. It requires evaluate_time (Python: attach_ovstage(..., evaluate_time=..., authored_transform_updates=True)). Set it only when the stage owner meets its population contract, which Authored transform updates summarizes from the flag’s declaration in <ovclash/ovclash_ovstage.h>.

Workaround examples#

Before you begin: the Python examples are standalone scripts that need the ovclash package installed, as Python Quickstart shows. Replace scene.usda with the path of your stage file and run each script with that Python. The C example is a function for your own program, which builds against the SDK archive as C/C++ Quickstart shows.

Take the sampled range from the stage#

ovclash_get_timeline_data does not describe the stage. Read the stage’s own timeline and convert its time codes to seconds. Reject a rate that is not positive and finite before you divide by it. get_stage_timeline_data() returns an ovclash.StageTimelineData, which reads the root layer of the open stage. It raises RuntimeError when no stage is open or attached.

Field

Type

Required

Default or values

Description

start_time_code

float

Yes

0.0 when unauthored

The stage’s startTimeCode.

end_time_code

float

Yes

0.0 when unauthored

The stage’s endTimeCode.

time_codes_per_second

float

Yes

The authored timeCodesPerSecond, else the authored framesPerSecond, else 24.0

The effective rate. Divide a time code by it to get seconds.

frames_per_second

float

Yes

24.0 when unauthored

The stage’s framesPerSecond.

A stage attached with attach_ovstage() reports the timeline fields of its attachment, as supplied. Reading results gives the C form, ovclash_stage_timeline_data_t, and ovclash Python gives the type and default of each RunSettings field that the script sets.

import math

from ovclash import ClashRuntime

runtime = ClashRuntime()
try:
    runtime.open_stage("scene.usda")
    timeline = runtime.get_stage_timeline_data()
    rate = timeline.time_codes_per_second
    if not (math.isfinite(rate) and rate > 0.0):
        raise ValueError(f"unusable timeCodesPerSecond: {rate}")
    runtime.set_run_settings(
        runtime.get_run_settings(),  # keep the other settings
        set_times=True,
        start_time=timeline.start_time_code / rate,  # seconds, not time codes
        end_time=timeline.end_time_code / rate,
        time_codes_per_second=rate,
    )
    runtime.run_pipeline()
    print("overlaps:", runtime.get_overlap_count())
finally:
    runtime.destroy()

The script prints overlaps: <count>, where <count> is the number of overlapping prim pairs over the sampled range. A stage with an unusable rate raises ValueError instead.

In C, the same values come from ovclash_get_stage_timeline_data, and ovclash_set_times(context, start_seconds, end_seconds, timeCodesPerSecond) applies them.

Detect dropped meshes#

A mesh that PhysX cannot cook leaves a message in the last error, although every step succeeds. Read it right after the run, then compare the counters. get_query_stats() returns an ovclash.QueryStats, the query statistics of the last run. Every count is 0 before the pipeline has run.

Field

Type

Required

Default or values

Description

nb_meshes

int

Yes

0 or more

The meshes that the run selected.

nb_shared_meshes

int

Yes

0 or more

The selected meshes that are shared instances and reuse the cooked data of another selected mesh.

nb_cooked_meshes

int

Yes

0 or more

The unique meshes that the run cooked. A value below nb_meshes - nb_shared_meshes means that meshes that could not be cooked were dropped from the results.

nb_point_clouds

int

Yes

0 or more

The point clouds that the run selected.

Reading results gives the C form, ovclash_stats_t.

from ovclash import ClashRuntime

runtime = ClashRuntime()
try:
    runtime.open_stage("scene.usda")
    runtime.run_pipeline()
    message = runtime.last_error()  # read first: a later call can replace it
    stats = runtime.get_query_stats()
    expected = stats.nb_meshes - stats.nb_shared_meshes
    if stats.nb_cooked_meshes < expected:
        print(f"{expected - stats.nb_cooked_meshes} mesh(es) dropped. {message}")
finally:
    runtime.destroy()

On a stage with one mesh that cannot be cooked, the output looks like this:

1 mesh(es) dropped. ovstage: 1 mesh(es) failed to cook and were dropped from this run, starting with '/World/Degenerate'. Their overlaps are missing from the results. Compare nbCookedMeshes with nbMeshes minus nbSharedMeshes, and enable logging to name every dropped mesh.

Key overlaps by prim pair#

Do not store an overlap index between runs. Key each overlap on its prim paths, and sort the keys when you need a stable order. get_overlap_details(index, record_index=0) returns an ovclash.OverlapDetails for one record of the overlap at index. get_overlap_record() returns an ovclash.OverlapRecord, which has only the name0, name1, nb_records, nb_elements, type and time fields.

Field

Type

Required

Default or values

Description

name0

str or None

Yes

A prim path, or None when empty

The first prim: the point cloud of a point-vs-mesh pair, else a mesh.

name1

str or None

Yes

A prim path, or None when empty

The second prim, a mesh.

clash_hash

tuple[int, int]

Yes

Two 64-bit words

The clash hash, a hash of the two prim paths.

mesh_hash0, mesh_hash1

tuple[int, int]

Yes

Two 64-bit words

The mesh hash of each prim’s data.

nb_records

int

Yes

1 or more

The frames in which the pair overlaps. Always 1 for a static query.

nb_elements

int

Yes

0 or more

The overlapping triangles or points in this frame.

type

ovclash.OverlapType

Yes

MESH_VS_MESH, POINT_VS_MESH or UNDEFINED

The pair type.

time

float

Yes

Seconds

The frame’s time, in seconds, not USD time codes.

min_distance

float

Yes

0.0 or more

The minimum distance between the pair’s triangles, in stage units. 0.0 when they touch or interpenetrate.

max_local_depth

float

Yes

-1.0, or 0.0 or more

The maximum local depth, in stage units. -1.0 when depth was not computed, and always 0.0 for a point-vs-mesh overlap.

Overlap records gives the C form, ovclash_overlap_data_t.

from ovclash import ClashRuntime

runtime = ClashRuntime()
try:
    runtime.open_stage("scene.usda")
    runtime.run_pipeline()
    overlaps = {}
    for index in range(runtime.get_overlap_count()):
        details = runtime.get_overlap_details(index)
        overlaps[(details.name0, details.name1)] = details
    for name0, name1 in sorted(overlaps):
        print(name0, name1, overlaps[(name0, name1)].nb_elements)
finally:
    runtime.destroy()

The script prints one line per overlapping prim pair, sorted by path: the two prim paths and the number of overlapping elements, triangles or points, in the pair’s first frame.

OverlapDetails.clash_hash is an alternative key. It hashes the two prim paths.

Cancel a run after a deadline#

Before you begin: your program builds against the SDK archive, and the context has an open stage and a pipeline created with ovclash_create_pipeline().

ovclash_finish_pipeline has no timeout. Poll against your own deadline, cancel when it passes, and finish exactly once. Add these two functions to your C source, and call run_with_deadline() instead of running the steps with ovclash_run_pipeline_step().

#include <stdbool.h>
#include <time.h>

#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif

#include <ovclash/ovclash.h>

static void sleep_briefly(void)
{
#ifdef _WIN32
    Sleep(50); /* milliseconds */
#else
    usleep(50 * 1000); /* microseconds */
#endif
}

/* Runs the created pipeline and cancels it after timeout_s seconds. */
ovclash_result_t run_with_deadline(ovclash_context_t* ctx, double timeout_s)
{
    ovclash_async_t* async = NULL;
    ovclash_result_t result = ovclash_run_pipeline_async(ctx, &async);
    if (result.status != OVCLASH_STATUS_SUCCESS)
        return result;

    const time_t start = time(NULL);
    bool running = true;
    while (ovclash_is_pipeline_running(async, &running).status == OVCLASH_STATUS_SUCCESS && running)
    {
        if (difftime(time(NULL), start) > timeout_s)
        {
            ovclash_cancel_pipeline(async); /* requests a stop; does not join */
            break;
        }
        sleep_briefly();
    }
    result = ovclash_finish_pipeline(async); /* joins the worker and frees the handle */
    async = NULL;                            /* the handle is gone */
    return result;
}

After a cancel, ovclash_finish_pipeline returns OVCLASH_STATUS_ERROR. That status reports the cancelled run, not a failed join: the context is usable again. In Python, AsyncPipeline.cancel() requests the stop and finishes the run in one call; see Asynchronous Pipelines.