Settings#

This page is the reference for every run setting: its name in each API, its default, its unit and its effect. Performance says which settings to change when a run is slow or uses too much memory. The Developer Guide says when a changed setting takes effect.

The settings form one table, the engine table: the settings table of the clash engine, compatible with Kit. Four surfaces set it, on the canonical API and on the Suite API:

Surface

Settings type

Apply

Read back

Defaults

Canonical C

ovclash_settings_t, or one setter per setting

ovclash_set_settings, ovclash_set_*

ovclash_get_settings

ovclash_reset_settings

ovclash Python

RunSettings, a subset

ClashRuntime.set_run_settings()

ClashRuntime.get_run_settings()

RunSettings()

Suite C

ovclash_suite_run_settings_t

ovclash_suite_set_run_settings

ovclash_suite_get_run_settings

ovclash_suite_get_default_run_settings

ovclash_suite Python

A dict keyed by SettingId

ClashDetection.set_settings()

None

DEFAULT_SETTINGS

The released packages use the ovstage backend, and this page describes it. The unpublished reference build, which reads USD through OpenUSD instead, differs for a few settings; the comments in <ovclash/ovclash.h> document each difference.

On this page#

Names in each API#

Each row is one setting. A canonical flag is an OVCLASH_SETTINGS_FLAG_<NAME> bit of ovclash_settings_t::flags; the table gives <NAME>. A Suite Python key is a SettingId member, its integer value or its name, such as "SETTING_TOLERANCE". “None” means that the surface cannot set the setting; it keeps its default there.

Canonical setter

ovclash_settings_t

ovclash.RunSettings

Suite C field

Suite Python SettingId

ovclash_set_full_scene

flag FULL_SCENE

enable_full_scene

enable_full_scene

None; set_settings() always enables it

ovclash_set_ignore_invisible_prims

flag IGNORE_INVISIBLE_PRIMS

ignore_invisible_prims

ignore_invisible_prims

SETTING_IGNORE_INVISIBLE_PRIMS

ovclash_set_subcomponent_filtering

flag SUBCOMPONENT_FILTERING

None

subcomponent_filtering

SETTING_FILTER_TEST

ovclash_set_point_clouds

flag ENABLE_POINT_CLOUDS

enable_point_clouds

enable_point_clouds

SETTING_ENABLE_POINT_CLOUDS

ovclash_set_point_size

pointSize

None

point_size_override

SETTING_POINT_SIZE_OVERRIDE

ovclash_set_only_find_duplicates

flag ONLY_FIND_DUPLICATES

only_find_duplicates

only_find_duplicates

SETTING_DUP_MESHES

ovclash_set_tolerance

tolerance

tolerance

tolerance

SETTING_TOLERANCE

ovclash_set_coplanar

flag COPLANAR

None

coplanar

SETTING_COPLANAR

ovclash_set_any_hit

flag ANY_HIT

None

any_hit

SETTING_ANY_HIT

ovclash_set_triangle_limit

triangleLimit

None

triangle_limit

SETTING_TRIANGLE_LIMIT

ovclash_set_overlap_code

overlapCode

None

overlap_code

SETTING_OVERLAP_CODE

ovclash_set_ignore_redundant_overlaps

flag IGNORE_REDUNDANT_OVERLAPS

None

ignore_redundant_overlaps

SETTING_IGNORE_REDUNDANT_OVERLAPS

ovclash_set_broadphase_limit

broadphaseLimit

None

None

None

ovclash_set_sort_mode

sortMode

None

None

None

ovclash_set_tight_bounds

flag TIGHT_BOUNDS

None

tight_bounds

SETTING_TIGHT_BOUNDS

ovclash_set_bounds_epsilon

boundsEpsilon

None

bounds_epsilon

SETTING_BOUNDS_EPSILON

ovclash_set_pose_epsilon

poseEpsilon

None

pose_epsilon

SETTING_POSE_EPSILON

ovclash_set_quantized

flag QUANTIZED

None

quantized

SETTING_QUANTIZED

ovclash_set_tris_per_leaf

trisPerLeaf

None

tris_per_leaf

SETTING_TRIS_PER_LEAF

ovclash_set_area_epsilon

areaEpsilon

None

area_epsilon

SETTING_AREA_EPSILON

ovclash_set_compute_max_local_depth

maxLocalDepthMode

max_local_depth_mode

compute_max_local_depth with max_local_depth_mode

SETTING_COMPUTE_MAX_LOCAL_DEPTH with SETTING_MAX_LOCAL_DEPTH_MODE

ovclash_set_contact_epsilon

contactEpsilon

None

depth_epsilon, applied only while discard_touching_contacts is set

SETTING_DEPTH_EPSILON with SETTING_DISCARD_TOUCHING_CONTACTS

ovclash_set_contact_cutoff

contactCutoff

None

contact_cutoff

SETTING_CONTACT_CUTOFF

ovclash_set_times

startTime, endTime, timeCodesPerSecond

set_times, start_time, end_time, time_codes_per_second

start_time, end_time, time_codes_per_second, set_times

Resolved from SETTING_DYNAMIC, SETTING_DYNAMIC_START_TIME, SETTING_DYNAMIC_END_TIME and SETTING_STATIC_TIME; see Time sampling

ovclash_set_purge_permanent_static_overlaps

flag PURGE_PERMANENT_STATIC_OVERLAPS

None

purge_permanent_static_overlaps

SETTING_PURGE_PERMANENT_STATIC_OVERLAPS

ovclash_set_purge_permanent_dynamic_overlaps

flag PURGE_PERMANENT_DYNAMIC_OVERLAPS

None

purge_permanent_dynamic_overlaps

SETTING_PURGE_PERMANENT_OVERLAPS

ovclash_set_single_threaded

flag SINGLE_THREADED

single_threaded

single_threaded

SETTING_SINGLE_THREADED

ovclash_set_new_task_manager

flag NEW_TASK_MANAGER

new_task_manager

new_task_manager

SETTING_NEW_TASK_MANAGER

ovclash_set_nb_tasks

nbTasks

nb_tasks

nb_tasks

SETTING_NB_TASKS

ovclash_set_log

flag LOG

enable_log

enable_log

SETTING_LOGGING

ovclash_set_point_clouds_experimental

flag ENABLE_POINT_CLOUDS_EXPERIMENTAL

None

None

None

ovclash_set_use_usdrt

flag USDRT

use_usdrt

use_usdrt

SETTING_USE_USDRT

The sections from Scope and selection to Logging give each setting’s default in the engine table, the table that ovclash_reset_settings writes and that a new context holds. Each default also gives the setting’s kind: On and Off mark a flag, and a number marks a numeric value; the surface sections give the C and Python types. Distances are in stage units, so the stage’s metersPerUnit applies. Every floating-point value must be finite; a non-finite one is rejected, and the previous value stays.

Scope and selection#

Selection reads these settings when a run selects meshes, so a change applies from the next run. The point size is the exception: a change between the steps of a run applies from that run’s next sample.

Setting

Default

Effect

Full scene

On

With no scope set, the run traverses the whole stage. With no scope and the flag off, nothing is selected. Setting it, on or off, clears any scope paths. A non-empty ovclash_set_scope_paths clears it. See Setting a scope.

Ignore invisible prims

On

Invisible prims are excluded from mesh and point-cloud selection, so they never clash.

Subcomponent filtering

Off

Skips a pair whose two meshes resolve to the same subcomponent root, the nearest ancestor with kind = "subcomponent". Meshes outside any subcomponent share the empty root, so the filter also drops every pair between them. A run keeps the value it selected meshes with.

Point clouds

Off

Adds point-vs-mesh queries for UsdGeomPoints prims. With the flag off, point clouds are not selected. The mesh-vs-mesh pass is unchanged; see Point clouds are additive.

Point size

0.0

Point diameter (a width, not a radius) for point-cloud tests, in stage units, without the prim’s transform scale. A value above 0 applies to every point and is reported as pointSize0. A value of 0 or below falls back to a single authored width, then to per-point widths, then to an automatic size. A change between the steps of a run applies from the run’s next sample. It matters only while point clouds are on.

Detection#

Setting

Default

Effect

Tolerance

0.0

Clearance distance in stage units: mesh pairs closer than this count as clashing, so a positive value reports near misses. 0.0 reports touching or interpenetrating geometry only. A negative value counts as 0. The point-vs-mesh narrow phase ignores it.

Coplanar

On

Keeps coplanar triangle pairs that touch exactly as overlaps. Off discards them.

Any hit

Off

Stops each mesh pair at its first colliding triangle. The pair is still reported, but nbElements and the face and outline buffers hold one representative hit, and derived values such as maxLocalDepth come from that hit. It overrides the triangle limit with 1.

Triangle limit

0

Caps the colliding triangle pairs recorded per mesh pair. 0 means unlimited. The cap truncates nbElements and the face and outline buffers; it does not stop a pair from being reported. Not validated.

Overlap code

3

Selects the triangle-triangle intersection kernel: 1 a variant of Moller’s triangle-triangle test, 2 a separating-axis test (SAT), 3 a SAT that uses SIMD vector instructions (SIMD SAT). 0 and every other value select the regular kernel. The kernels differ in speed and can classify borderline hits differently. Not validated.

Ignore redundant overlaps

Off

Drops a pair whose meshes and relative poses repeat a contact already recorded, typically instanced or shared geometry laid out identically.

Only find duplicates

Off

Runs the duplicate-mesh search only. Duplicates are prim pairs with identical mesh data and equal poses within the pose epsilon. The overlap count is then 0, and only the duplicate getters return results. A dynamic query never searches for duplicates, so this flag with a time range finds nothing.

Broad-phase limit

0xffffffff

Caps the candidate pairs of the broad phase. A run whose candidate count exceeds it is cancelled, not truncated; see Broad phase and geometry limits. 0 is a real limit. Canonical C only.

Sort mode

0

On ovstage only 0xffffffff does something: it reports a triangle count of 0 for every duplicate pair. Not validated. Canonical C only.

When the broad-phase limit cancels a run, the cancellation stays pending. A stepped static run reports success for the broad-phase step and then rejects the next step. A sampled frame step that exceeds the limit fails itself. An async run reports the stop from ovclash_finish_pipeline, which clears it. Otherwise ovclash_reset_context clears it.

Bounds and cooking#

Cooking reads the cooking settings, so a change applies to meshes cooked by the next run. PhysX cooks each mesh into a midphase tree, the per-mesh bounding volume hierarchy that the narrow phase queries for triangles.

Setting

Default

Effect

Tight bounds

On

Computes rotation-aware world bounds. They shrink the broad-phase candidate set for rotated meshes, at some extra cost.

Bounds epsilon

0.01

Inflates each mesh’s world bounds, as an additive offset in stage units and as a scale factor of 1 + epsilon. A value of 0 or above can only add candidate pairs; the narrow phase still decides. A negative value can shrink the bounds.

Pose epsilon

1e-6

Per-element tolerance for comparing two world transforms, in the units of the matrix components (stage units for translation). It decides when meshes share a pose and when a pair is a duplicate. A negative value never matches.

Quantized

Off

Cooks quantized midphase trees: less memory, at some cost in accuracy and speed.

Triangles per leaf

15

Triangles per leaf of the cooked midphase tree. Larger leaves cook faster and use less memory; smaller leaves query faster. Values outside 1 to 15 are rejected; 15 is also the maximum. A value of 1 is accepted and read back, but cooking falls back to 15.

Area epsilon

1e-6

Minimum triangle area kept during cooking, in squared stage units. Smaller triangles are discarded and never appear in results. 0 keeps every triangle.

Penetration depth#

Depth is mesh-only. A point-vs-mesh overlap reports a maxLocalDepth of 0.0 in every mode.

Setting

Default

Effect

Max local depth mode

DISABLED

Computes the maximum local penetration depth of each overlap. DISABLED computes nothing, and a mesh-vs-mesh maxLocalDepth stays -1.0, “not computed”. MINIMAL is the fast estimate; MEDIUM and HIGH refine it at increasing cost, and HIGH adds 64 sampling directions. A mode above HIGH is rejected.

Contact epsilon

-1.0

Minimum depth in stage units, used only while depth is computed. Overlaps with a smaller maxLocalDepth are dropped, and the value is the minimum-depth cutoff of the refinement. A negative value disables both.

Contact cutoff

-1.0

Maximum-depth cutoff of the refined search, in stage units. It applies only while the contact epsilon is 0 or above and the mode is above MINIMAL. A negative value leaves the cutoff unset.

The Suite C ABI and its Python package split the mode into an on/off gate and a mode on another scale:

Suite field

Values

compute_max_local_depth

The gate. 0, the default, maps to DISABLED.

max_local_depth_mode

Read only while the gate is on: 0 minimal, 1 medium (the default), 2 high. 3 is rejected.

The Suite scale is offset by one from ovclash_max_local_depth_mode_t and ovclash.MaxLocalDepthMode, where 0 is DISABLED and 1, 2 and 3 are MINIMAL, MEDIUM and HIGH. A canonical value passed in a Suite field therefore selects the next mode up.

The Suite’s depth_epsilon becomes the contact epsilon only while discard_touching_contacts is set. Otherwise the contact epsilon stays -1.0. Its Suite default is -1.0.

Depth computation costs compares the modes.

Time sampling#

Query times are in seconds, not USD time codes; see Time units.

Setting

Default

Effect

Start time, end time

0.0, 0.0

Equal times select a static query with one sample at that time. Otherwise the run samples from the start time; What results are stable gives the sample times.

Time codes per second

0.0

The query’s samples per second. It is not the stage’s time-code rate. 0 collapses a time range to one sample at the start time. A negative value is rejected.

Purge permanent static overlaps

On

In a dynamic run, drops pairs whose two meshes are both transform-static. A mesh counts as static only when its authored transforms prove it; a mesh with an unresolved initial transform value is treated as non-static. No effect on a static query.

Purge permanent dynamic overlaps

Off

In a dynamic run, drops overlaps present in every sampled frame, such as modelling artifacts. No effect on a static query.

ovclash_create_pipeline reads the three times to plan the steps. The pipeline keeps that plan, so a later change of the times applies to the next pipeline.

Each surface sets the times its own way:

  • Canonical C. ovclash_set_times(context, start, end, rate), or the three struct fields. A descending range is accepted and takes one sample at the start time.

  • ovclash Python. RunSettings.set_times=True applies start_time, end_time and time_codes_per_second. With set_times=False, all three native times are 0.0, a static query at time 0. A descending range raises ValueError.

  • Suite C. start_time, end_time and time_codes_per_second select the samples. set_times only enables the end_time >= start_time check. dynamic, static_time, dynamic_start_time and dynamic_end_time are persisted query metadata that the runtime does not read; resolve them into start_time and end_time yourself.

  • ovclash_suite Python. ClashDetection.set_settings() resolves the times from the open stage’s timeline:

    • With SETTING_DYNAMIC true, the run samples from SETTING_DYNAMIC_START_TIME to SETTING_DYNAMIC_END_TIME. A time of 0.0 takes the stage’s start or end instead.

    • Otherwise the run is static at SETTING_STATIC_TIME, clamped to the stage’s time range.

    • The sampling rate is the stage’s own time-codes-per-second rate. The optional time_codes_per_second keyword sets another one; it must be positive.

    • SETTING_DUP_MESHES makes the run static.

Threading#

No threading control changes which pairs overlap or what is reported about them. On ovstage they do not change the result order either. They also govern report extraction and fetch-and-save frame preparation after detection, so you can change them between detection and fetching.

Setting

Default

Effect

Single threaded

Off

Runs every phase serially. It overrides both task managers.

New task manager

On

Runs parallel phases on the tasking of Carbonite, NVIDIA’s plugin and runtime framework, with the scheduler’s worker budget, and ignores the task count. Off selects std::thread workers bounded by the task count. When the scheduler cannot start, the phase fails with an error; no other scheduler is selected.

Task count

128

Used only while both other controls are off. The workers are bounded by the task count (0 counts as 1), the hardware concurrency and the available work. The engine clamps the value to 256.

Validation of the task count differs per surface:

Surface

Accepted task counts

Canonical C

Any value. The engine clamps it to 256, and ovclash_get_settings reads back the clamped value.

ovclash.RunSettings

1 to 255 while single_threaded and new_task_manager are both false; otherwise any uint32 value. A value outside that range raises ValueError.

Suite C and ovclash_suite

0 to 1000000; larger values are rejected. The engine clamps the value to 256, but read-back returns the value you passed.

Threading says when to change them, and Threading controls and result order gives the ordering rules.

Logging#

Setting

Default

Effect

Log

Off

Prints per-phase progress and timing lines to stdout. There is no callback and no way to redirect the output, and the text is not a stable format.

Collecting diagnostics for a bug report lists the other diagnostic switches.

Settings without effect#

These settings are accepted, stored and read back, and all except the experimental point-cloud flag are persisted with a query. Nothing in a standalone run acts on them, so they never change results:

Setting

Spellings

Note

use_usdrt

OVCLASH_SETTINGS_FLAG_USDRT, ovclash_set_use_usdrt, RunSettings.use_usdrt in both packages, the Suite field use_usdrt, SettingId.SETTING_USE_USDRT

In Kit it selects the scene traversal of USDRT, Kit’s runtime scene representation. It stays in the table because persisted query settings carry it.

Experimental point clouds

OVCLASH_SETTINGS_FLAG_ENABLE_POINT_CLOUDS_EXPERIMENTAL, ovclash_set_point_clouds_experimental

ovstage never reads it.

Query metadata

The Suite fields dynamic, static_time, dynamic_start_time, dynamic_end_time

The Suite C runtime does not read them; see Time sampling. They are validated as finite and persisted.

ROI include and exclude paths

ClashQuery.roi_include_path, ClashQuery.roi_exclude_path; C: ovclash_suite_query_set_roi_include_path, ovclash_suite_query_set_roi_exclude_path

The region-of-interest ROI paths of a query record, persisted and round-tripped. No query reads them, so two queries that differ only in them give identical results. Use an A/B scope, the two search sets of prim paths, instead.

ovstage context settings#

Two settings of an ovstage context sit outside the engine table:

Setting

API

Default

Effect

Matrix decomposition

ovclash_ovstage_set_matrix_decomposition, ClashRuntime.set_ovstage_matrix_decomposition()

OPENUSD ("openusd")

How mesh matrices are decomposed. OVCLASH ("ovclash") reproduces earlier ovclash results and can change which pairs clash at zero tolerance. A changed mode clears results and discards the pipeline. The mode survives a context reset and a stage replacement. See Comparing ovstage matrix decompositions.

Dynamic matrix cache

ClashRuntime.set_ovstage_dynamic_matrix_cache()

On

Caches sampled transforms in bounded playback windows. Off reads one frame at a time and disables prefetch, the reading of the next playback window on a second worker. It does not change sample times or poses. See Dynamic runs.

Both raise RuntimeError in Python on a backend without them. Using ovclash with an ovstage Stage covers the rest of the ovstage-only API.

Defaults that differ between surfaces#

All four surfaces start from the engine table, with these exceptions:

Setting

Engine table

Exception

use_usdrt

On

ovclash.RunSettings() holds False. It has no effect either way.

Time codes per second

0.0

RunSettings() holds 24.0 in both Python packages.

Depth

DISABLED

The Suite API holds the gate off with mode 1 (medium), which is the same state.

Pose and area epsilon, bounds epsilon

1e-6f, 0.01f (float)

The Suite defaults hold the exact doubles 1e-6 and 0.01.

Depth epsilon

No counterpart

The Suite default is -1.0.

Two read-backs differ from the defaults you might expect:

  • ClashRuntime.get_run_settings() on a new runtime reports the engine table, not RunSettings(): use_usdrt=True and time_codes_per_second=0.0.

  • ovclash_suite_get_run_settings reports a zero-initialized struct until the first successful ovclash_suite_set_run_settings. The runtime uses the engine table until then.

Canonical C#

ovclash_settings_t in <ovclash/ovclash.h> is a plain struct: a flags bitmask of ovclash_settings_flag_t values, the counts, limits and epsilons, maxLocalDepthMode, and the three times. Every field is required, so start from ovclash_reset_settings, which writes the defaults:

Field

C type

Default

Setting

flags

uint32_t, a bitmask of OVCLASH_SETTINGS_FLAG_*

OVCLASH_SETTINGS_FLAG_DEFAULT

Every on/off setting; Names in each API gives each flag

nbTasks

uint32_t

128

Task count

sortMode

uint32_t

0

Sort mode

overlapCode

uint32_t

3

Overlap code

trisPerLeaf

uint32_t

15, in 1 to 15

Triangles per leaf

triangleLimit

uint32_t

0

Triangle limit

broadphaseLimit

uint32_t

0xffffffff

Broad-phase limit

poseEpsilon, areaEpsilon

float

1e-6f

Pose epsilon, area epsilon

boundsEpsilon

float

0.01f

Bounds epsilon

contactEpsilon, contactCutoff

float

-1.0f

Contact epsilon, contact cutoff

tolerance

float

0.0f

Tolerance

pointSize

float

0.0f

Point size

maxLocalDepthMode

ovclash_max_local_depth_mode_t

OVCLASH_MAX_LOCAL_DEPTH_MODE_DISABLED

Max local depth mode

startTime, endTime

double

0.0

Start time, end time, in seconds

timeCodesPerSecond

double

0.0

Time codes per second

Change fields and apply the whole struct. This function belongs in a C source file of your program; ctx is a context from ovclash_create_context:

#include <stdio.h>

#include <ovclash/ovclash.h>

/* Applies the engine table with point clouds on and a 0.5 tolerance. Returns 0 on success. */
static int apply_settings(ovclash_context_t* ctx)
{
    ovclash_settings_t settings;
    ovclash_reset_settings(&settings); /* the engine table */
    settings.flags |= OVCLASH_SETTINGS_FLAG_ENABLE_POINT_CLOUDS;
    settings.tolerance = 0.5f;
    settings.nbTasks = 1000;
    if (ovclash_set_settings(ctx, &settings).status != OVCLASH_STATUS_SUCCESS)
    {
        ovclash_string_t error = ovclash_get_last_error(ctx);
        fprintf(stderr, "%.*s\n", (int)error.length, error.ptr);
        return 1;
    }

    ovclash_settings_t live;
    ovclash_get_settings(ctx, &live);
    printf("nbTasks: %u\n", live.nbTasks); /* prints 256: the engine clamps nbTasks */
    return 0;
}
  • OVCLASH_SETTINGS_FLAG_DEFAULT sets COPLANAR, TIGHT_BOUNDS, FULL_SCENE, IGNORE_INVISIBLE_PRIMS, NEW_TASK_MANAGER, PURGE_PERMANENT_STATIC_OVERLAPS and USDRT. Every other flag is off.

  • ovclash_create_context seeds a new context from ovclash_reset_settings, so the two agree field for field.

  • ovclash_set_settings validates the whole struct first: finite floats, a non-negative timeCodesPerSecond, trisPerLeaf in 1 to 15 and maxLocalDepthMode up to HIGH. On a violation it stores nothing. It also clears any scope paths, so set the scope afterwards.

  • A setter changes one value without a whole-struct push. A rejected setter stores nothing.

  • ovclash_get_settings reads back the live settings, including per-setter changes.

ovclash Python#

ovclash.RunSettings is a dataclass over a subset of ovclash_settings_t: the fields in the Names in each API table. Every field is optional and takes its dataclass default:

Field

Type

Default

enable_log, enable_point_clouds, use_usdrt, single_threaded, only_find_duplicates, set_times

bool

False

enable_full_scene, ignore_invisible_prims, new_task_manager

bool

True

start_time, end_time, tolerance

float

0.0

time_codes_per_second

float

24.0

max_local_depth_mode

ovclash.MaxLocalDepthMode

MaxLocalDepthMode.DISABLED

nb_tasks

int

128

with_updates(**kwargs) returns a copy with the named fields replaced. Run this script with the Python that has ovclash installed, and replace scene.usda with the path of your stage:

from ovclash import ClashRuntime, RunSettings

runtime = ClashRuntime()
try:
    runtime.open_stage("scene.usda")
    runtime.set_run_settings(RunSettings().with_updates(enable_point_clouds=True, tolerance=0.5))
    # Change one field and keep the others: pass the current settings as the base.
    runtime.set_run_settings(runtime.get_run_settings(), tolerance=0.0)
finally:
    runtime.destroy()

ClashRuntime.set_run_settings(settings=None, **kwargs) applies settings with kwargs replacing fields, and returns the effective settings:

  • Every call resets the settings that RunSettings does not model to the engine table.

  • Without a base, it starts from RunSettings(), so fields you do not pass take their dataclass defaults. Pass runtime.get_run_settings() as the base to keep them.

  • It raises ValueError for a value out of range or not finite, before anything is applied. A rejected call leaves the previous settings in place.

  • It closes open overlap reports and discards the pipeline. Completed results stay.

The native context stores no set_times flag, so get_run_settings() reports set_times=True only when a native time is non-zero. After set_times=False, and on a new runtime, all three native times are 0.0. A time range enabled from that read-back keeps the 0.0 rate and takes one sample, so pass time_codes_per_second as well.

Suite C#

ovclash_suite_run_settings_t in <ovclash_suite/ovclash_suite_types.h> is a flat struct of uint32_t flags and counts and double tolerances and times. A flag is 0 for false and non-zero for true. Every field is required, so start from ovclash_suite_get_default_run_settings, which fills it with these defaults:

Fields

C type

Default

enable_log, dynamic, purge_permanent_dynamic_overlaps, only_find_duplicates, ignore_redundant_overlaps, enable_point_clouds, single_threaded, any_hit, quantized, subcomponent_filtering, compute_max_local_depth, discard_touching_contacts, set_times

uint32_t flag

0

enable_full_scene, purge_permanent_static_overlaps, ignore_invisible_prims, use_usdrt, new_task_manager, coplanar, tight_bounds

uint32_t flag

1

max_local_depth_mode

uint32_t, 0 to 2

1

nb_tasks

uint32_t, 0 to 1000000

128

tris_per_leaf

uint32_t, 1 to 15

15

overlap_code

uint32_t

3

triangle_limit

uint32_t

0

dynamic_start_time, dynamic_end_time, static_time, start_time, end_time, time_codes_per_second, tolerance, point_size_override

double

0.0

pose_epsilon, area_epsilon

double

1e-6

bounds_epsilon

double

0.01

depth_epsilon, contact_cutoff

double

-1.0

Names in each API maps each field to its setting. This function belongs in a C source file of your program; runtime is a runtime from ovclash_suite_create_runtime:

#include <stdio.h>

#include <ovclash_suite/ovclash_suite.h>

/* Applies the Suite defaults with high-mode depth computation. Returns 0 on success. */
static int apply_suite_settings(ovclash_suite_runtime_t* runtime)
{
    ovclash_suite_run_settings_t settings;
    ovclash_suite_get_default_run_settings(&settings);
    settings.compute_max_local_depth = 1;
    settings.max_local_depth_mode = 2; /* high, on the Suite scale */
    if (ovclash_suite_set_run_settings(runtime, &settings).status != OVCLASH_SUITE_STATUS_SUCCESS)
    {
        ovclash_suite_string_t error = ovclash_suite_get_last_error(runtime);
        fprintf(stderr, "%.*s\n", (int)error.length, error.ptr);
        return 1;
    }
    return 0;
}

ovclash_suite_set_run_settings rejects a struct with any out-of-range field, keeps the previous settings and names the field in the last-error text. With tris_per_leaf = 16, for example, it reads tris_per_leaf must be in [1, 15]. It rejects:

  • a non-finite double;

  • a value outside the float range in a field that the engine stores as float: pose_epsilon, bounds_epsilon, area_epsilon, contact_cutoff, tolerance, point_size_override, and depth_epsilon while discard_touching_contacts is set;

  • max_local_depth_mode above 2, nb_tasks above 1000000, tris_per_leaf outside 1 to 15;

  • a negative time_codes_per_second;

  • a non-zero set_times with end_time below start_time.

The call also fails while an async pipeline or a fetch, a fetch-and-save operation that is not yet destroyed, is alive. A scope set with ovclash_suite_set_scope survives it, in either call order. ovclash_suite_get_run_settings returns the last accepted struct, including the Suite-only fields that the engine does not store.

ovclash_suite Python#

DEFAULT_SETTINGS is a dict[SettingId, Any] built at import from ovclash_suite_get_default_run_settings, so the Python defaults match the native ones. ClashDetection starts from a copy, and ClashDetection.get_default_setting_value(setting_id) reads one entry.

ClashDetection.set_settings(settings, stage=None, *, time_codes_per_second=None) takes a partial mapping:

from ovclash_suite import ClashDetection, SettingId

clash = ClashDetection()
try:
    clash.set_settings({SettingId.SETTING_TOLERANCE: 0.5, "SETTING_ENABLE_POINT_CLOUDS": True}, "scene.usda")
finally:
    clash.destroy()
  • A key is a SettingId member, its integer value or its name. Other keys are ignored without an error.

  • A missing key takes its DEFAULT_SETTINGS value, so each call sets the whole table.

  • Full-scene traversal is always on.

  • stage names the stage file, or a stage object whose root layer names it. A different file is opened, which drops the scope.

  • It raises ValueError for a resolved value out of range or not finite, and RuntimeError when the native call rejects the settings or an async operation is alive.

ovclash_suite.RunSettings is the complete Suite payload as a dataclass, and default_run_settings() returns the native defaults in that form. ClashDetection does not take it; Persisted query settings does. Each field carries the ovclash_suite_run_settings_t field of the same name, with the range that Suite C gives, and Names in each API maps it to its setting. Every field is optional:

Field

Type

Required

Default or values

Description

enable_log, dynamic, purge_permanent_dynamic_overlaps, only_find_duplicates, ignore_redundant_overlaps, enable_point_clouds, single_threaded, any_hit, quantized, subcomponent_filtering, compute_max_local_depth, discard_touching_contacts, set_times

bool

No

False

The Suite C flags of the same names.

enable_full_scene, purge_permanent_static_overlaps, ignore_invisible_prims, use_usdrt, new_task_manager, coplanar, tight_bounds

bool

No

True

The Suite C flags of the same names.

max_local_depth_mode

int

No

1; 0 to 2

The depth mode on the Suite scale, read only while compute_max_local_depth is set.

nb_tasks

int

No

128; 0 to 1000000

The task count.

tris_per_leaf

int

No

15; 1 to 15

Triangles per leaf.

overlap_code

int

No

3

The intersection kernel.

triangle_limit

int

No

0, unlimited

The triangle limit.

dynamic_start_time, dynamic_end_time, static_time

float

No

0.0

Persisted query metadata that the runtime does not read.

start_time, end_time

float

No

0.0

The sampled range, in seconds.

time_codes_per_second

float

No

24.0; default_run_settings() returns 0.0

The query’s samples per second.

tolerance, point_size_override

float

No

0.0

The tolerance and the point size, in stage units.

pose_epsilon, area_epsilon

float

No

1e-6

The pose and area epsilons.

bounds_epsilon

float

No

0.01

The bounds epsilon.

depth_epsilon, contact_cutoff

float

No

-1.0

The depth epsilon and the contact cutoff.

RunSettings.with_updates(**kwargs) returns a copy with the named fields replaced.

Persisted query settings#

A ClashQuery stores its settings as a JSON object whose keys are the SettingId names, such as SETTING_TOLERANCE. Generate that text instead of spelling the names by hand:

  • C: ovclash_suite_run_settings_to_query_settings_json(settings, buffer, size, &required).

  • Python: ovclash_suite.run_settings_to_query_settings_json(settings), or run_settings_to_query_settings_dict(settings) for the decoded dict.

The JSON has one key per SettingId member, and the writer always writes every key. It does not carry start_time, end_time, time_codes_per_second, set_times or enable_full_scene. Each key carries one Suite C field, and the default is the value written for ovclash_suite_get_default_run_settings:

Key

JSON type

Suite C field

Default

SETTING_LOGGING

boolean

enable_log

false

SETTING_DYNAMIC

boolean

dynamic

false

SETTING_DYNAMIC_START_TIME

number

dynamic_start_time

0.0

SETTING_DYNAMIC_END_TIME

number

dynamic_end_time

0.0

SETTING_PURGE_PERMANENT_OVERLAPS

boolean

purge_permanent_dynamic_overlaps

false

SETTING_QUANTIZED

boolean

quantized

false

SETTING_SINGLE_THREADED

boolean

single_threaded

false

SETTING_NEW_TASK_MANAGER

boolean

new_task_manager

true

SETTING_FILTER_TEST

boolean

subcomponent_filtering

false

SETTING_TIGHT_BOUNDS

boolean

tight_bounds

true

SETTING_COPLANAR

boolean

coplanar

true

SETTING_NB_TASKS

integer

nb_tasks

128

SETTING_POSE_EPSILON

number

pose_epsilon

1e-6

SETTING_BOUNDS_EPSILON

number

bounds_epsilon

0.01

SETTING_AREA_EPSILON

number

area_epsilon

1e-6

SETTING_TRIS_PER_LEAF

integer

tris_per_leaf

15

SETTING_TOLERANCE

number

tolerance

0.0

SETTING_ANY_HIT

boolean

any_hit

false

SETTING_OVERLAP_CODE

integer

overlap_code

3

SETTING_DUP_MESHES

boolean

only_find_duplicates

false

SETTING_STATIC_TIME

number

static_time

0.0

SETTING_COMPUTE_MAX_LOCAL_DEPTH

boolean

compute_max_local_depth

false

SETTING_DEPTH_EPSILON

number

depth_epsilon

-1.0

SETTING_DISCARD_TOUCHING_CONTACTS

boolean

discard_touching_contacts

false

SETTING_PURGE_PERMANENT_STATIC_OVERLAPS

boolean

purge_permanent_static_overlaps

true

SETTING_USE_USDRT

boolean

use_usdrt

true

SETTING_TRIANGLE_LIMIT

integer

triangle_limit

0

SETTING_IGNORE_REDUNDANT_OVERLAPS

boolean

ignore_redundant_overlaps

false

SETTING_IGNORE_INVISIBLE_PRIMS

boolean

ignore_invisible_prims

true

SETTING_CONTACT_CUTOFF

number

contact_cutoff

-1.0

SETTING_MAX_LOCAL_DEPTH_MODE

integer

max_local_depth_mode

1

SETTING_ENABLE_POINT_CLOUDS

boolean

enable_point_clouds

false

SETTING_POINT_SIZE_OVERRIDE

number

point_size_override

0.0

Suite C gives each field’s range. Numbers are written with 17 significant digits so that they round-trip exactly; the default epsilon 1e-6 is written as 9.9999999999999995e-07. Negative zero is written as -0.0. The text does not depend on the caller’s locale or floating-point environment. A non-finite field fails the call.