Editing Branching Patterns (Part 1)

Branching models

There are several ways of creating branching patterns like those found in nature.

Categories of editing

Use cases

Here are some use cases that explain how an artist would use different editing operations on a branching pattern to create visual imagery. These assume a Photoshop-like interface and mindset of the user. We assume that the underlying model is something like an randomized L-system that includes production rules and probabilities. Dealing with constraints, edits, gradients, space-filling, blending, etc would all be extensions to the vanilla L-systems model.

Bramble gradients

  1. Our artist has found some rulesets that she likes, they generate the sort of patterns that she is using to fill space in a computer-generated painting
  2. The rules create some brambles, and can be parameterized to be cheerful and bright or tangled and dark
  3. She uses an interface similar to a color-picker to explore different parameter values until she has found both a "cheerful" and "frightening" location in the parameter space
  4. She saves those as "pattern swatches"
  5. She select a region on her canvas and creates a pattern gradient horizontally from cheerful to frightening
  6. Unfortunately, because the interpolation occurs in the genotype, the middle region isn't "glum" or "anxious", it's "frighteningly cheerful"
  7. She selects the middle region and returns to the pattern picker where she explores until she finds an "anxious" parameter set
  8. If this doesn't improve the interpolation she does the recursively until she's defined a smooth phenotype
  9. This gradient that she's built is a reusable component, which she can apply in a different direction, or scaled so it changes more quickly

Root gradients

  1. Our artist has some gradually changing brambles
  2. She wants to extend roots down from the brambles and show a scene underground
  3. The roots pattern swatch came predefined with her rules,
  4. So she creates a new vertical gradient from "roots" to the transparent swatch
  5. The transparent swatch implies that the gradient should not modify the parameters at that location
  6. Thankfully, "rootiness" is orthogonal to "cheerfulness" (both in parameter space, and in this case spatially) so the roots vary smoothly horizontally from cheerful to frightening
  7. If the frightening roots aren't scary enough she can select that region and modify the pattern swatch at that point
  8. This will affect both the horizontal and vertical gradient
  9. Her edits affect both "equally", so she may want to modify the root swatch or horizontal mood swatches independently instead of doing this, for more control

Drawing flowers

  1. Our artist now has two gradients defining a bramble patch
  2. She wants flowers blooming near the upper side of the patch
  3. She selects a different pattern that generates flowers, and paints with a brush in the region where she wants blooms
  4. She flowers are grafted on to the brambles in these regions
  5. She can apply parameter gradients to this region, or modify the shape and size of the region later
  6. There is an automatic merger of the bramble and the flower rules that the artist can edit

Transforming

  1. Our artist wants to create a visual focus around a foreground element
  2. She takes the twist tool and twists a circular region of the brambles
  3. She defines the center, the radius, and an interpolating curve that defines the amount of twist starting at the edge, moving towards the center
  4. The twist looks different than if she had rasterized and then twisted in image space, it preserves the widths of branches, etc
  5. The brambles in this region can be regenerated (for example if she changes the underlying parameter gradients) and the twist will remain

Locking

  1. Our artist is unsatisfied with the way the twist operator is interacting with her brambles
  2. She wants a branch to form a complete spiral, but because of some features of the rule set it's improbable that they'll generate an unbroken spiral
  3. She regenerates the brambles repeatedly until she finds a configuration that she likes,
  4. And because she's going to make further changes to the image, she "locks" this spiral from its tip to its root
  5. Now when she changes the gradient or the shape of the bramble patch, the spiral will remain

Smooth unlocking

  1. The branches our artist locked will remain the same even if the rule set changes
  2. This may make the locked branches unnaturally prominent
  3. To resolve this our artist may "smoothly unlock" the branches
  4. The locked branches are interpolated to appear more similar to the surrounding branches
  5. Angles, colors, and topology may change, but will change as smoothly as possible
  6. The resulting branch will itself be locked, but will appear more similar to surrounding, unlocked branches
  7. A branch can also be hard unlocked, which simply regenerates the area it covers

Copy-paste

  1. Our artist spots a cluster of three flowers whose arrangement she likes
  2. She selects them and uses the "clone everywhere" operator to reproduce this arrangement wherever flowers currently exist
  3. The result is that all flowers are grouped into trios and are positioned similarly
  4. She can vary a "fidelity" and a "density" parameter to control the cloning
  5. Fidelity of 100% makes an exact copy of the pattern, and fidelity of 50% creates clusters halfway between the pattern and the natural arrangement
  6. Density of 100% turns all the instances of flowers in the original into parts of a trio, density of 50% groups half of the existing flowers into trios and allows half to be naturally distributed

Related links

Topics that I'd like to incorporate, but haven't integrated yet.

by Mark Luffel, September 2009