USD material support
This topic explains notes relating to current material support in Maya USD. Development is ongoing and hence, best practices are denoted on below.
Import/ Export
Maya Materials
- Lambert: Color on import might not apply correctly. For better results on import, conver to Lambert shaders. Note that by default, Maya Lambert has one attribute for Color and one for Diffuse. Diffuse is set by default to a factor of 0.8. On USD export, the diffuse value is captured as 1.o. This signifies that on import it will display slightly brighter than the original. Lambert uses Transparency which is a 3-channel input and USD Preview Surface uses Opacity, which is a single channel input. Currently no translation exists for this.
- Stingray_PBS: No Translation seems to exist. Exporting an object with textures can often import without them. Lambert1 can be assigned to objects instead of UsdPreviewSurface.
- Standard Surface: Appears to have the best results. Displacement maps are supported.Caveats include no support for roughness color, coat color, sheen. Exporting Standard Surface to USD Preview Surface will be lossy.
Note: There is no support for node inputs (ie. if a multiply/divide node is attached, it will not be captured and imported back in)
Supported image file formats: The image reader for MayaUSD is facilitated through OpenImageIO (an open source library for image reading). MayaUSD should be able to open any image supported by OpenImageIO. MayaUSD also supports OpenEXR textures, 8, 16 and 32 bits, single channel, RGB and RGBA.
Best practice
For best results (in regard to achieving similar results to your original file), on import, convert to your original material used.
Note: UsdPreviewSurface
round trips perfectly. However, some features are unsupported in VP2 render delegate and might not display. The file can be checked using USD View for metadata and inputs to verify that your data is being brought into Maya.
Important: Recent versions of MtoA support USD Preview Surface rendering in Arnold.
Texture Support: MayaUsd supports OpenEXR textures, 8, 16 and 32 bits, single channel, RGB and RGBA.
Extended translation framework
Support integration is available for render context-specific translators such as Arnold (MtoA export integration), MaterialX and other common third party renderers. This enables a lossless interchange of materials when exporting StandardSurface to UsdPreviewSurface with MaterialX node definitions.
Translation framework extensions allow the ability to register:
- translators for applied schema types
- translators for specific render settings nodes
- translator for a specific render context (and only use them when a render context export is selected)
- preserved applied schemas on import/export
How it works
Schema adaptors are an excellent mechanism to provide a USD abstraction on top of Maya data. They currently work by adding dynamic attributes on Maya nodes to store the values of applied schemas. The list of applied schemas is retained as metadata on the Maya node itself.
These capabilities have been expanded to allow an adaptor to work on static properties found in the scene as well. Here are some examples:
- If the Arnold specific properties of an aiSkyDomeLight are mapped to an Arnold-specific schema, then the export could be done via a plugin adaptor that applies the Arnold schema to a UsdLux light.
- A lot of Maya nodes and attributes found in a Bullet simulation can be exported to UsdPhysics schema directly as long as the plug-in adaptor can detect Bullet nodes and adapt them.
This has been implemented with the following steps:
- A mechanism created to register a plugin adaptor for a registered USD schema applied to a Maya node.
- At any time the plugin will be able to detect if the Maya node or its environment can be adapted. This includes being able to Apply and Unapply the schema at will by modifying the Maya scene as necessary.
- Knowing which Maya attributes map to its USD counterpart and being able to provide the correct plug to a requested AttributeAdaptor.
Limitations: Adaptors currently map attributes and metadata. For completeness, they will also have to be able to map relationships, which requires either a postPostExport step or a chaser.