Intro to Material Regions by Jens Kafitz |
Material Regions are a system to layer Materials on top of each other (Dust over Rust over Metal etc.)
while providing a logical grouping in the Nodegraph.
Other than a Layered Shader a Material Region does not compute any shading. It is layering the effects
of each channel (diffuse, spec, bump etc.) from the current region over the effects of each channel from the previous region.
In the end a material region chain outputs each combined channel into a channel for export.
Regions are created in a left-to-right workflow in the Nodegraph while per-region inputs for color, specular etc.
are done in a top-to-bottom workflow default to Mari.
You add multiple Regions on top of each other by connection the 'Output_xxx' Connections to available 'Input_xxx'
connections in the same order they are shown in the Nodegraph.
This System of Inputs and Outputs is the same for all different Types of Region Nodes such as Region, Region Base, Region Merge and Region Output.
Two unconnected Regions Nodes ..
.. and the same nodes connected up properly
The beginning of a region chain can be 'capped' with a Region Base Node.
The Region Base Node does not have any inputs for other Regions. It holds start values (lowest material) for all supported Region Material Attributes
(Color, Specular etc.), all of which can be either set on the node or input via the connections at the top of the node.
A Region Base Node can act as a start point for a region chain.
Other than Region Nodes, Region Base Nodes will output all Values for all Material Attributes.
Individual Material Attributes do not need to explicitly be activated as they have to in a Region Node.
It can be used to completely cover an object with a base material.
Region Base Nodes hold Start Values for all Material Attributes
A Region Node can affect all Material Attributes (color, specular, bump etc.) or only selected ones.
Which Attributes are affected is determined by the On/Off Checkbox for each Material Attribute.
A 'Region' only affecting the Base Color Material Component
The combined effects of all regions onto a Material Attribute up to the current Region can be viewed by
selecting a Region Node and pressing '1' to attach a Viewer, then choosing the 'Debug' Connection.
The Output of the 'Debug' Connection is determined by the 'Debug Output' Dropdown in a Region.
The influence of a Region on your Objects Material can be limited by attaching a painted or procedural
black & white mask or channel to the 'Region Mask' Connection.
A Region masked by a Paint Node
Regions have full support for Material ID Channels.
Material ID Channels can be generated in external Programs or within Mari.
To use Material IDs, attach your Material ID Channel or Layer to the 'Region Mask' Connection,
then within the region scroll down to 'Material Region ID' Group and turn it on to evaluate the Mask
as a Material ID.
You can then set a Material ID in the 'Mask ID' Field by picking a Color from your Material ID Channel
When picking your Material ID a useful 'Debug Output' to view is the 'Region Mask over ID'
It will display the currently picked ID in white over the rest of your Material ID Channel, making it easier
to pick the correct ID.
(Left) The Material ID Channel
(Centre) The 'RegionMask over ID' Debug Output after having picked the Green Color ID.
(Right) The Mask generated from the picked ID and viewed through the 'Region mask' Debug Output.
At the end of a region chain you need to Output each material attribute into a channel that you can export.
The Region Output Node will take your Region Chain as Input and split out individual Channels from the incoming data.
The Region Output Node with its Inputs and Outputs.
You can get a channel node two ways
In order to have a representation of the Region Chain in your Layerstack it is best to merge in the Outputs from the
Region Output Node into each Channel with a Mari 'Merge' Node.
'Merge' Nodes are the representation of a Layer in the Mari Layerstack.
The creation and connection of outputs, channel node creation etc. can be turned into a one click process
easily by utilizing Mari 3.0's new Gizmo System.
Select all Nodes you wish to template and right-mouse click 'Export Nodes'.
CHANNELS Mari even supports exporting Channel Nodes. When you import a Nodegroup containing Channel Nodes, Mari will automatically create the Channels in the Channel Palette for you |
Selecting the desired Nodes and exporting them as a Mari Node group
The exported Nodes can be saved anywhere as a Mari Node Group (.mng) however by placing the
file in your /Mari/Gizmos/ Directory (if it doesn't exist create it), Mari will auto-load the file on startup
and it will be accessible in the
Dialog.
You can then recreate all your saved Nodes with one click in the future.
Any channels saved in the Nodegroup will be automatically created.
Output Chain including Channels saved as a Gizmo named 'RegionOutput'
Created with the Personal Edition of HelpNDoc: Easily create PDF Help documents