Mask Builder


  • Where to find it:


    • Main Window / Layers / Mask Shelf / Smart Mask Tab


    • NodeGraph / Right Mouse Click / Masks / Mask Shelf / Smart Mask Tab







The Mask Builder is evaluated Bottom to Top meaning the bottom group (Base Color) is evaluated first, then the second group from the bottom, 3rd etc.


All Smart Masks found in the Mask Shelf use a common Node Preset as their base - the Mask Builder.

In this topic we will be looking at the Functions of the Mask Builder


The Mask Builder is a so called 'Gizmo'. Gizmos are Nodegraphs that are compiled down to a single Node with Parameters from the Nodegraph

exposed to the Node's Properties.





Modifying values in Mari


Mari allows you to easily modify values by placing the cursor in a field and pressing up or down on the key pad.

Depending where the cursor is placed the value changes in 1s, 0.1s, 0.001s etc.



The Mask Builder Node with attached Radio Nodes in the Nodegraph


By ..

    • double-clicking on the Node (Mari 4.2)
    • CTRL+ double-clicking on the Node (Mari 4.5 and higher)


.. you will get to its Node Properties and open the group to see the internal wiring of the node.

You can get back to your Main Nodegraph by switching back to the 'Root' Tab at the top of the Nodegraph.


The internal Subgraph of the Mask Builder



Video





Node Overview



Node Ports



The Node Ports of the Mask Builder are usually automatically mapped by the Smart Mask Setup Tool


  • Ambient Occlusion

Connect an Ambient Occlusion (occluded ares black, background white).

This Port needs to be mapped in order to use the Ambient Occlusion Feature of the Mask Builder.


  • Curvature

Connect a Curvature Map with a linear midpoint of 0.5.

This Port needs to be mapped in order to use the Curvature Feature of the Mask Builder.


  • Curvature Fine / Soft / Medium / Big / Large / Huge

Connect differently strongly blurred variations of the Curvature Map.

These Ports need to be mapped in order to use the Curvature Feature of the Mask Builder.


  • Height

Connect a Height Input such as Bump or Displacement Map.

This Port needs to be mapped in order to use the Height Select Feature of the Mask Builder.


  • Thickness

Connect a Thickness Map.

This Port needs to be mapped in order to use the Thickness Feature of the Mask Builder.


  • Texture 1 Override  / Texture 2 Override

The Texture 1 and Texture 2 Overrides can be used to feed in a custom channel or connection into the Smart Mask that replaces the standard

Texture 1 or Texture 2 Options in the Smart Mask.


For Overrides to be taken into account the appropriate Use Override Checkbox in the Smart Mask needs to be ticked on.


The Use Overrides Options within the Smart Mask

Node Properties



The Mask Builder is evaluated Bottom to Top meaning the bottom group (Base Color) is evaluated first, then the second group from the bottom, 3rd etc.

Base Color


The Base Color Group determines the bottom Fill Color of the Smart Mask


If you open the Subgraph of the Smart Mask the Base Color Group looks like this:



Thickness



The Thickness Group only works if something is attached to the Thickness Port of the Smart Mask Node


  • Activate Thickness

Activates the evaluation of the Thickness Port


  • Amount/Opacity

Determines the Opacity with which the Thickness is blended over the Base Color


  • Mode

Determines the Blendmode with which the Thickness is  blended over the Base Color


  • Invert

Inverts the result of the Thickness Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance of the Thickness Map more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts the Thickness Map around a Midpoint of 0.5


  • Brightness

Brightens the Thickness Map by adding or subtracting the value specified here to it.



If you open the Subgraph of the Mask Preset the Thickness Group looks like this



Directional Gradient


The Directional Gradient Group allows you to add Gradients from Top to Bottom, Back to Front and Left to Right of your Object


3 Different Gradient Directions - Top to Bottom,Back to To Front and Left to Right



  • Activate Directional Gradient

Activates evaluation of the Directional Gradient Group


  • Opacity

Determines the Opacity with which the Group is blended over the Groups below


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Directional Gradient Group over the Base Color Group


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance of the Gradient more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts the Gradient around a Midpoint of 0.5


  • Brightness

Brightens the Gradient by adding or subtracting the value specified here to it.


  • Top to Bottom

Defines the Contribution (Opacity) of the Top to Bottom Gradient


  • Top to Bottom Blend

Determines the Blend Mode used to composite the Result of the Top to Bottom Gradient over a value of 0.0


  • Left to Right

Defines the Contribution (Opacity) of the Left to Right Gradient


  • Left to Right Blend

Determines the Blend Mode used to composite the Result of the Left to Right Gradient over a value of 0.0


  • Back to Front

Defines the Contribution (Opacity) of the Back to Front Gradient


  • Back to Front Blend

Determines the Blend Mode used to composite the Result of the Back to Front Gradient over a value of 0.0



If you open the Subgraph of the Mask Preset the Directional Gradient Group looks like this:




Object Space Normal


The Object Space Normal Group allows you to add a Mask based on a direction.

In effect it works like shining a directional light from a point in space.


Example of different directional Masks



  • Activate Object Space Normal

Activates evaluation of the Object Space Normal Group


  • Opacity

Determines the Opacity with which the Group is blended over the Groups below


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Object Space Normal Group over the Groups below.


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance of the Object Space Normal Computation more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts the Gradient around a Midpoint of 0.5


  • Brightness

Brightens the Gradient by adding or subtracting the value specified here to it.


  • X / -X

Masks the object from the positive and/or negative X Axis


  • Y / -Y

Masks the object from the positive and/or negative Y Axis


  • Z / -Z

Masks the object from the positive and/or negative Z Axis


  • Offset X/Y/Z

Shifts the effect along an Axis


Example of Offsetting the Result of the

Computation along an Axis



  • Activate Edge Jitter

Edge Jitter uses a Noise to randomize the Normals of the Object.

If the Checkbox is ticked on the randomization is turned on.


  • Edge Jitter Intensity

Determines the Intensity of the Noise  used to randomize the Normals of the Object


  • Jitter Scale

Determines the Scale of the Noise used to randomize the Normals of the Object



The Scale is always multiplied against the Global Texture Scale defined in the Adjustment Group


Example of Edge Jitter Turned off (left) and on (right)



If you open the Subgraph of the Mask Preset, the Object Space Normal Group looks like this:


Height Select



The Height Select Group only works if something is attached to the Height Port of the Smart Mask Node


The Height Select allows you to define a Mask based on the Height.


An Example of selecting a Height Range

from an example Height Map


  • Activate Height Select

Activates evaluation of the Height Select Group


  • Opacity

Determines the Opacity with which the Group is blended over the Groups below


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Height Select Group over the Groups below (Base Color,Directional Gradien,Object Space Normal)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance of the Height after all computation more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts the Height after all computation around a Midpoint of 0.5


  • Brightness

Brightens the Height after all computation by adding or subtracting the value specified here to it.


  • Position

Defines the center of the greyscale value range to select


  • Range

Defines the Range around the centre of the greyscale value range


  • Contrast

Contrasts the result of the Position/Range computation


If you open the Subgraph of the Mask Preset the Height Select Group looks like this:




Curvature



The Curvature Group only works if something is attached to the Curvature Ports of the Smart Mask Node


The Curvature Group allows you to define a Mask based on the Curvature (Edges/Cavities) of the Object.


  • Activate Curvature

Activates evaluation of the Curvature Group


  • Opacity

Determines the Opacity with which the Group is blended over the Groups below


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Curvature Group over the Groups below (Base Color,Directional Gradient,Object Space Normal,Height Select)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Curvature Result after all computation by adding or subtracting the value specified here to it.


  • Cavity Intensity

Determines the contribution of cavities to the result


  • Edge Intensity

Determines the contribution of edges to the result


  • Mode

Determines how the attached Curvature Maps are processed


    • Raw

Raw gives a raw view of all your Curvature Maps layered together using a default Blendmode (Add|Sub).

The Blendmode used can be modified under the Advanced Options of the Mask from Curvature Node  inside the gizmo via the Raw Mode Curvature Blending Setting.


    • Edges

Edges layers your Maps according to the Blendmodes set under Curvature Blending of the Mask from Curvature Node. Processing of Maps is skewed towards isolating values over 0.5 (edges). Blending of Cavities can be controlled via the Edge Mode Cavity Blending Options in the Mask from Curvature Node

inside the Gizmo.


    • Cavities

Cavities layers your Maps according to the Blendmodes under Curvature Blending of the Mask from Curvature Node .Processing of Maps is skewed towards isolating values below 0.5 (cavities).


    • Dual

Dual layers your Maps according to the Blendmodes and Opacity under Curvature Blending of the Mask from Curvature Node.

Processing is done in both 'Edge' and 'Cavities' Mode, then the result is layered together according to a blendmode. The Blendmode used can be modified under the Advanced Options of the Mask from Curvature Node  Dual Mode Cavity Blending.


  • Sharp / Fine / Soft / Medium

Determines the percentage each differently blurred Curvature Map should contribute to the Fine-Medium Edge Detail.


  • Big / Large / Huge

Determines the percentage each differently blurred Curvature Map should contribute to the Large Edge Detail.


If you open the Subgraph of the Mask Preset the Curvature Group looks like this:




Occlusion



The Occlusion Group only works if something is attached to the AmbientOcclusion Port of the Smart Mask Node


The Occlusion Group allows you to create a Mask based on Ambient Occlusion.


  • Activate Occlusion

Activates evaluation of the Occlusion Group


  • Opacity

Determines the Opacity with which the Occlusion Group is blended over the Groups below


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Occlusion Group over the Groups below (Base Color,Directional Gradient,Object Space Normal,Height Select,Curvature)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Occlusion after all computation by adding or subtracting the value specified here to it.



If you open the Subgraph of the Smart Mask, the Occlusion Group looks like this:




Texture 2


The Texture 2 Group allows you to overlay a texture over the result of the underlying groups either in Triplanar or Tiled Mode.


  • Activate Texture 2

Activates evaluation of the Texture 2 Group


  • Intensity

Determines the Opacity with which the result of the Texture 2 Group is composited over the Intensity 0 Value Attribute.

Blending is done with a simple linear interpolation ('Normal')


  • Intensity 0 Value

Determines the Base Value with which the result of the Texture 2 Group is composited over with the the Intensity Value Attribute as Opacity


  • Opacity

Determines the Opacity with which the Texture 2 Group is blended over the result of the Groups below (Base Color, Directional Gradient, Curvature, Ambient Occlusion etc.)


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Texture 2 Group over the Groups below (Base Color,Directional Gradient,Object Space Normal,Height Select,Curvature etc.)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Texture after all computation by adding or subtracting the value specified here to it.


  • Use Texture 2 Port Override

Replaces the Texture used for the Texture 2 Group with an input fed in via the Texture 2 Override Port in the Nodegraph.

Invert,Balance, Contrast, Brightness and Warp Curvature Sliders are still evaluated, the other Attributes of the Texture 2 Group are no longer used.


  • Warp Curvature

When on, the result of the Texture 2 Group is used to Warp the Curvature.



As long as the Warp Curvature Checkbox is ticked, the Curvature will always be warped even if the Texture 2 Group is disabled in the Activate Texture 2 Checkbox


Result of Warp Curvature off (left) and on (right)


  • Warp Amount

Determines the Intensity of the Curvature Warping.


  • Texture

The Texture to use for the calculation of the Texture 2 Group


  • Scale Ratio

The Scale Ratio Attribute is a multiplier against both the UV Repeat  and Triplanar Scale Attribute.

It is useful to always maintain a consistent scale relationship between the Texture 2 Group and Texture 1 Group (e.g. Texture 2 should always be twice the size of Texture 1),

regardless if the Smart Mask is in UV or Triplanar Mode.


  • UV Repeat

The Amount of Repetitions of the Texture.

The Attribute is always evaluated in both UV and Triplanar Mode



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)


  • U Repeat

The Amount of horizontal repetitions of the Texture.

The Value is multiplied against the U Value of the UV Repeat.

The Attribute is always evaluated in both UV and Triplanar Mode


  • V Repeat

The Amount of vertical repetitions of the Texture.

The Value is multiplied against the V Value of the UV Repeat.

The Attribute is always evaluated in both UV and Triplanar Mode


  • Rotation

The Rotation of the Texture.

The Attribute is always evaluated in both UV and Triplanar Mode


  • Triplanar Mode

If on, the Texture is projected from 3 sides onto the Object instead of tiled onto the uvs.


  • Triplanar Scale

Determines the Bounding Box Scale of the Triplanar Projection.



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)


  • Triplanar Contrast

Determines the falloff of the Triplanar projection and how the three sides of a triplanar blend together.


  • Triplanar Jitter Intensity


  • Triplanar Jitter Intensity

Jitter will make the edges of projections less uniform/straight by offsetting the Normals of the Object with a Noise




  • Triplanar Jitter Scale

Determines the Frequency of the internal Noise used for jittering.



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)



  • Triplanar Fill Color

Sets the Fill Color for the Triplanar Projection, before any Projection is done.

This is useful to completely fill a mask with Black to avoid semi-transparent pixels caused by an incorrect Triplanar Contrast.



If you open the Subgraph of the Mask Preset, the Texture 2 Group will look like this:





Texture 1


The Texture 1 Group allows you to overlay a texture over the result of the underlying groups either in Triplanar or Tiled Mode.


  • Activate Texture 1

Activates evaluation of the Texture 1 Group


  • Intensity

Determines the Opacity with which the result of the Texture 1 Group is composited over the Intensity 0 Value Attribute.

Blending is done with a simple linear interpolation ('Normal')


  • Intensity 0 Value

Determines the Base Value with which the result of the Texture 1 Group is composited over with the the Intensity Value Attribute as Opacity


  • Opacity

Determines the Opacity with which the Texture 1 Group is blended over the result of the Groups below (Base Color, Directional Gradient, Curvature, Ambient Occlusion etc.)


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Texture 1 Group over the Groups below (Base Color,Directional Gradient,Object Space Normal,Height Select,Curvature etc.)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Texture after all computation by adding or subtracting the value specified here to it.


  • Use Texture 1 Port Override

Replaces the Texture used for the Texture 1 Group with an input fed in via the Texture 1 Override Port in the Nodegraph.

Invert,Balance, Contrast, Brightness and Warp Curvature Sliders are still evaluated, the other Attributes of the Texture 1 Group are no longer used.


  • Warp Curvature

When on, the result of the Texture 1 Group is used to Warp the Curvature.



As long as the Warp Curvature Checkbox is ticked, the Curvature will always be warped even if the Texture 1 Group is disabled in the Activate Texture 1 Checkbox


Result of Warp Curvature off (left) and on (right)


  • Warp Amount

Determines the Intensity of the Curvature Warping.


  • Texture

The Texture to use for the calculation of the Texture 1 Group


  • Scale Ratio

The Scale Ratio Attribute is a multiplier against both the UV Repeat  and Triplanar Scale Attribute.

It is useful to always maintain a consistent scale relationship between the Texture 1 Group and Texture 2 Group (e.g. Texture 1 should always be twice the size of Texture 2),

regardless if the Smart Mask is in UV or Triplanar Mode.


  • UV Repeat

The Amount of Repetitions of the Texture.

The Attribute is always evaluated in both UV and Triplanar Mode



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)


  • U Repeat

The Amount of horizontal repetitions of the Texture.

The Value is multiplied against the U Value of the UV Repeat.

The Attribute is always evaluated in both UV and Triplanar Mode


  • V Repeat

The Amount of vertical repetitions of the Texture.

The Value is multiplied against the V Value of the UV Repeat.

The Attribute is always evaluated in both UV and Triplanar Mode


  • Rotation

The Rotation of the Texture.

The Attribute is always evaluated in both UV and Triplanar Mode


  • Triplanar Mode

If on, the Texture is projected from 3 sides onto the Object instead of tiled onto the uvs.


  • Triplanar Scale

Determines the Bounding Box Scale of the Triplanar Projection.



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)


  • Triplanar Contrast

Determines the falloff of the Triplanar projection and how the three sides of a triplanar blend together.


  • Triplanar Jitter Intensity


  • Triplanar Jitter Intensity

Jitter will make the edges of projections less uniform/straight by offsetting the Normals of the Object with a Noise




  • Triplanar Jitter Scale

Determines the Frequency of the internal Noise used for jittering.



The Attribute is multiplied against the Scale Ratio and Global Texture Scale (Adjustment Group)



  • Triplanar Fill Color

Sets the Fill Color for the Triplanar Projection, before any Projection is done.

This is useful to completely fill a mask with Black to avoid semi-transparent pixels caused by an incorrect Triplanar Contrast.



If you open the Subgraph of the Mask Preset, the Texture 1 Group will look like this:



Noise


The Noise Group allows you to overlay a Noise over the Result of the previous Groups (Base Color, Curvature, Ambient Occlusion, Textures etc.)


  • Activate Noise

Activates the Noise Group for evaluation.


  • Intensity

Determines the Opacity with which the result of the Noise Group is composited over the Intensity 0 Value Attribute.

Blending is done with a simple linear interpolation ('Normal')


  • Intensity 0 Value

Determines the Base Value with which the result of the Noise Group is composited over with the the Intensity Value Attribute as Opacity


  • Opacity

Determines the Opacity with which the Noise Group is blended over the result of the Groups below (Base Color, Directional Gradient, Curvature, Ambient Occlusion etc.)


  • Blend Mode

Determines the Blend Mode used to composite the Result of the Noise Group over the Groups below (Base Color,Directional Gradient,Object Space Normal,Height Select,Curvature etc.)


  • Invert

Inverts the result of the Group.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Noise after all computation by adding or subtracting the value specified here to it.


  • Noise Type

Lets you choose from several different noise types


Value Noise, Perlin Noise, Simplex Noise, Brownian (FBM), Ridged Noise, Inigo Noise, Turbulence Noise




  • Noise Scale

Size of fractal features on your model


  • Octaves

Describes the level of detail of the noise. Detail is created by encapsulating the modifiers below into a loop and

running it multiple times incrementing the values from loop to loop.



This Port has no effect for Noise Types: Value,Simplex,Perlin


  • Lacunarity

Controls the size of the secondary fine details.



This Port has no effect for Noise Types: Value,Simplex,Perlin


  • Gain

The amount to multiply the noise's amplitude by for each octave

The amplitude is hardcoded for this noise to start at 1.0 for the first octave,

then gets multiplied by the Gain 1x time for each octave incrementing the value of the amplitude



This Port has no effect for Noise Types: Value,Simplex,Perlin


  • Seed

A random start value for your fractal.

Changing the seed changes the overall look of your fractal while the general feature look stays the same,

allowing for quick variation with a general look theme.



If you open the Subgraph of the Mask Preset the Noise Group looks like this:



Global Adjustment


The Global Adjustment Group allows you to do final adjustments to your Smart Mask



  • Output

Defines what is being output.

This is useful to debug individual parts of the Mask Preset


  • Invert

Inverts the result of the Smart Mask.

This setting is evaluated last, after Balance, Contrast and Brightness have been processed


  • Balance

Shifts the Balance of your Smart mask more towards black or white.

Balance works like a level effect where the midpoint is moved towards either black or white.


  • Contrast

Contrasts around a Midpoint of 0.5


  • Brightness

Brightens the Smart Mask after all computation by adding or subtracting the value specified here to it.


  • Global Texture Scale

Allows you to globally modify all Scale Attributes of the Smart Mask (UV Repeat, Triplanar Scale, Noise Scales) at once.



If you open the Subgraph of the Mask Preset the Global Adjustment Group looks like this:



Created with the Personal Edition of HelpNDoc: Free Qt Help documentation generator