Trait System

How Assembly Decoration chooses which part from the library goes where on the tree: traits, the attributes that live on both the skeleton and the parts, and the chart you place parts on.
This page is still being worked on. Images and clips are coming soon.

Traits are how an Assembly Decoration chooses which part from its library goes where. A trait is an attribute that lives in two places at once: on the skeleton, at every point where a part spawns, and on each part in the library. Height, the angle of a branch and age are typical, as are attributes carried from the tree's source points, or a trait of your own. Each spawn point gets the part whose trait values are closest to its own.

You can add several traits, and together they make a space with one dimension per trait. The choice of part lives in those values, not in switches built upstream, so it stays procedural and the same library can be reused on other trees.

Add a trait

Click Add Selection Trait on the decoration. At the top of the list is Create New…; below it, under Skeleton Attributes, are the attributes the skeleton already has. Attributes that can't be matched are left out. A decoration holds up to eight traits.

Most of the time you'll pick a skeleton attribute, such as height or elevation_angle. Its values come from the tree, and the trait row shows a Range, set from the values on the tree when you add it. The chart axis follows that range. If the tree changes, choose Update Range from the row's menu.

age counts the steps since each point grew, so it separates old wood from new. At Tips every spawn point is new growth, so it varies more at Intersections and Internodes.

Create New… asks for a name and makes a trait of your own. Its row has a Weight, which is the value every spawn point gets for that trait, starting at 1. On its own it picks the same part everywhere; map the Weight to make it vary. Mapped with Random from 0 to 1, it picks parts at random, and Map from attribute can drive it from anything on the tree. See Mapping.

Place parts on the chart

Press Launch (Enter) on the decoration, or choose Classify Parts from a trait row's menu. A chart appears beside the tree, with one trait along X and another along Y. A new decoration starts with an empty chart, and the first two traits you add fill its axes.

The parts in the library start below the chart, unclassified. Drag a part onto the chart and along an axis to set its value for that trait. Only parts on the chart are picked, so with one part on it, that part goes everywhere. Shift-drag adds parts to the selection and Ctrl-drag removes them, and a middle-mouse drag lines the selection up. N toggles Normalize Scale for the chart display. Escape cancels a drag or clears the selection, and Reset on the decoration clears every part off it.

For example, with height on X, put the large parts at the top end and the small ones at the bottom: the tree then carries large parts up high and small parts lower down.

The chart shows two traits at a time. To work on another, choose Set X (Chart) or Set Y (Chart) from its row's menu; parts keep the values they already have for the other traits. A trait sits on one axis only, so putting it on the other swaps them.

The trait row menu

The menu on each trait row has Classify Parts (for a trait on the chart), Set X (Chart), Set Y (Chart), Update Range, Rename… (for your own traits), Replace With… and Remove Trait. Removing a trait takes it out of the matching and clears its axis.

Classify on its own

The Classify node, in the toolbar's Assemblies menu, runs the same chart on a library as a node of its own and writes each part's trait values onto the library. See Classify.

Status

Traits match numbers: text attributes, such as a species name, can't be traits yet. The closest part always wins.

Known issues: after Replace With…, the chart axis can keep the old trait (use Set X (Chart) or Set Y (Chart) to fix it). Parts on the chart sometimes display wrongly, and toggling the display flag fixes it. A Classify on its own can error on its default links.