Mutation

Description

The Mutation node takes an existing texture or material and generates a new random variation of it, while retaining the key features characteristic of the original input.

You can use an optional Ignore Mask with the node to discard specific features of the input from the Mutation result.

Additionally, you can use a Structure Guide mask to guide the algorithm as to how it should preserve structural features of the input, such as bricks, vines, or wood. If you are looking to use Mutation for an input that contains a specific repeating pattern (like fabrics), consider using Mutation (Structure) instead.

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

To get started using the Mutation 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 node on the Node Graph. To do so, move the mouse into the Node Graph, press Space, and choose Mutation. Alternatively, drag the Mutation node from the Node Library onto the graph. It can be found in the Smart Mutation category.
  3. Drag your input texture or material into the first input port on the Mutation node.
  4. Select the Mutation node by left-clicking it in the Node Graph. The node’s properties display in the Properties window.
  5. (Optional) Enable Preview Mutation in the Properties window to see a live preview of the Mutation results. The preview generates at a lower resolution and updates each time you change one of the other properties. The preview takes some time to execute, but it’s a good way to see how each property affects the output.
  6. Set the Dimensions property to the desired output resolution of the Mutation.
  7. Use the Properties window to modify the Mutation behavior and see how the changes are reflected in the output. For more information on what each property does, see the Node Reference section below.
  8. When you have set the Properties as desired, execute the Mutation node to see the final output.

Using Ignore Mask to discard specific elements from the input

If there are elements of your input that you wish to exclude from the final result of the Mutation process (for example, leaves or branches), you can use an Ignore Mask as an additional input to the node to do so.

Here are the steps to using an Ignore Mask:

  1. You will need to create the Ignore Mask first. You can do so by either painting it manually with the Mask Paint node, or by using an existing mask texture you created beforehand. Your mask should be black and white, where the white parts of the mask reflect the elements in the input image that you want to be ignored during Mutation.
  2. Once you have the mask, you can plug it into the Ignore input port on the Mutation node. If your mask comes from a different texture, you can import it into the Asset Library and then into the Node Graph. If you used the Mask Paint node, you can use the output of that node instead.
  3. With the mask connected to the node, you can use Preview Mutation or execute the Mutation node to see the new result with the masked features removed.

Using Structure Guide to preserve structural features of the input during Mutation

An input texture and its corresponding Structure Guide.

Fig.1: An input texture and its corresponding Structure Guide.

Some input images that have a defined structure - such as bricks, cobblestone, bark, and others - require an additional Structure Guide input if you wish the structure to be preserved correctly during Mutation.

A Structure Guide is a black and white mask, where the white indicates parts that have to be preserved during mutation.

Here are the steps to using a Structure Guide with Mutation:

  1. You will need to create a mask to use as the Structure Guide. You can do so by either painting it manually with the Mask Paint node, or by using an existing mask texture you created beforehand.
  2. Once you have the mask, you can plug it into the Structure Guide input port on the Mutation node. If your mask comes from a different texture, you can import it into the Asset Library and then into the Node Graph. If you used the Mask Paint node, you can use the output of that node instead.
  3. With the mask connected to the node, you can use Preview Mutation or execute the Mutation node to see the new result, where the structure of the input is preserved.

Node Reference


Node categorySmart Mutation
Node execution styleManual

Ports

Input NameInput TypeDescription
Bitmap / MaterialBitmap / MaterialThe original Bitmap or Material which the Mutation algorithm modifies.
(Optional) Ignore Mask
Bitmap (Mask)
A black and white mask, where white defines parts of the input image that should be ignored by the Mutation algorithm and removed from the final result.
(Optional) Structure GuideBitmap (Mask)A black and white mask which the node uses as a guide to try and retain the original structure of the input image.
Output TypeDescription
Bitmap / MaterialThe resulting texture or material that the Mutation 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 TypeChoose between Bitmap and Material to determine whether the node takes in a single texture or a material. Input Type and Output Type are always the same.
Output Type

Choose between Bitmap and Material to determine whether the node outputs 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 Mutation 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.

Preview Mutation

Check this box to see a live preview of the output of this node with its current parameters. The preview can be seen in the 2D Viewport and is at a lower resolution than the final result. Changing properties of the node with this setting enabled updates the preview without the need to execute the node.

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.

Feature Ghosting

Set a value between 0 and 100 to determine how closely similar features can be placed next to each other during Mutation.

Seed

The seed value that the node uses to randomise Mutation behavior. You can modify this value by hand, or click the New Seed button to randomly generate a new value. This property only accepts numeric values.

Scale and Orientation

Enable the Scale and Orientation option to additionally apply rotation and scaling to the features of the input image identified by the algorithm. The properties in this section control the rotation and scaling behavior.

Property/SettingDescription

Feature size

Choose a value between 0 and 4 to determine the size of the features to which the rotation and scaling apply, where 0 corresponds to the smallest features and 4 corresponds to the largest.

Rotation Level

A value between 0 and 100 which controls the likelihood with which rotation occurs for any individual feature.

Control Rotation

Enable this option to constrain the rotation behavior to specific amounts and increments.

Maximum Degrees

This option is available when Control Rotation is enabled. It sets the maximum rotation, in degrees, that can be applied to any individual feature.

Increments

This option is available when Control Rotation is enabled. It specifies the precise increments, in degrees, at which feature rotation occurs.

Randomize Scale

Set a value between 0 and 100 to determine the amount of random scaling the node applies to individual features.

Feature Mirroring

Enable this option to allow mirroring of individual features.

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 will let you specify how the input image dimensions correspond to real-world scale, and the desired real-world scale that the output should 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

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

Input Height

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

Tape Measure

Enable this to use 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 size of a smaller element of your texture, then move the Tape Measure gizmo in the 2D Viewport so it corresponds to that element. The Mutation algorithm will then automatically determine the correct Input Width and Input Height of your texture.
Tape LengthSet the length of the Tape Measure tool in real-world units.

Output Width

The desired real-world width of the output texture of the Mutation node.

Output Height

The desired real-world height of the output texture of the Mutation node.

SeamBorders

Enable the SeamBorders option to control how the Mutation node merges seams along the edges of a texture. By default, seams are merged automatically during the Mutation process, but this behavior can be disabled or adjusted via the properties in this section.

The functionality of the SeamBorders property is identical to that of the Seam Removal node, except this property applies each time the texture sample gets pasted during Mutation, rather than once for the entire texture.

Property/SettingDescription

X-axis

Set the width of the area along the X-axis in which seam merging occurs, as a percentage of the full width of the input (minimum: 0, maximum: 25). A value of 0 will disable seam removal. Disable the Link button on the left to adjust this property independently of Y-axis.

Y-axis

Set the width of the area along the Y-axis in which seam merging occurs, as a percentage of the full width of the input (minimum: 0, maximum: 25). A value of 0 will disable seam removal. Disable the Link button on the left to adjust this property independently of X-axis.

Border Color

Set the color of the preview of the seam merging area, as shown in the 2D Viewport. The border is only visible when not in Preview Mutation mode.

Border Opacity

Set the opacity of the preview of the seam merging area, as shown in the 2D Viewport. The border is only visible when not in Preview Mutation mode.