Mutate

Apply random structural mutations to an expression or shape composition.

What it does

Mutate takes a pattern or a shape composition and produces one or more randomly-varied descendants of it. Each variant is built by applying a chosen number of mutation steps: growing new ingredients onto it, replacing existing ones, nudging numeric values, grafting in a piece of a wired donor, pruning parts away, or regrowing a branch from scratch. Seed controls which random variants come out. Severity controls how far numeric nudges stray from their original values.

Set Count above 1 for a list of variants from one Mutate node rather than duplicating the node, for a batch to sort or cherry-pick from.

Mutate carries the same palette Evolve does, with the same meaning: how often each kind of ingredient is used when a mutation introduces something new. The palette shown follows what is wired in, the maths and noise categories for a pattern, the primitives and shape operators for a shape composition.

When to use it

ParameterTypeDefault
inputOneOf([Field, Collection])
seedNumber42
countNumber1
mutationsNumber3
severityNumber0.300
grow_weightNumber1
replace_weightNumber1
tweak_weightNumber1.500
graft_weightNumber0.500
prune_weightNumber0.300
regrow_weightNumber0.300
periodicNumber1
smoothNumber1
sharpNumber0
arithmeticNumber1
tiling_opsNumber0
sphereNumber1
cubeNumber1
torusNumber1
cylinderNumber0
coneNumber0
superquadricNumber1
boolean_opsNumber1
displacedNumber1
offset_opsNumber0
repeat_opsNumber0
graft_countNumber0
opacityNumber1

Gotchas

Arithmetic decides combining versus wrapping. Regrowing a branch or grafting a donor in either combines two parts (add, multiply; union, intersect, subtract for shapes) or wraps one part in a single new ingredient. Arithmetic, which is Boolean Ops on the shape palette, is how often it combines, measured against everything else in the palette. At the defaults that works out to combining about a third of the time, so a default Mutate wraps roughly twice as often as it combines. Raise Arithmetic for busier, more branched offspring; lower it for offspring that stay closer to the parent's outline.

Graft needs donors. Raise Graft Source count, wire a second pattern or shape into the new inputs, and Graft weight starts splicing pieces of the donors into each variant. With nothing wired, Graft has nothing to pull from and the step falls back to the other mutation types. Donors are picked evenly, so with two wired each contributes about half the grafts.

The mutation-type weights (Grow, Replace, Tweak, Graft, Prune, Regrow) are relative and need not sum to anything in particular. Raise one to make that kind of change more likely per mutation step, or set it to 0 to rule it out.

Tweak nudges in proportion. A numeric nudge is a fraction of the value's own size, so a small number gets a small nudge and a large one gets a large nudge. That keeps a pattern's zoom, a radius and an offset all moving by a sensible amount from one Severity setting, instead of a fixed step that barely touches large values and throws small ones across their whole range. Raise Severity if the variants read as too timid.

Whatever is wired in is accepted. A pattern built by Evolve mutates as the composition it is. A baked field, an image, a volume, or a distance field, is lifted into a one-ingredient composition first, so mutation builds around it rather than passing it through untouched. Shape compositions mutate as shapes. A Collection with nothing shape-like in it is the one case that errors rather than guessing.

Worked example

  1. Add a Mutate node and wire an Evolve (or any shape or pattern) into Input.

  2. Raise Count to 8 to generate a batch of variants instead of one.

  3. Raise Severity if the variants look too similar to the source; lower it for subtler variation.

  4. Nudge Tweak weight up and Grow/Replace down for mostly numeric jitter rather than structural changes, then scrub Seed to browse different batches.

  5. Dial the palette to steer what new ingredients look like: the same Periodic / Smooth / Sharp / Arithmetic / Tiling weights Evolve uses for a pattern, or the primitive and operator weights for a shape.

  6. Raise Graft Source count and wire in a second composition to breed the two together.

See also

Evolve · Sort · Partition · Analytic shapes