In some setups users need to switch the materials on specific objects. In this tutorial we will cover how this can be achieved using the VexusMtl in 3ds Max.
Create a VexusMtl
We first create a VexusMtl which will be used to maintain and manage the materials we want to apply to our objects. After creating the VexusMtl in the Material Editor.
Create Default Base Shader
The VexusMtl provides a material slot labeled Default. We will use this slot to place whatever shader we want to be considering our base material. For this example we will create a plastic render shader and place it into our Default slot. It's best to place whatever shader you want the render engine to default to using if an overriding shader doesn't exist.
Create Green Slime Shader
In our second slot we will create a new plastic green shader as seen in the image below. We will make sure to give this shader a unique named. For this example we will call it Slime. This name is important because we will later use it to toggle our VexusMtl to use this shader. If you want to see you material in the Material dialog just toggle the radio button next to it's name as seen below.
Create a Blue Shader
We will create another shader, blue plastic, for the third slot. Lets name this one simply Blue.
Setup 3ds Max Scene
Next we will create some objects in our scene and apply the material. If you hit render you'll notice that it renders using the shader next to the active radio button. If you want to use the blue shader then in the VexusMtl toggle the radio button to the Blue and hit render. In the following steps we will cover how to control the VexusMtl using the Vexus node graph editor.
Create Vexus Graph Nodes
In Vexus create and Objects By Name node and plug it into a Vexus Material Toggle.
Assign Material Override
In the Vexus Material Toggle Node click the [...] in the Property Editor next to the Material Name property. A dialog will appear displaying all the available Names of VexusMtl's in the scene. Let's assign the Slime material by double clicking it in the list.
Render Slime Shader
Lets test the setup by first selecting the VexusMaterialToggle node, in the graph, and then click the Quick Render button in the Vexus toolbar (Teapot icon). We should see the green material render.
Render Default Shader
In order to render the default shader we just edit the value of our Material Name in the Vexus Material Override. In order to trigger the default shader to render, we can either type the word Default, or make the field empty. When the Vexus Material Toggle fails to find the name of a shader within the VexusMtl, it will default to rendering the base shader placed in the Default slot.
The VexusMtl combined with the Vexus Material Toggle can make assigning material overrides and toggling between multiple shaders on objects very simple and easy.
Copyright © 2019 Boomer Labs and JokerMartini