Validators#
Custom USD asset validation rules built on omniverse-asset-validator. This standalone validator runs outside of Kit and is useful for CI/CD pipelines or environments without GPU access.
Prerequisites#
Install uv.
Available Rules#
Rule |
Description |
|---|---|
|
Validates that the stage upAxis is |
|
Validates AIF metadata requirements (properties sublayer, core/spec attributes) |
|
Validates that the stage has a single root prim, excludes |
|
Validates that the root prim is xformable |
|
Validates that metersPerUnit is |
|
Validates that the root prim has an identity transform (at origin) |
|
Validates that the stage has a default prim |
|
Validates that boundable prims have correct extent attributes |
|
Validates mesh normals are finite and match interpolation counts |
|
Validates meshes have normals unless subdivision is set |
|
Validates mesh topology on all time samples |
|
Validates mesh normals are consistent with face windings |
|
Validates all geometry prims are |
Usage#
# Run all AIF rules on an asset
uv run --directory oav validate --category AIF /path/to/asset.usd
# Run a specific rule
uv run --directory oav validate --rule AIFMetadataChecker /path/to/asset.usd
# Run all rules
uv run --directory oav validate /path/to/asset.usd
# Show help
uv run --directory oav validate --help
Writing Custom Rules#
Implement custom validation rules by extending BaseRuleChecker. Here is a minimal example from oav/aif_validators/up_axis_z.py:
from omni.asset_validator import BaseRuleChecker, register_rule
from pxr import Usd, UsdGeom
@register_rule("AIF")
class UpAxisZChecker(BaseRuleChecker):
"""Validates that stage upAxis is 'Z'."""
def CheckStage(self, stage: Usd.Stage) -> None:
up_axis = UsdGeom.GetStageUpAxis(stage)
if up_axis != UsdGeom.Tokens.z:
self._AddFailedCheck(
message=f"Stage has upAxis of '{up_axis}', not 'Z'.", at=stage
)
Kit Compared to Standalone Validation#
This project offers two validation paths that differ in runtime, rule set, and performance:
Kit Validation |
Omni Asset Validator (OAV) |
|
|---|---|---|
Runtime |
Runs inside a Kit application (USD Composer or headless Kit) |
Standalone Python library ( |
Rule set |
Built-in rules from |
Custom AIF rules in |
Performance |
Scene Optimizer substitutes C-accelerated implementations for some rules |
Pure Python on |
GPU required |
Yes (Kit requires a GPU) |
No |
Best for |
Interactive use, large assets, production pipelines with Kit available |
CI/CD pipelines, lightweight local checks, environments without GPU |
CLI command |
|
|
The two paths share the same rule authoring API (BaseRuleChecker) - rules written for one are API-compatible with the other. However, they currently run overlapping but separate rule sets: Kit validation does not load the custom AIF rules from oav/, and the standalone OAV CLI does not have access to Scene Optimizer’s C-accelerated rules.
See also
CAD to USD - Where validation fits in the pipeline
Asset Guide - Standards these validators enforce
CLI Reference - CLI validation commands (Kit-based)