Pattern Generator X4 2D


  • Where to find it:


    • Add Procedural Layer / Procedural / Extension Pack / Generators


    • NodeGraph / Right Mouse Click / Add Nodes / Procedurals / Extension Pack / Generators



This Node is also available as a Triplanar Version






The heart of the Pattern Engine, the Pattern Generators allow you to create infinite pattern variations with up to 4 Input textures



It is recommended to cache this node or attach a bake point after you are done tweaking it to keep its performance impact low




Video



Pattern Engine


Pattern Engine Overview


This Node is part of a collection of Nodes making up the Pattern Engine:


Node Overview




Node Ports

  • Output

The Default Output


  • Pattern UVs

Outputs the UV coordinates of the cells




Additional Information such as pattern rotation is encoded in the Blue and Alpha channel that might make this output appear transparent. The UV information is unaffected.



  • Pattern Center

Outputs the center UV coordinate for each cell as a uniform value across the entire cell




  • Pattern Manifold

Outputs Manifold Data from the node that can be used to drive other nodes.


A simple example of a Pattern Generator Node driving another node via the Manifold Output




  • Pattern Index

Outputs a R,G,B packed Index



    • R - Row Index


Multiplies the normalized Row Number (0.0 - 1.0) against the result.

Each row will have a different value this way


       


    • G - Column Index


Multiplies the normalized Column Number (0.0 - 1.0) against the result

Each column will have a different value this way



    • B - Pattern Index


Multiplies the normalized Cell Number (0.0 - 1.0) against the result

Each cell will have a different value this way





  • Pattern Scale

Change the Value of each Cell based on the Cell scale, defined in the size group

Evaluated are Random Size X/Y, Random Scale,Random Scale Map, Normal Map


Example of Scale Output



  • Pattern Mask

Outputs the pure pattern result as a mask without the Background Color applied



  • Pattern Random

Outputs the random signal used inside the node to randomize elements




  • Manifold UV

Allows you to overwrite the UV Settings of the Node with a manifold node


  • Pattern Specific 1

An option to change the look of the generated Pattern. Varies based on Patttern. Overwrites Pattern Specific 1 Slider (Pattern Group) if mapped,.


  • Pattern Specific 2

An option to change the look of the generated Pattern. Varies based on Patttern. Overwrites Pattern Specific 2 Slider (Pattern Group) if mapped,.


  • Edge Falloff

Allows you to overwrite the Edge Falloff Attribute in the Pattern Group



  • Edge Softness

Allows you to overwrite the Edge Softness Attribute (Pattern Group) with a Node Connection


  • Edge Roundness

Allows you to overwrite the Edge Roundness (Pattern Group) Attribute with a Node Connection




Any value fed in through the Edge Ports on the Node is still multiplied

against the corresponding Edge Slider  in the Texture Groups of the Node.


  • Amount

Allows setting the Amount of Cells via a Nodegraph Input.

Will overwrite the Amount X and Amount Y Sliders.

Separate values can be fed to X and Y by specifying different values for Red and Green channel of the attached node stream



  • Scale Map

Allows for scale changes to Cell contents. Needs to be activated by raising the Scale Map Multiplier within the Node Size Group



Scale Maps are evaluated per Pixel, not per Cell.


Example of increasing the scale map                        

multiplier from 0 to 1 with a cloud                        

node attached to the scale map port                        

                       


  • Displacement Map

Allows the Displacement of Patterns. Needs to be activated by raising the Displacement Map Intensity Slider in the Position Group


Example of displacing a pattern with a 

'Stripes' Node



  • Rotation Map

Allows for Rotation of Patterns. Needs to be activated by raising the Rotation Map Multiplier in the Rotation Group.


Example of raising the Rotation Map Multiplier

while a Circular Gradient Node is attached

to the Rotation Map Port



  • Normal Map

Allows for Rotation, Displacement and Scaling of Patterns based on the Normals of the Normal Map.

Needs to be activated by raising the appropriate Normal Map Slider in the Rotation,Position or Size Group of the Node



  • Probability Map

Allows hiding of parts of the Patterns with a Node Input. Needs to be activated by raising the Probability Map Multiplier in the Probability Mask Group




Due to a limitation in Mari, the Probability Map currently works based on pixels not based on cells, meaning your Probabililty Map acts more like a mask



  • Opacity

Allows changing the opacity of the Pattern with a Node Input.

Currently the behavior is very similar to the Probability Map.


Can be controlled via the Opacity Intensity Slider in the Color Group.



  • Background

Allows for setting a Pattern Background. Fill Background needs to be turned on in the Color Group



  • Bake Point Image A/B/C/D

The Bake Point Image Port allows you to feed data into the Node from upstream nodes that have been baked via a bake point into the Node.

When the node is evaluated, the Bake Point attached to the Port will be sampled and the UDIM 1001 Image will be transferred into

the Image Attribute (A/B/C/D) of the Node.


This allows you to create patterns and textures via a nodegraph and use them directly inside this node with an element of non-destructivness


Example of using a Nodegraph and a Bake Point to dynamically feed a Pattern Generator Node with Node Inputs



Node Properties


MAIN TAB


  • Random Seed

By modifying the Random Seed, different looks can be achieved with the otherwise same settings. 



  • Amount Multiplier

A multiplier on the amount of Cells generated. Each cell is processed independently with the given settings (Position, Rotation etc. etc.)


  • Amount X

Amount of cells generated horizontally. Each cell is processed independently with the given settings (Position, Rotation etc. etc.)


  • Amount Y

Amount of cells generated vertically. Each cell is processed independently with the given settings (Position, Rotation etc. etc.)


  • Image Inputs

Controls the Number of Image Inputs that are evaluated




  • Pattern Repeat U

Repeats the pattern or input image x-amount of times horizontally in each cell.


Example of increasing Pattern Repeat U

 on a 'Gaussian' Pattern


  • Pattern Repeat V

Repeats the pattern or input image x-amount of times vertically in each cell.



  • Pattern Random X

Randomly horizontally offsets the Pattern or Input Image within each cell

This is useful to have a more random look when using tileable textures


Example of randomly offsetting a tileable texture in X and Y



  • Pattern Random Y

Randomly vertically offsets the Pattern or Input Image within each cell

This is useful to have a more random look when using tileable textures


  • Rotation

Pre-rotates the Input Image or Pattern by either 90, 180 or 270 degrees


  • Random Rotation

Applies a random rotation in 90 degree increments



  • Map

Supply a texture map to use in the processing.




This setting is only evaluated if Pattern is set to 'Input Image'


  • Mipmap Blur

Allows you to blur the input image. This feature requires Mari 4.6v2.


  • Image Type



If an image is specified as a Normal Map, rotating images recalculates normal vectors for correct lighting results.


Below you can see an example of this. The Material and its normal map was rotated 90 degrees from its original output.


    • With the Normal Map specified in the Image Type, Mari correctly recalculate the normal map vectors for rotation changes resulting in consistent lighting in viewport & render.
    • If the Normal Map is treated as a 'Standard Texture', no normal orientation is recalcuated, resulting in incorrect lighting in viewport & render





  • Invert Map

Invert pattern or Input Image


  • Blend Mode

The Blend Mode used to overlay a cell over other cells


Example of different effects achieved by changing the blend mode




  • Alpha

Configure the Alpha Handling of the supplied image.


    • From Map

The Transparency in your loaded texture map is used


    • Alpha is Luminance

The Luminance of your loaded texture map is used as Alpha.

Black is transparent.


    • Alpha is Inverted Luminance

The inverted Luminance of your loaded texture map is used as Alpha.

White is transparent.


    • White

The Alpha of the loaded map is set to white resulting in the image being 100% opaque.



This setting is only evaluated if Pattern is set to 'Input Image'


  • Opacity

Set the Opacity for the given Input Image.

This works on top of the global Opacity Slider found in the Color Group



  • Edge Controls

The Edge Controls give you control over the edge transparency of the generated pattern, allowing you to create 'Brush Effects'


    • Edge Falloff

Will contract the edges of your loaded textures. This parameter can also be mapped via the Nodegraph


    • Edge Softness

Will feather the edges of your loaded textures from the start of the Edge Falloff to the centre of your texture.

This parameter can also be mapped via the Nodegraph


    • Edge Roundness

Switches the Falloff from Square (0.0) to Radial (1.0).

This parameter can also be mapped via the Nodegraph




    • Edge Distortion

The Edge Distortion is distorting the alpha in the softened areas based on the luminance of the pattern.


If Edge Distortion is 1.0 black parts of the pattern inside the cell will be hidden in the area of Edge Softness.

If Edge Distortion is -1.0 white parts of the pattern inside the cell will be hidden in the area of Edge Softness.


Example of raising Edge Distortion from 0 to 1





  • Size X

The horizontal size of each cell


  • Size Y

The vertical size of each cell


  • Random Size X

Mix Factor for size randomization in X for each cell.

Positive Values (0 - 1) will  squash the cells along X.

Negative Values (-1 - 0) will stretch the cells along X.


  • Random Size Y

Mix Factor for size randomization in Y for each cell.

Positive Values (0 - 1) will squash the cells along Y.

Negative Values (-1 - 0) will stretch the cells along Y.


  • Scale

A uniform scale factor.



If Pattern is set to a procedural pattern, scale works together with Pattern Size. Set both to 1.0 for 100% Scale


  • Random Scale

Mix Factor for uniform scale randomization.

Positive Values (0 - 1) will reduce the size of the cells randomly.

Positive Values (0 - 1) will increase the size of the cells randomly.



  • Scale Map Multiplier

Controls the influence of the Scale Map attached to corresponding Port in the Nodegraph.

Positive Values (0 - 1) will reduce the size of the cells based on values found in the Scale Map.

Positive Values (0 - 1) will increase the size of the cells based on values found in the Scale Map.



Scale Maps are evaluated per Pixel, not per Cell.


Example of increasing the scale map                                Example of increasing the scale map                                

multiplier from 0 to 1 with a cloud                                        multiplier from 0 to -1 with a cloud

node attached to the scale map port                                node attached to the scale map port

                               




  • Scale Map Random

Applies a randomization to the Values supplied through the Scale Map attached to corresponding Port in the Nodegraph.



  • Normal Map Multiplier

Controls the influence of the Normal Map attached to corresponding Port in the Nodegraph.

Positive Values (0 - 1) will reduce the size of the cells based on values found in the Scale Map.

Positive Values (0 - 1) will increase the size of the cells based on values found in the Scale Map.


  • Scale Map Affects

Limits the Effect of Scale Map and Normal Map to scale in X direction, Y direction or uniformly both directions


  • Position Random X/Y

Randomly offset the Cell Positions along X and Y.




Higher Position Random Values will require a higher Layer Cutoff Value, which in turn reduces performance. 

Often times the same look can be achieved with a lower Position Random Value



  • Offset

Sets an offset for cells. The type of offset is determined by the Offset Type (see below)


  • Offset Type


    • Horizontal quuincux


Controlled by the Offset Slider this will offset every second row of cells



    • Vertical quuincux


Controlled by the Offset Slider this will offset every second column of cells



    • Horizontal Global Normalized


This will add the value specified in Offset to each row successively then normalize the Offset to prevent it from going over 1.0.

e.g. 


Offset Value = 0.2

Row 1 will receive an offset of 0.2 in X

Row 2 will receive an offset of 0.4 in X

Row 3 will receive an offset of 0.6 in X 

Row 4 will receive an offset of 0.8 in X 

.

.





    • Verrtical Global Normalized


This will add the value specified in Offset to each row successively then normalize the Offset to prevent it from going over 1.0.

e.g. 


Offset Value = 0.2

Row 1 will receive an offset of 0.2 in X

Row 2 will receive an offset of 0.4 in X

Row 3 will receive an offset of 0.6 in X 

Row 4 will receive an offset of 0.8 in X 

Row 5 will receive an offset of 1.0 in X 

Row 6 will receive an offset of 0.2 in X

Row 7 will receive an offset of 0.4 in X

.

.





    • Horizontal Global


This will add the value specified in Offset to each row successively.

e.g. 


Offset Value = 0.2

Row 1 will receive an offset of 0.2 in X

Row 2 will receive an offset of 0.4 in X

Row 3 will receive an offset of 0.6 in X 

Row 4 will receive an offset of 0.8 in X 

Row 5 will receive an offset of 1.0 in X 

Row 6 will receive an offset of 1.2 in X 

Row 7 will receive an offset of 1.4 in X 

.

.




Higher Horizontal Global Values will require a higher Layer Cutoff Value, which in turn reduces performance. 

However if not raised you will notice pattern disappearing once the layer cutoff is reached.

Consider using the Vertical Global Normalized mode instead which can achieve the same effect with lower Values




    • Vertical Global


This will add the value specified in Offset to each column successively.

e.g. 


Offset Value = 0.2

Column 1 will receive an offset of 0.2 in Y

Column 2 will receive an offset of 0.4 in Y

Column 3 will receive an offset of 0.6 in Y 

Column 4 will receive an offset of 0.8 in Y 

Column 5 will receive an offset of 1.0 in Y 

Column 6 will receive an offset of 1.2 in Y 

Column 7 will receive an offset of 1.4 in Y 

.

.



Higher Horizontal Global Values will require a higher Layer Cutoff Value, which in turn reduces performance. 

However if not raised you will notice pattern disappearing once the layer cutoff is reached.

Consider using the Vertical Global Normalized mode instead which can achieve the same effect with lower Values



  • Global Offset X/Y

Applies a global offset of the generated Pattern (all cells) along X or Y


  • Displacement Map Intensity

If a Displacement Map is attached to the Node, this controls the offset intensity of the Displacement Map


Example of displacing a pattern with a 

'Stripes' Node


  • Displacement Map Angle

If a Displacement Map is attached to the Node and the Displacement Intensity slider is not 0, this controls direction in which to offset the cell contents


  • Normal Map Displacement

If a Normal Map is attached to the Node, this controls the offset intensity of the Displacement Map



  • Rotation

Applies a rotation to each cell


  • Global Rotation

Rotates the end result of the Pattern Generation. (globally, instead of per cell)


  • Rotation Pivot Centered

Controls the Rotation Pivot for the Global Rotation Slider.

If ticked on, the Pivot sits at the center of each UDIM (0.5,0.5)

If ticked off, the Pivot sits at U/V 0.0 of UDIM 1001


  • Alternate Rotation

Applies a secondary rotation to the cells specified in the Alternate Rotation Method


Example of an alternate Rotation

with the Alternate Rotation Method set

to "Every Second row"


  • Alternate Rotation Method

Determines which cells are affected by the Alternate Rotation Slider.


    • Every Second Row
    • Every Second Column
    • Every Second Row and Column


  • Rotation Random

Applies a random rotation to Cells


  • Rotation Steps

Determines the freedom of the Rotation Random.

WIth a value of 360, Rotation Random will rotate cells freely from 0 to 360 degrees.

With a value of e.g. 90, Rotation Random will rotate cells in a range from 0 to 90 degrees.


  • Rotation Map Multiplier

If a Rotation Map is attached to the Node, this controls the influence of the attached rotation map on the result


Example of raising the Rotation Map Multiplier

while a Circular Gradient Node is attached

to the Rotation Map Port


  • Normal Map Multiplier

If a  Normal Map is attached to the Node, this controls the influence of the attached normal map on the result

  • Alternate Symmetry

Applies a Mirroring effect to the cells specified


    • None


Alternate Symmetry is disabled (default)


    • Every Second Row


Every second row is mirrored in X, Y or X and Y (depending on the setting chosen in Alternate Symmetry affects)


    • Every Second Column


Every second column is mirrored in X, Y or X and Y (depending on the setting chosen in Alternate Symmetry affects)


    • Every Second Row and Column


Every second Row and column is mirrored in X, Y or X and Y (depending on the setting chosen in Alternate Symmetry affects)


    • Mirrored


Similar to Every Second Column tries to create mirrored pairs in X. 

Ignores Alternate Symmetry affects.



  • Alternate Symmetry affects

Determines the mirroring axis for the Alternate Symmetry.



This setting is not evaluated if Alternate Symmetry is set to Mirrored.



  • Random Symmetry

Applies a Mirroring effect to random selection of cells


Example of Random Symmetry in X


  • Random Symmetry affects

Determines the Mirror Axis to use for Random Symmetry


  • Flip X / Y 

Flips the cells in X or Y


  • Mask Random

Randomly hides Cells



  • Noise Type

Determines the Noise Type used for hiding cells when using Mask Random.


  • Noise Seed

Randomizes the Noise Type used for hiding cells when using Mask Random


  • Probability Map Multiplier

Controls the effect of the map attached to the Probability Map Port of the Node



Due to a limitation in Mari, the Probability Map currently works based on pixels not based on cells, meaning your Probabililty Map acts more like a mask



  • Probability Map Threshold

Thresholds the  Probability Map attached to the Node.


  • Probability Map Invert

Inverts the  Probability Map attached to the Node.


  • Alternate Masking

Applies a alternate Masking to the cells specified


    • Ignore


Alternate Masking is disabled (default)


    • Every Second Row


Every second row is hidden


    • Every Second Column


Every second column is hidden


    • Every Second Row and Column


Every second Row and column is hidden




Shape Masking applies a mask to all cells of the Node. The Mask is applied in binary mode - a cell is either fully visible or hidden. 
Other than for example using a Probability Mask attached to the Node Input Port, a Mask will never "cut through" a cell.


  • Use Shape Mask

Activate Shape Mask Mode


  • Shape Mask

The Image to use as Shape Mask


  • MipMap Blur

A blur applied to the Shape Mask Image


  • Shape Threshold

The value of the map representing the pivot point between "hidden" and "visible"


  • Mask Repeat

THe number of times the Mask Image is repeated


  • Mask Repeat U

The number of times the Mask Image is repeated horizontally. Multiplies against the "Mask Repeat"


  • Mask Repeat V

The number of times the Mask Image is repeated vertically. Multiplies against the "Mask Repeat"


  • Mask Rotation

Rotation of the Mask Image


  • Rotation Pivot Centered

If on, rotation is evaluated against the center position (0.5 / 0.5) of the UVs. 

If a 2D Node is used (as opposed to a triplanar node), this will mean a unique rotation pivot in the center of each udim.


  • Mask Offset U/V

Translation values for the Mask in U and V 


  • Layer Cutoff

The Layer Cutoff determines the number of iterations and radius around each cell the node runs through before it stops calculating.

If you are experiencing Seams this might be the reason




Higher Layer Cutoff Values reduces performance !

Keep this value as low as possible without seeing seams


To better understand this behavior and to anticipate consider this:


    • By default each cell is generated in a grid pattern at a scale of 1.
    • Each cell has an internal position of 0.0 for its own coordinate system


If you change the position of a cell from its original position of 0.0/0.0 the Layer Cutoff needs to be increased

for a wider sample radius. So for example 


    • adding a Random Position Value of 1.0/1.0 means we need to sample up to 1 additional cell around the original cell.
      • We need to increase the Layer Cutoff to at least 2


    • adding a Random Position Value of 2.0/2.0 means we need to sample up to 2 additional cell around the original cell.
      • We need to increase the Layer Cutoff to at least 3


If you change the scale of a cell from its original scale of 1.0  the Layer Cutoff needs to be increased

for a wider sample radius. So for example 


    • Changing the Scale to 2 means we need to sample 1 additional cell around the original cell.
      • We need to increase the Layer Cutoff to at least 2


    • Changing the Scale to 4 means we need to sample 3 additional cell around the original cell.
      • We need to increase the Layer Cutoff to at least 4



  • Attenuation

Attenuation lowers the value of layers in the background successively for each Layer ID until it reaches a value of 0


  • Fill Background

If ticked on, the Pattern will be generated over the Background defined in the Background Color or the background attached to the Background Node port


  • Background Color

The Background Color for the Pattern if Fill Background is ticked on. The Background Color is ignores if something is attached to the Background Node port


  • Tint

Tint the result of the Pattern Generation with the specified color. Mutliplies the specified color against the result of the computation.


  • Value Offset

Adds or subtracts the specified value from each layer of the pattern computation, lightening or darkening the output.


  • Opacity

Set the Opacity for each cell


  • Opacity Map Intensity

Determines the influence of the Opacity Map if one is attached to the Opacity Node Port


  • Scale Normal Map Intensity

If a Normal Map is used in the Input Image, this slider can be used to modulate the normal strength based on the size of the feature



  • Random Hue Multiplier

Affects how much the Hue is randomized in between cells


  • Random Hue Min/Max

Sets the Min and Max Range for Random Hue changes in between cells


  • Random Saturation Multiplier

Affects how much the Saturation is randomized in between cells


  • Random Saturation Min/Max

Sets the Min and Max Range for Random Saturation changes in between cells


  • Random Luminance Multiplier

Affects how much the Luminance is randomized in between cells


  • Random Luminance Min/Max

Sets the Min and Max Range for Random Luminance changes in between cells


  • Random Opacity Multiplier

Affects how much the Opacity is randomized in between cells


  • Random Opacity Min/Max

Sets the Min and Max Range for Random Opacity changes in between cells



The Settings found in the Output Alphas Group determine how transparency of cell content is treated in the additional Output Ports of the Node 


(Pattern UVs, Pattern Center, Pattern Index, Pattern Manifold and Pattern Scale)


  • UVs premultiply

Premultiplies the transparency of cell content returned on the Pattern UVs output Port


  • Center premultiply

Premultiplies the transparency of cell content returned on the Pattern Center output Port


  • Index/Manifold premultiply

Premultiplies the transparency of cell content returned on the Pattern Index and Pattern Manifold output Ports


  • Scale premultiply

Premultiplies the transparency of cell content returned on the Pattern Scale output Port


  • Random premultiply

Premultiplies the transparency of cell content returned on the Pattern Random output Port



Tip


If you are seeing seams in your pattern try raising the Layer Cutoff in the Layering Group.



Higher Layer Cutoff Values reduces performance !

Keep this value as low as possible without seeing seams