Rules

class omni.asset_validator.ARKitFileExtensionChecker

Only layer files and textures are allowed in a package.

class omni.asset_validator.ARKitLayerChecker

All included layers that participate in composition should have one of the core supported file formats.

class omni.asset_validator.ARKitMaterialBindingChecker

All material binding relationships must have valid targets.

class omni.asset_validator.ARKitPackageEncapsulationChecker

If the root layer is a package, then the composed stage should not contain references to files outside the package. In other words, the package should be entirely self-contained.

class omni.asset_validator.ARKitPrimTypeChecker

UsdGeomPointInstancers and custom schemas not provided by core USD are not allowed.

class omni.asset_validator.ARKitRootLayerChecker

The root layer of the package must be a usdc file and must not include any external dependencies that participate in stage composition.

class omni.asset_validator.ARKitShaderChecker

Shader nodes must have “id” as the implementationSource, with id values that begin with “Usd*”. Also, shader inputs with connections must each have a single, valid connection source.

class omni.asset_validator.ByteAlignmentChecker

Files within a usdz package must be laid out properly, i.e. they should be aligned to 64 bytes.

class omni.asset_validator.CompressionChecker

Files within a usdz package should not be compressed or encrypted.

class omni.asset_validator.ExtentsChecker

Boundable prims have the extent attribute. For point based prims, the value of the extent must be correct at each time sample of the point attribute

class omni.asset_validator.KindChecker

All kinds must be registered and conform to the rules specified in the USD Glossary.

class omni.asset_validator.MissingReferenceChecker

The composed USD stage should not contain any unresolvable asset dependencies (in every possible variation of the asset), when using the default asset resolver.

class omni.asset_validator.NormalMapTextureChecker

UsdUVTexture nodes that feed the inputs:normals of a UsdPreviewSurface must ensure that the data is encoded and scaled properly. Specifically:

  • Since normals are expected to be in the range [(-1,-1,-1), (1,1,1)], the Texture node must transform 8-bit textures from their [0..1] range by setting its inputs:scale to [2, 2, 2, 1] and inputs:bias to [-1, -1, -1, 0]

  • Normal map data is commonly expected to be linearly encoded. However, many image-writing tools automatically set the profile of three-channel, 8-bit images to SRGB. To prevent an unwanted transformation, the UsdUVTexture’s inputs:sourceColorSpace must be set to “raw”. This program cannot currently read the texture metadata itself, so for now we emit warnings about this potential infraction for all 8 bit image formats.

class omni.asset_validator.PrimEncapsulationChecker

Check for basic prim encapsulation rules:

  • Boundables may not be nested under Gprims

  • Connectable prims (e.g. Shader, Material, etc) can only be nested inside other Container-like Connectable prims. Container-like prims include Material, NodeGraph, Light, LightFilter, and exclude Shader

class omni.asset_validator.StageMetadataChecker

All stages should declare their ‘upAxis’ and ‘metersPerUnit’. Stages that can be consumed as referencable assets should furthermore have a valid ‘defaultPrim’ declared, and stages meant for consumer-level packaging should always have upAxis set to ‘Y’

class omni.asset_validator.TextureChecker

A RuleChecker which handles locating texture files automatically.

Texture files should be readable by intended client (only .jpg or .png for consumer-level USDZ). Derived classes can reimplement TextureChecker._CheckTexture.

class omni.asset_validator.TypeChecker

All prims must have a type defined.

class omni.asset_validator.SubdivisionSchemeChecker

USD default value for subdivision scheme is Catmull-Clark. This is often overlooked and incorrect for tessellated CAD geometry. Additionally, it’s often overlooked that normals should not be authored on a subdivision mesh.

Requirements

GEO.MESH.PERF010

class omni.asset_validator.ManifoldChecker

Counts the number of non-manifold edges and vertices. A non-manifold edge has more than two adjacent faces. A non-manifold vertex as more than two adjacent border edges, where a border edge is an edge with only one adjacent face.

Works on non time varying geometry.

Requirements

GEO.MESH.TOPO001

class omni.asset_validator.IndexedPrimvarChecker

For Primvars with non-constant values of interpolation, it is often the case that the same value is repeated many times in the array.

An indexed primvar can be used in such cases to optimize for data storage if the primvar’s interpolation is non-constant (i.e. uniform, varying, face varying or vertex).

Requirements

GEO.MESH.PERF009

class omni.asset_validator.UnusedMeshTopologyChecker

Points which are not referenced by the indices can be removed.

Works on non time varying geometry.

Requirements

GEO.MESH.PERF011

class omni.asset_validator.ZeroAreaFaceChecker

Faces with zero area can be removed. May produce welding after removal.

Works on non time varying geometry.

Requirements

GEO.MESH.PERF014

class omni.asset_validator.WeldChecker

If attributes contain equal values they can be unified and the indices adjusted accordingly.

Works on non time varying geometry.

Requirements

GEO.MESH.PERF013

class omni.asset_validator.ValidateTopologyChecker

Validate the topology of a mesh on all time samples.

Requirements

GEO.MESH.TOPO002

class omni.asset_validator.UnusedPrimvarChecker

Values which are not referenced by the indices in a primvar can be removed.

Works on non time varying geometry.

Requirements

GEO.MESH.PERF012

class omni.asset_validator.LayerSpecChecker

This checker validates all LayerSpecs to ensure their type names and values types conform to SdfValueTypeNames. Also, their value types (including timesamples) should match the underlying type names.

class omni.asset_validator.UsdAsciiPerformanceChecker

For performance reasons, large arrays and time samples are better stored in crate files. This alerts users to any layers which contain large arrays or time sample dictionaries stored in .usda or ASCII backed .usd files.

class omni.asset_validator.DanglingOverPrimChecker

Prims usually need a def or class specifier, not just over specifiers. However, such overs may be used to hold relationship targets, attribute connections, or speculative opinions.

class omni.asset_validator.DefaultPrimChecker

When working with layers that represent assets, it is often useful to have a single, active, Xformable or Scope type root prim as the layers default prim.

class omni.asset_validator.MaterialOutOfScopeChecker

USD ignores material bindings which target materials that are outside the payloads’ hierarchy.

Requirements

MATERIAL.BIND001

class omni.asset_validator.MaterialPathChecker

MDL assets require absolute paths or relative paths prefixed with ./ to resolve properly. This Rule suggests to prefix ambiguous MDL asset path(s) with a ./ to enforce that it is a relative path (i.e ./M_PlantSet_A13.mdl).

Requirements

MATERIAL.MDL001

class omni.asset_validator.MaterialUsdPreviewSurfaceChecker

Rule ensuring that UsdShadeShader prims conform to the UsdPreviewSurface specification.

Requirements

MATERIAL.PREVIEW001

class omni.asset_validator.ShaderImplementationSourceChecker

Shader prims require a source implementation, which can be one of “id” (for builtins), “sourceAsset” (for assets), or “sourceCode” (for inline JIT compiled shaders). Source Asset or Source Code Shaders can have multiple implementations (e.g. one per renderer) which are differentiated by an arbitrary sourceType prefix.

class omni.asset_validator.UsdDanglingMaterialBinding

Rule ensuring that the bound material exists in the scene.

class omni.asset_validator.UsdMaterialBindingApi

Rule ensuring that the MaterialBindingAPI is applied on all prims that have a material binding property.

class omni.asset_validator.SkelBindingAPIAppliedChecker

A prim providing skelBinding properties, must have SkelBindingAPI applied on the prim.

class omni.asset_validator.UsdGeomSubsetChecker

Ensures that a valid family name attribute is set for every UsdGeomSubset that has a material binding.

class omni.asset_validator.UsdLuxSchemaChecker

In USD 21.02, Lux attributes were prefixed with inputs: to make them connectable. This rule checker ensure that all UsdLux attributes have the appropriate prefix.