MaterialX native support - Samples and tutorial

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
neonZorglub
OctaneRender Team
Posts: 1017
Joined: Sun Jul 31, 2016 10:08 pm

MaterialX native support
(available from version 2026.1 Alpha3 - 26.01)

MaterialX is an open exchange format for representing materials which allows using them across different applications and renderers.

ref:
Octane: viewtopic.php?t=84311
Official MaterialX page: https://materialx.org/


MaterialX in 3dsMax with Octane.

3dsMax has support for MaterialX from version 2022.
https://help.autodesk.com/view/3DSMAX/2025/ENU/?guid=GUID-CC8C2874-1F7C-45A3-B21A-6F8FE85516D5
https://help.autodesk.com/view/3DSMAX/2024/ENU/?guid=GUID-CC8C2874-1F7C-45A3-B21A-6F8FE85516D5

You'll need to install the Autodesk USD plugin, that also includes support for MaterialX:
Install USD for 3ds Max: https://help.autodesk.com/view/3DSMAX/2024/FRA/?guid=GUID-04F1DF51-0079-4DF8-8457-5AD12B6C0673

Octane plugin can use Autodesk materialX material and textures directly, by performing an internal conversion when rendering.
For this, make sure to enable 'On-the-fly Material conversion' in Octane preferences / Material tab:
enable_on-the-fly_mtl_conv.png


Using a materialX material.

Create a standard MaterialX material:
Materials / General : MaterialX Material

Select your .mtlx file with the <Pick MaterialX File...> button.

This material can be rendered with Octane renderer, as well as with Arnold renderer.


Editing a materialX material.

There are 2 ways to edit the internal nodes of a materialX, when loaded with the standard MaterialX Material.
1) Autodesk way:
Use the 'Explode Permanently' button to convert the materialX material to a standard Physical Material.
You'll notice that each texture is an Autodesk OSL texture specific to the MaterialX standard.


2) Octane way:
Use the Octane 'Material Converter' in Render settings / Tools tab:
Use the 'Convert Current Slot Material' to convert a single materialX, when editing with the Compact material editor.
Or use Convert All / Convert Scene materials / Convert selected materials to convert several materials.
This will create an Octane 'Std surface Mtl' for each sub material available in the original .mtlx file.
You'll notice that each texture is an Octane MaterialX texture specific to the MaterialX standard.


Exporting a materialX material to a .mtlx file

Currently the Octane plugin doesn't support materialX export.
In future versions of the Octane plugin, there will be options to export to mtlx directly from an Octane 'Std surface Mtl', and also to convert back to an Autodesk Physical Material.

To export with an Autodesk Physical Material, all textures and sub textures must be Autodesk OSL textures specific to the MaterialX standard.

Use MtlxIOUtil in the Utilities tab of the command panel.
See details here:
https://help.autodesk.com/view/3DSMAX/2024/ENU/?guid=GUID-CC8C2874-1F7C-45A3-B21A-6F8FE85516D5


Octane MaterialX textures

All nodes from the MaterialX standard are supported, and available in Maps / Octane / MaterialX
The suffix MTX is added to the base name, to avoid ambiguities with other Octane or standard textures.

For nodes that have several possible output types, there is an option with all valid types in a combo box.
This provide more flexibility than having to select a different texture for each type.

For example, the 'Add MTX' (in Maps / Octane / MaterialX / Math) can be used to add RGB colors (color3), 4 dimention vectors (vector4), etc..
and the corresponding Autodesk OSL textures are 'add_color3', 'add_vector4', etc..

Sub textures of simple types (RGB spectrum, RGBA color, Float Texture, ...) can be expanded automatically as the same type as the output type, to be edited directly.
For example, expanding a RGBA color when the output type is set to color4 will show a rgb color swatch and a float for alpha.
Changing the output type to vector2 will only show 2 float values.
This helps making clear what values will be actually used.
expand_as_color4.png
expand_as_color4.png (7.84 KiB) Viewed 40 times
expand_as_vector2.png
expand_as_vector2.png (7.82 KiB) Viewed 40 times


Another feature of the Octane implementation of MaterialX textures is the use of explicit combo selectors, instead of a simple string input.
For example, the uadressmode option shows the only 4 valid choices. This avoid to refer to the MaterialX standard documentation.
Image MTX-UV mode combo.png
Image MTX-UV mode combo.png (10.99 KiB) Viewed 40 times


Samples:
MaterialXSamples_Octane3dsMax.zip
(40.02 MiB) Downloaded 3 times

AMD/mtlx_SciFi_Brick01_mx22.max
mtlx_SciFi_Brick01_mx22.max_sshot.png
Teapot001 uses the standard MaterialX (01 - Default)



AMD/mtlx_SciFi_Brick02_mx22.max
mtlx_SciFi_Brick02_mx22.max_sshot.png
Teapot001 uses the standard MaterialX (01 - Default)
Teapot002 uses a copy of the original MaterialX, that has been exploded (01-exploded, a standard Physical Material)
Teapot003 was converted from 01-exploded. (converted1, an Octane Std Surface)
Teapot004 was converted from the original material 01 - Default (converted2, an Octane Material Switch)

Note that converting to Octane from a standard MaterialX will add a Material Switch, and add all sub-materials in the switchable material list.
Using 'Explode permanently' will explode only the selected sub material. This can then be converted to Octane too, and won't have a Material Switch because there's only 1 material.


StandardSurface\Chess_set_test01.max
Chess_set_test01_mx22.max_subMaterials_sshot.png
standard_surface_chess_set.mtlx is a MaterialX with multiple sub materials.
The standard MaterialX Material interface has a selector to choose one of the available sub materials.
6 copies of the material are using the same mtlx file with a different sub material selection.


StandardSurface\standard_surface_brick_procedural_test02_exploded_slateEditor_mx22.max
standard_surface_brick_procedural_test02_exploded_slateEditor.jpg
This illustrates that a materialX can use a complex graph of multiple operator nodes, to produce powerful results.
It can be more simple and flexible than writing a single big OSL shader.


Credits: The .mtlx files and textures used in those samples can be found there:
AMD samples page: https://matlib.gpuopen.com/main/materials/all
Official MaterialX page: https://materialx.org/DeveloperReference.html#ExampleFiles
Post Reply

Return to “Autodesk 3Ds Max”