MaterialX Python API Documentation¶
The MaterialX Python API provides Python bindings for the MaterialX C++ API .
MaterialX is an open standard for representing rich material and look-development content in computer graphics, enabling its platform-independent description and exchange across applications and renderers. Launched at Industrial Light & Magic in 2012, MaterialX has been a key technology in their feature films and real-time experiences since Star Wars: The Force Awakens and Millennium Falcon: Smugglers Run. The project was released as open source in 2017, with companies including Sony Pictures Imageworks, Pixar, Autodesk, Adobe, and SideFX contributing to its ongoing development. In 2021, MaterialX became the seventh hosted project of the Academy Software Foundation .
MaterialX Python API¶
The MaterialX Python API consists of two parts:
A set of MaterialX Python Modules that are implemented as Python C extensions that correspond to MaterialX C++ libraries.
A Python package named
MaterialXthat wraps the MaterialX Python modules to provide a more pythonic interface, in particular for working with the Element Classes and Value Classes ofPyMaterialXCore.
The MaterialX Python package is typically imported aliased as mx:
import MaterialX as mx
All functions and classes from the PyMaterialXCore and PyMaterialXFormat
modules are available in the top-level MaterialX namespace, and, by aliasing,
the mx namespace.
For example, the PyMaterialXCore.Matrix44 class is typically used as
mx.Matrix44:
>>> import MaterialX as mx
>>> mx.Matrix44
<class 'MaterialX.PyMaterialXCore.Matrix44'>
You can use the Quick search box in the sidebar on the left to quickly find documentation for a particular module, function, class, method, or attribute of interest, for example getUdimCoordinates or MeshPartition.
MaterialX Python Modules¶
Core MaterialX elements and graph traversal. |
|
Cross-platform support for document serialization and file utilities. |
|
Core shader generation support for MaterialX. |
|
Shader generation using the OpenGL Shading Language. |
|
Shader generation using Open Shading Language. |
|
Shader generation using the Material Definition Language. |
|
Shader generation using the Metal Shading Language. |
|
Core rendering support for MaterialX. |
|
Rendering support for the OpenGL Shading Language. |
|
Rendering support for Open Shading Language. |
|
Rendering support for the Metal Shading Language. |