Mapping Cookbook

Mapping setups from the Natsura 101 series and the oak recording: branch angle by height on the trunk, a thinner canopy inside, random part choice, and two maps multiplied together.

Mapping setups taken from working scenes in the Natsura 101 series and the oak recording. For how maps work, see Mapping; for effector setups, see the Effectors Cookbook.

Lower branches spread widest

  1. On the branch Grow, under Start > Arrangement, click the map button at the end of the Start Pitch° row.
  2. Choose Map from attribute…, then u, then Parent. Parent reads u from the trunk, so the map knows how far up the trunk each branch starts.
  3. On the new map, leave the first min and max pair at 0 and 1, and set the second pair to 90 and 0 (the larger pitch in the minimum).

The lowest branches then stand out widest, and the ones higher up point more upwards.

A thinner canopy inside

  1. On an Assembly Decoration, under Distribution > Mask, click the map button at the end of the Mask row.
  2. Choose Map from attribute…, then u, then Self. Self reads u along the branch each part sits on.
  3. Leave the second pair at 0 and 1. Mask is the chance each point keeps its part, so fewer parts survive near the base of each branch and more towards its ends.

Swap the second pair (1 and 0) to keep the parts near the centre instead, or set Read From to Parent to vary by how far up the trunk the branch is.

Then, at the bottom of the decoration, raise Prune a little. Prune looks at how dense the canopy is and removes from the densest areas, and it removes the smaller instances inside each assembly rather than whole assemblies. Use the two together to mix kinds of removal.

Pick parts at random

  1. On an Assembly Decoration, click Add Selection Trait and choose Create New…, and give the trait a name.
  2. Click the map button at the end of the new trait's Weight row and choose Random. Its range is 0 to 1 by default.
  3. Press Launch (Enter). If the new trait isn't on the chart, choose Set X (Chart) from its row's menu.
  4. Drag several parts onto the chart and spread them along that axis. Shift-drag selects several parts, and a middle-mouse drag lines them up.

Each point now picks a part at random. See Traits.

Two maps multiplied

This bends the parts of an Assembly Decoration along their length, by an amount that also changes with height on the tree.

  1. On the Assembly Decoration, under Transform, click Add Effector and choose Gravity Effector.
  2. Click the map button at the end of the new row's Scale and choose Map from attribute…, then u, then Self. On a decoration's effector row, Self reads the part's own u, so the map runs from 0 at the base of each part to 1 at its tip.
  3. Select that map in the network view. The toolbar now shows the map buttons: click Map Blend, then Insert (right). The first map goes into the Map Blend's first input (A), and the Map Blend takes over as the map the row reads.
  4. On the Map Blend, set Mode to Multiply (it starts on Add).
  5. Place a new Map from the Tab menu and wire it into the Map Blend's second input (B). Type height into its Attribute field, and set its first min and max pair from 0 to the height of your tree (about 13 in the oak recording).

The bend along each part now also changes with height. Use the second map's output range to decide how much.