Mutation (Structure)

Description

The Mutation (Structure) node is designed to tile textures and materials that contain a repeating pattern. This node is most suited for tiling fabrics.

To achieve the best results with Mutation (Structure), make sure that the pattern in the input texture or material is not warped or misaligned. You can use the Pattern Unwarp node to straighten out warped patterns.

There are two approaches to pattern definition when using Mutation (Structure): the Patch workflow and the Grid workflow. Each workflow is better suited to different types of pattern input. For details on the different workflows, see the Usage section. You also have the option to let the node automatically decide the pattern definition workflow, but you will likely get less accurate results.

Just like with a regular Mutation node, you can use an optional Ignore mask to discard specific features of the input from the Mutation result. This can be used to remove stains and other undesirable blemishes present in the input.

Additionally, you can use an optional Structure Guide mask to guide the algorithm towards preserving specific features of the input.

The node can also be used to expand textures to new resolutions without breaking texel density requirements. If you are looking to increase texture resolution without affecting the image content, consider using the Up-res node instead.

You have access to a range of properties which control the behavior and level of randomness of the Mutation algorithm. A full list of these properties and what they do can be found in the Node Reference section below.

Usage

By default, the Mutation (Structure) node automatically decides the pattern definition for you. Before you move onto one of the two specific pattern definition workflows, it might be beneficial to see if the automatic solution produces an acceptable result.

To get started with the Mutation (Structure) node, follow these steps:

  1. Create a Bitmap or Material input to use with the Mutation node. You can use an existing one from the Node Graph, or import a new one using the Asset Library.
  2. Create a new Mutation (Structure) node on the Node Graph. It can be found under the Smart Mutation category in the Node Library.
  3. Drag your input texture or material into the first input port on the Mutation (Structure) node.
  4. Select the Mutation (Structure) node by left-clicking it in the Node Graph. You can now see and modify the properties of this node in the Properties window.
  5. Set the Dimensions property to the desired output resolution of Mutation (Structure).
  6. Use the Properties window to modify the mutation behavior and execute the node to see how the output reflects the changes. For more information on what each property does, see the Node Reference section below.
  7. Bring the node into the 2D Viewport to review the output. To do so, double-click the node in the Node Graph, or right-click it and select View in 2D Viewport.

Patch-based pattern definition

The Patch pattern definition workflow works well for patterns where each pattern element, or patch, is not precisely identical in size and spacing.

Generally, most fabrics and other soft-surface materials fall under this category. These materials naturally stretch and warp, and so identifying individual patches in the pattern produces better results than trying to align the entire pattern to a precise grid.

Grid-based pattern definition

The Grid pattern definition workflow is best suited for patterns with very strict and precise tiling of elements.

Examples of this generally include hard rather than soft surfaces, and surfaces which do not naturally stretch - for example, wallpaper. In most soft materials, such as fabric, the pattern isn’t going to precisely align to a pixel-perfect grid, and it’s best to use a patch-based definition workflow instead.

Node Reference


Node categorySmart Mutation
Node execution styleManual

Ports

Input NameInput TypeDescription
Bitmap / MaterialBitmap / Material

The original texture or material which the Mutation (Structure) algorithm modifies.

(Optional) Ignore Mask
Bitmap (Mask)

A black and white mask, where white defines parts of the input image that Mutation (Structure) should remove from the final output.

(Optional) Structure GuideBitmap (Mask)

A black and white mask, where white defines structural features of the input image that Mutation (Structure) should preserve in the final output.

Output TypeDescription
Bitmap / Material

The texture or material that the Mutation (Structure) node generates. The Output Type of this node is always the same as the Input Type.

Properties

General

These properties control the general behavior of the node, such as how much variation is applied to features of different sizes in the input image.

Property/SettingDescription
Input Type / Output Type

Choose between Bitmap and Material to determine whether the node works with a single texture or a material. Input Type and Output Type are always the same.

Dimensions

Set the resolution of the output of this node. If set higher than that of the input texture or material, the node fills up the extra space with extra variations of the input sample, but there are likely to be more repetitive elements in the result.

Horizontal Jitter

Set a value between 0 and 100 to determine how much variation is applied to the features in the input image along the X axis.

Vertical Jitter

Set a value between 0 and 100 to determine how much variation is applied to the features in the input image along the Y axis.

Detail

There are a total of 5 detail sliders in the node. Each of these determines how much the Horizontal Jitter and Vertical Jitter properties affect features of different sizes in the input.

  • Harsh Detail determines how much the jitter parameters apply to the largest features (or elements) in the input.
  • Coarse Detail determines the amount of jitter for second-largest features.
  • Medium Detail determines the amount of jitter applied to medium-sized features.
  • Fine Detail determines the amount of jitter applied to smaller features.
  • Sharp Detail determines how much the jitter applies to the smallest features in the input.

Blemish Healing

With this property, you can tell the Mutation algorithm to try and get rid of unique features present in the input image. Set a value between 0 and 100 to determine how much emphasis the algorithm puts on unique feature removal.

Pattern Map

Enable the Pattern Map option to customize the pattern definition workflow and algorithm that Mutation (Structure) applies.

Property/SettingDescription

Pattern Type

Choose between the Patch and Grid pattern definition methods. Patch is best suited for patterns where each element is not precisely identical in size and spacing. Grid is best suited for materials with very strict patterns that have little to no stretching.

Patch

Auto Definition

Enable this option to make the algorithm attempt to automatically identify the pattern in the input image, ignoring the patch selection area.

The algorithm often identifies patterns better if you specify the patch area manually.

Neural Match

Enable this option to make the node algorithm use a VGG neural network to identify patterns, as opposed to a custom ArtEngine solution.

Using Neural Match can give better pattern detection results, but it is more taxing on VRAM usage and takes longer to execute.

Patch Detection

Click this button to identify the pattern in the input image, based on the patch you have selected using the widget in the 2D Viewport. Enable Auto Definition to ignore this selection and let the algorithm identify the pattern automatically.

Patch Count

This field displays how many patches in total the Patch Detection algorithm finds in the input image.

Max Patches (#)

Choose the number of patches from the pattern detection result that should be used to generate the output of Mutation (Structure). This is useful if you only want to use specific patches identified by the algorithm.

Patch Visibility (%)Control how many patches are visible in the pattern detection result, as a percentage of the total detected. This has no effect on the Mutation (Structure) algorithm and is only used to control the widget visibility in the 2D Viewport.
Conserve PatternControl how much emphasis the Mutation (Structure) algorithm puts on precise preservation of patch elements.
Grid
DimensionsSet the horizontal and vertical dimensions of a single cell in the grid, in pixels.
X PositionSet the starting horizontal position of the first cell in the grid.
Y PositionSet the starting vertical position of the first cell in the grid.

World Scale

If you have specific requirements as to how the output texture should correspond to real-world measurements, you can enable the World Scale option to make the Mutation algorithm adapt to your texel density requirements. 

The properties here let you specify how the input image dimensions correspond to real-world scale, as well as the real-world scale that you want the output to have.

Property/SettingDescription

Scale Units

Choose between Millimeters, Centimeters, Meters, Inches, or Feet in order to specify your measurements in the desired unit type.

Input Width

Define the real-world width of the input image, in the specified Scale Units.

Input Height

Define the real-world height of the input image, in the specified Scale Units.

Tape Measure

Enable the Tape Measure tool in the 2D Viewport. This tool can help determine the real-world scale of your input if you don’t know the exact measurements for the entire texture. 

You can set the Tape Length property to the real-world scale of a smaller element of your texture, then move the Tape Measure gizmo in the 2D Viewport over that element. The Mutation algorithm then automatically determines the correct Input Width and Input Height of your texture.

Tape LengthDefine the length of the Tape Measure tool in real-world units.

Output Width

Define the real-world width you want the output texture to have.

Output Height

Define the real-world height you want the output texture to have.