Requirements#

Warning

This feature is currently a work in progress.

What is a requirement?#

A requirement is a specific condition that must be met for an asset to be considered valid.

A requirement may contain attributes as:

  • A code to identify the requirement.

  • A message to display when the requirement is not met.

  • A path to a documentation page that explains the requirement.

  • A compatibility tag that indicates the requirement is only relevant to certain use cases.

Requirements may contain more information in the future.

What is a capability?#

A capability is a collection of requirements. It is used to group requirements that are related to a specific feature.

Where are requirements defined?#

Requirements need to conform to the contract omni.asset_validator.Requirement defined in omni.asset_validator. As such, any class conforming to this contract can be used as a requirement.

In particular, requirements in Asset Validator are defined in the omni.capabilities module. We will use it in the following examples.

Adding requirements to your validation rules#

To add requirements to your validation rules, you can use the register_requirement decorator. Here’s an example:

import omni.capabilities as cap
from omni.asset_validator import register_requirement, BaseRuleChecker

@register_requirement(cap.GeometryRequirements.VG_001)
class CustomRule(BaseRuleChecker):
    def __init__(self, parameters):
        super().__init__(parameters)

To report an issue, for example with the AddFailedCheck method, you can use the following code:

self._AddFailedCheck(
    requirement=cap.GeometryRequirements.VG_001,
    at=source,
)

The requirement will automatically fill in attributes such as the message, path, and compatibility tag. To override these attributes, you can set them manually, for example to change the message:

self._AddFailedCheck(
    requirement=cap.GeometryRequirements.VG_001,
    at=source,
    message="Custom message",
)

Requirements#

Code

Message

Rule

AA.002

Asset must use only supported file types

SupportedFileTypesChecker

AA.001

Asset references should use anchored paths

AnchoredAssetPathsChecker

AA.OV.001

Texture UDIMs are not supported in USDZ files in NVIDIA Omniverse

UsdzUdimLimitationChecker

AA.003

Asset paths should use forward slashes for cross-platform portability

PortableAssetPathChecker

UN.001

Stage must specify upAxis to define the orientation of the stage

StageMetadataChecker

UN.002

Stage must specify metersPerUnit to define the linear unit scale

StageMetadataChecker

VG.002

Boundable geometry primitives should have valid extent values.

ExtentsChecker

VG.010

Do not subdivide meshes with Normals.

SubdivisionSchemeChecker

VG.007

Mesh geometry must be manifold

ManifoldChecker

VG.009

Use indexed primvars when values are repeated

IndexedPrimvarChecker

VG.018

Mesh topology should be without unused vertices, edges, or faces.

UnusedMeshTopologyChecker

VG.019

Faces should have non-zero area.

ZeroAreaFaceChecker

VG.016

Each vertex position should be unique

WeldChecker

VG.014

Mesh topology must be valid

ValidateTopologyChecker

VG.011

Only include primvars that are actively used

UnusedPrimvarChecker

VG.027

All non-subdivided meshes must have normals.

NormalsExistChecker

VG.028

Mesh normals values must be valid to produce correct shading.

NormalsValidChecker

VG.029

The winding order of faces in a mesh must correctly represent the orientation (front/back) of the face.

NormalsWindingsChecker

VG.MESH.001

All geometry shall be represented as non-subdivided mesh primitives using the UsdGeomMesh schema.

_ContainsMeshChecker

VG.025

Geometry shall be defined as such that the asset is correctly positioned and oriented at the origin (0,0,0).

_AssetOriginPositioningChecker

HI.004

Stage must specify a default prim to define the root entry point.

DefaultPrimChecker

VM.MDL.001

MDL material source assets must be properly referenced and accessible to ensure material loading and rendering.

MaterialPathChecker

VM.BIND.001

Material bindings must use appropriate scope to ensure proper material assignment and inheritance.

MaterialOutOfScopeChecker

VM.PS.001

Material attributes must comply with the UsdPreviewSurface specification to ensure consistent rendering and viewer compatibility.

MaterialUsdPreviewSurfaceChecker

VM.MDL.002

MDL Shaders must standard OpenUSD shader source attributes to ensure compatibility.

MaterialOldMdlSchemaChecker

RB.005

Rigid bodies cannot be part of a scene graph instance.

RigidBodyChecker

RB.003

Rigid bodies have to be UsdGeomXformable prims.

RigidBodyChecker

RB.009

Rigid bodies have to be UsdGeomXformable prims without skew matrix.

RigidBodyChecker

RB.COL.004

The collision shape scale must be uniform for the following geometries: Sphere, Capsule, Cylinder, Cone & Points.

ColliderChecker

JT.002

Targets set to Body0 and Body1 relationships must exist.

PhysicsJointChecker

JT.003

Body0 and Body1 relationships must not have more than one target.

PhysicsJointChecker

JT.ART.002

Articulation roots cannot be nested.

ArticulationChecker

JT.ART.004

Articulations are not allowed on static bodies.

ArticulationChecker

RB.007

Rigid bodies _or_ their descendent collision shapes should have a mass & their other inertial properties explicitly specified.

MassChecker

HI.001

Prim hierarchy must have a single root prim.

_HierarchyHasRootChecker

HI.003

The root prim of the asset hierarchy must be transformable

_RootPrimXformableChecker

VG.RTX.001

World space bounds must not exceed RTX limit.

AlmostExtremeExtentChecker

VG.020

The values of the points attribute must not exceed the limit at which a given precision can be represented using 32-bit floats.

PointsPrecisionChecker

UN.006

Stage must specify upAxis = “Z” to define the orientation of the stage

_UpAxisZChecker

UN.007

Stage must specify metersPerUnit = 1.0 to define the linear unit scale

_UnitsInMetersChecker