Rules
Basic
- class omni.asset_validator.core.ByteAlignmentChecker
Files within a usdz package must be laid out properly, i.e. they should be aligned to 64 bytes.
- class omni.asset_validator.core.CompressionChecker
Files within a usdz package should not be compressed or encrypted.
- class omni.asset_validator.core.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.core.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.core.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.core.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.core.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.core.KindChecker
All kinds must be registered and conform to the rules specified in the USD Glossary.
- class omni.asset_validator.core.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.core.TypeChecker
All prims must have a type defined.
Omniverse Geometry
- class omni.asset_validator.core.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.
- class omni.asset_validator.core.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.
- class omni.asset_validator.core.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).
- class omni.asset_validator.core.UnusedMeshTopologyChecker
Points which are not referenced by the indices can be removed.
Works on non time varying geometry.
- class omni.asset_validator.core.UnusedPrimvarChecker
Values which are not referenced by the indices in a primvar can be removed.
Works on non time varying geometry.
- class omni.asset_validator.core.ZeroAreaFaceChecker
Faces with zero area can be removed. May produce welding after removal.
Works on non time varying geometry.
- class omni.asset_validator.core.WeldChecker
If attributes contain equal values they can be unified and the indices adjusted accordingly.
Works on non time varying geometry.
- class omni.asset_validator.core.ValidateTopologyChecker
Validate the topology of a mesh on all time samples.
Omniverse Naming Conventions
- class omni.asset_validator.core.OmniInvalidCharacterChecker
Prim names in Omniverse cannot include any of the following characters:
Special symbols: ! @ # $ & * % | ~
Brackets: [ ] ( ) { } < >
Punctuation: , . `
Omniverse Layout
- class omni.asset_validator.core.OmniDefaultPrimChecker
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.core.OmniOrphanedPrimChecker
Prims usually need a
def
orclass
specifier, not justover
specifiers. However, such overs may be used to hold relationship targets, attribute connections, or speculative opinions.
Omniverse Material
- class omni.asset_validator.core.OmniMaterialPathChecker
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
).
- class omni.asset_validator.core.OmniMaterialOutOfScopeChecker
USD ignores material bindings which target materials that are outside the payloads’ hierarchy.
- class omni.asset_validator.core.OmniMaterialUsdPreviewSurfaceChecker
Rule ensuring that UsdShadeShader prims conform to the UsdPreviewSurface specification.
USD Schema
- class omni.asset_validator.core.UsdGeomSubsetChecker
Ensures that a valid family name attribute is set for every UsdGeomSubset that has a material binding.
- class omni.asset_validator.core.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.core.UsdMaterialBindingApi
Rule ensuring that the MaterialBindingAPI is applied on all prims that have a material binding property.
- class omni.asset_validator.core.UsdDanglingMaterialBinding
Rule ensuring that the bound material exists in the scene.
- class omni.asset_validator.core.SkelBindingAPIAppliedChecker
A prim providing skelBinding properties, must have SkelBindingAPI applied on the prim.
USD Performance
- class omni.asset_validator.core.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.
Apple ARKit
The following rules are disabled by default.
- class omni.asset_validator.core.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.core.ARKitLayerChecker
All included layers that participate in composition should have one of the core supported file formats.
- class omni.asset_validator.core.ARKitPrimTypeChecker
UsdGeomPointInstancers and custom schemas not provided by core USD are not allowed.
- class omni.asset_validator.core.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.core.ARKitMaterialBindingChecker
All material binding relationships must have valid targets.
- class omni.asset_validator.core.ARKitFileExtensionChecker
Only layer files and textures are allowed in a package.
- class omni.asset_validator.core.ARKitRootLayerChecker
The root layer of the package must be a usdc file and must not include any external dependencies that participate in stage composition.