Rules#
- class omni.asset_validator.AnchoredAssetPathsChecker#
Asset references should use anchored paths. For reproducible results, asset references should use anchored paths (paths that begin with “./” or “../”) rather than absolute paths or search paths. Paths containing “../” should also be encapsulated and avoid to target locations above the asset root.
Requirements |
- class omni.asset_validator.SupportedFileTypesChecker#
For maximum portability, assets should only use file types that are widely supported across platforms. This includes specific formats for USD files, images, and audio. Use only the following file types: USD files: usda, usdc, usd, usdz Image files: png, jpeg/jpg, exr Audio files: M4A, MP3, WAV
Requirements |
- 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 |
- 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 |
- 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 |
- class omni.asset_validator.UnusedMeshTopologyChecker#
Points which are not referenced by the indices can be removed.
Works on non time varying geometry.
Requirements |
- class omni.asset_validator.ZeroAreaFaceChecker#
Faces with zero area can be removed. May produce welding after removal.
Works on non time varying geometry.
Requirements |
- 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 |
- class omni.asset_validator.ValidateTopologyChecker#
Validate the topology of a mesh on all time samples.
Requirements |
- 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 |
- 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
orclass
specifier, not justover
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 |
- 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 |
- class omni.asset_validator.MaterialUsdPreviewSurfaceChecker#
Rule ensuring that UsdShadeShader prims conform to the UsdPreviewSurface specification.
Requirements |
- 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.ArticulationChecker#
Implements validation of the following requirements:
JT.ART.002: Articulation roots cannot be nested.
JT.ART.003: Articulations are not allowed on kinematic bodies.
JT.ART.004: Articulations are not allowed on static bodies.
Requirements |
- 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 |
- 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.
- class omni.asset_validator.RigidBodyChecker#
Implements validation of the following requirements:
RB.005: Rigid bodies cannot be part of a scene graph instance.
RB.006: Rigid bodies can not be nested unless xformOp reset xform stack is used.
RB.003: Rigid bodies have to be UsdGeomXformable prims.
RB.009: Rigid bodies have to be UsdGeomXformable prims without skew matrix.
- 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.