material-mdl-source-asset#
Code |
VM.MDL.001 |
---|---|
Validator |
|
Compatibility |
open usd |
Tags |
✅ |
Summary#
MDL material source assets must be properly referenced and accessible to ensure material loading and rendering.
Description#
MDL material source assets must be properly referenced using the info:mdl:sourceAsset
attribute and must be accessible in the expected location. The source asset path should be relative to the USD file location.
Material paths in the info:mdl:sourceAsset property must:
Be present (not empty)
Have the .mdl extension
For relative paths, start with “./”
Reference an existing MDL file
Why is it required?#
Broken material references
Non-portable assets
Inconsistent rendering
Examples#
# Invalid: Missing MDL path
def Material "MissingPath" (
info:mdl:sourceAsset = @@
)
{
}
# Invalid: Wrong extension
def Material "WrongExtension" (
info:mdl:sourceAsset = @abc@ # Missing .mdl extension
)
{
}
# Invalid: Relative path without ./
def Material "IncorrectRelative" (
info:mdl:sourceAsset = @material.mdl@ # Should be ./material.mdl
)
{
}
# Invalid: Non-existent MDL file
def Material "MissingFile" (
info:mdl:sourceAsset = @./unknown.mdl@ # File doesn't exist
)
{
}
# Valid: Proper relative path to existing MDL
def Material "ValidMaterial" (
info:mdl:sourceAsset = @./material.mdl@
)
{
}
How to comply#
Ensure MDL path is specified
Add .mdl extension if missing
Prefix relative paths with “./”
Verify MDL file exists at specified path