The Material Modifier is used to adjust Visual Materials during gameplay. The Material Modifier can change colors in a Visual Material instantly, or when used together with other nodes, gradually over time.
Target | Set the object whose Visual Material will be adjusted |
Execute | Executes the Node |
↳ On Start | Executes the Node at the start of the Game |
Enabled | Enable or disable the node. Disabled Nodes cannot be executed |
Slot Index | Select the Visual Material Slot Index to modify |
Diffuse | Set a new color for the Visual Material |
Vectors can be input to any of the color types in the Material Modifier. Vectors will be interpreted by the tool as RGBA color data (red, green, blue, alpha). Vectors can be input to the Material Modifier by Vector Nodes, Color & Color Mix Nodes.
When executed normally the Material Modifier will instantly change the color(s) of the target material.
Paired with Wave Generator & Color Mix Nodes the Material Modifier can gradually adjust a color over time.
In the Material Modifier set the Target Object and select the Material Slot you'd like to modify.
In the Color Mix Node set the 2 colors you'd like to mix.
- Color A should be the original color in the Visual Material
- Color B should be the color you'd like to change it to
In the Color Output select or create a new color that is not being used.
Output the Color Mix to the material you'd like to modify in the Material Modifier.
In the Wave Generator set the duration to the time you'd like the color change to take and send the Value Output to the Color Mix Node's Factor.
Now when you execute the Wave Generator the Visual Material will gradually change colors over the set duration.
Here's a link to the hype that shows how to implement and use the Material Modifier node: