Rules#

class omni.asset_validator.UsdzPackageValidator#
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.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’

Requirements

UN.001 UN.002

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.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.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.KindChecker#

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

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

Requirements

VG.002

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 so set incorrectly for tessellated CAD geometry.

This checker ensures that the subdivision scheme is explicitly defined. When it is defined, there is a choice between using subdivision or not.

Use the presence of normals to decide what to suggest as a fixer operation. If there are explicit normals, offer an option to disable subdivision to avoid overwriting these normals. If there are no normals, offer the option to enable subdivision so that normals are created.

Note that these choices are not always going to be the right ones, but they are reasonable defaults.

Requirements

VG.010

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

VG.007

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

VG.009

class omni.asset_validator.UnusedMeshTopologyChecker#

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

Works on non time varying geometry.

Requirements

VG.018

class omni.asset_validator.ZeroAreaFaceChecker#

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

Works on non time varying geometry.

Requirements

VG.019

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

VG.016

class omni.asset_validator.ValidateTopologyChecker#

Validate the topology of a mesh on all time samples.

Requirements

VG.014

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

VG.011

class omni.asset_validator.NormalsExistChecker#

Check that meshes have normals. All meshes should have normals unless they have the subdivision scheme set. Meshes cannot have both normals and subdivision set.

Requirements

VG.027

class omni.asset_validator.NormalsValidChecker#

Check that all normals have unit length, and that there are no non-finite values. Also checks that the supplied number of normal values agrees with the interpolation.

Requirements

VG.028

class omni.asset_validator.NormalsWindingsChecker#

Check that the mesh has normals that are consistent with the face windings, taking into account the ‘orientation’ attribute.

We define the meaning of agreement between a normal attribute value and the reference normal of a face (quite loosely) as the two having a positive inner product. We then sum these inner products, and if the sum is positive, it would be a relatively large number (close to the area of the surface) and this would indicate that the winding is right-handed. Otherwise, the sum would be a relatively large negative number to indicate a left-handed rule having been used for generation of normals.

Works on non time varying geometry.

Requirements

VG.029

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.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.

Requirements

HI.004

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.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

VM.MDL.001

class omni.asset_validator.MaterialOutOfScopeChecker#

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

Requirements

VM.BIND.001

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.MaterialUsdPreviewSurfaceChecker#

Rule ensuring that UsdShadeShader prims conform to the UsdPreviewSurface specification.

Requirements

VM.PS.001

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.MaterialOldMdlSchemaChecker#

Rule ensuring that the deprecated MDL schema is not being used.

The deprecated MDL schema worked by setting the ‘info:implementationSource’ property to ‘mdlMaterial’. The location of the MDL module was passed in via a custom attribute called ‘module’ of type ‘asset’. and the subIdentifier was passed in via a custom called ‘name’ of type ‘string’ or ‘token’.

Requirements

VM.MDL.002

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.

class omni.asset_validator.SkelBindingAPIAppliedChecker#

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

class omni.asset_validator.UnicodeNameChecker#

Checks prim, property, variant set, and variant names for ambiguities related to UTF encoding.

UTF-8 encoded strings may have sequences of code points that describe equivalent text rendered to the user. While USD does not enforce a normalization form, Unicode “Normalization Form C” (NFC) is preferred when creating new tokens and paths. This validator is implemented to strictly check the encoded strings to see if they are in NFC form. See https://unicode.org/reports/tr15/ for more information about Unicode Normalization forms.

In this validator, the following conditions are checked for interested objects: * Object names should be NFC normalized. That means no ambiguities will be presented when comparing two names. * Objects should not have ambiguous children when normalized using NFC, NFKC, NFKD, or NFD forms.

class omni.asset_validator.RigidBodyChecker#

Implements validation of the following requirements:

  • RB.005: Rigid bodies cannot be part of a scene graph instance.

  • RB.003: Rigid bodies have to be UsdGeomXformable prims.

  • RB.009: Rigid bodies have to be UsdGeomXformable prims without skew matrix.

Requirements

RB.005 RB.003 RB.009

class omni.asset_validator.ColliderChecker#

Implements validation of the following requirements:

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

Requirements

RB.COL.004

class omni.asset_validator.PhysicsJointChecker#

Implements validation of the following requirements:

  • JT.002: Targets set to Body0 and Body1 relationships must exist.

  • JT.003: Body0 and Body1 relationships must not have more than one target.

Requirements

JT.002 JT.003

class omni.asset_validator.ArticulationChecker#

Implements validation of the following requirements:

  • JT.ART.002: Articulation roots cannot be nested.

  • JT.ART.004: Articulations are not allowed on static bodies.

Requirements

JT.ART.002 JT.ART.004

class omni.asset_validator.MassChecker#

Implements validation of the following requirements:

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

Requirements

RB.007