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 |
|---|---|---|
Asset must use only supported file types |
|
|
Asset references should use anchored paths |
|
|
Texture UDIMs are not supported in USDZ files in NVIDIA Omniverse |
|
|
Asset paths should use forward slashes for cross-platform portability |
|
|
Stage must specify upAxis to define the orientation of the stage |
||
Stage must specify metersPerUnit to define the linear unit scale |
||
Boundable geometry primitives should have valid extent values. |
||
Do not subdivide meshes with Normals. |
||
Mesh geometry must be manifold |
||
Use indexed primvars when values are repeated |
||
Mesh topology should be without unused vertices, edges, or faces. |
||
Faces should have non-zero area. |
||
Each vertex position should be unique |
||
Mesh topology must be valid |
||
Only include primvars that are actively used |
||
All non-subdivided meshes must have normals. |
||
Mesh normals values must be valid to produce correct shading. |
||
The winding order of faces in a mesh must correctly represent the orientation (front/back) of the face. |
||
All geometry shall be represented as non-subdivided mesh primitives using the UsdGeomMesh schema. |
|
|
Geometry shall be defined as such that the asset is correctly positioned and oriented at the origin (0,0,0). |
|
|
Stage must specify a default prim to define the root entry point. |
||
MDL material source assets must be properly referenced and accessible to ensure material loading and rendering. |
||
Material bindings must use appropriate scope to ensure proper material assignment and inheritance. |
||
Material attributes must comply with the UsdPreviewSurface specification to ensure consistent rendering and viewer compatibility. |
||
MDL Shaders must standard OpenUSD shader source attributes to ensure compatibility. |
||
Rigid bodies cannot be part of a scene graph instance. |
||
Rigid bodies have to be UsdGeomXformable prims. |
||
Rigid bodies have to be UsdGeomXformable prims without skew matrix. |
||
The collision shape scale must be uniform for the following geometries: Sphere, Capsule, Cylinder, Cone & Points. |
||
Targets set to Body0 and Body1 relationships must exist. |
||
Body0 and Body1 relationships must not have more than one target. |
||
Articulation roots cannot be nested. |
||
Articulations are not allowed on static bodies. |
||
Rigid bodies _or_ their descendent collision shapes should have a mass & their other inertial properties explicitly specified. |
||
Prim hierarchy must have a single root prim. |
|
|
The root prim of the asset hierarchy must be transformable |
|
|
World space bounds must not exceed RTX limit. |
|
|
The values of the points attribute must not exceed the limit at which a given precision can be represented using 32-bit floats. |
|
|
Stage must specify upAxis = “Z” to define the orientation of the stage |
|
|
Stage must specify metersPerUnit = 1.0 to define the linear unit scale |
|