Simulation
As you build a Natsura graph you are describing a program that will grow a plant. Grow, Split, Switch and the other growth nodes don't make geometry. They are instructions, and the Simulate at the end of the graph runs them step by step to grow the tree.
A program, not geometry
In Houdini you usually work on geometry: each node changes it, and you can inspect the attributes at every stage. Natsura doesn't work that way. The Graph output of a Grow is a single point, because what it carries is a snippet of a program, not part of a tree. The geometry is only made in the Simulate.
Growing the whole plant in one simulation means branches appear at the right time and can respond to each other as they grow. In a step-by-step chain of nodes, each new layer of branches can only respond to the layers made before it, even where on a real tree they would have grown at the same time.
Inside, the Simulate turns your graph into an APEX graph and evaluates it. You don't need to work with APEX, but it explains how the graph behaves: rewiring the graph changes the program, while changing a value only changes what the program is fed.
A grammar for growth
Grow, Split, Switch and Repeat are verbs in a small grammar, borrowed from L-systems. One step of growth in a Grow, placed in a Repeat block with a Split for side branches, is a short sentence: grow, branch, and do it again. A Switch chooses between two sentences, and a Wrangle adds your own VEX in between. Together they work almost like a programming language for plant simulations.
For most artists who want to make a tree, writing the program at that level is a step too deep. So the Grow that ships already contains a repeat, a switch and a split. It is the first module you work with: a general growing and branching node that can also fork. You chain Grows into each other's inputs, and if you learn the grammar underneath, you can build modules of your own (see Make Your Own Tools).
The growth nodes
- Grow grows a chain of internodes. Its Terminal and Lateral inputs say what grows from its tip and along its sides.
- Split sends growth down several paths at once.
- Switch sends each shoot down one of two paths, depending on a condition such as height or an attribute from your source points.
- Repeat runs part of the graph several times, each pass growing from the ends of the last.
- Kill ends the shoots routed to it.
- Prune tests a condition on each branch as the tree grows.
- Wrangle runs VEX on the growing tips, usually to write an attribute that maps and switches read.
For when to use forks, a Split, a Switch or a Kill, see Forks, Split, Switch or Kill.
What the Simulate does
The Simulate builds everything wired into its Graph input into one program and grows the skeleton step by step. At each step it reads the maps, tests the switches and lets the effectors steer the new growth. Set the Simulate's Output Mode to Skeleton, or Output to Skeleton on the display toolbar, to see this skeleton before any meshing.
With Enable Postprocess on (the default), the grown shape is refined before meshing, so every decoration follows the same branches.
The decorations then mesh the finished skeleton. Meshing runs as a post-process, so changing a decoration doesn't have to grow the tree again. The result comes out of the Simulate's single output as a skinned, rigged tree. See Trunks & Meshing and Foliage & Instancing.
Mapping and effectors
Two systems control the growth in detail.
Mapping drives a parameter from an attribute instead of a single value, so it can change across the tree. A common example is the angle a branch leaves its parent at, mapped from where it sits on the parent. A mapping chain can be as long as you need, a little like VOPs. See Mapping.
Effectors are directions, such as gravity, that steer growth. You add them to a Grow, or to an Assembly Decoration to pose its parts, and their strength can be mapped too. The Surface Decoration has its own effector stack for the surface, and the Simulate has Substep Effectors under Postprocess. See Effectors.
Shaping covers how to use both to get the form you want.
Endless variation from one graph
Because the graph is a program, it can be run again and again with different seeds and inputs. What you build stops being one tree and becomes a recipe for a species: how it grows, rather than what one tree looks like. A forest grown from it is a hundred different trees, not a hundred copies of one.
Seeds
Every Grow has its own Seed, which gives each internode it makes a stable random value, and Global Seed on the Simulate changes the randomness across the whole tree or forest. For random values you can shape, drive a parameter from a Map Random. For a smooth, spatial wobble rather than per-point jitter, add a Noise Effector.
Many trees from one recipe
Wire points into the Simulate's Source input and each point grows its own tree, seeded from its seed attribute (Seed Attribute on the Simulate). Seed Points makes a scatter to start from. Any other attribute you put on the points is carried into the tree; see Attributes below.
The Simulate's Geometry input takes an environment the trees grow in, for light and collisions. See Situation and environment.
Within the canopy
The Assembly Decoration chooses which part goes where by matching traits between the parts and the tree. See Trait System.
Gaps and crowding
Where a tree opens up and where it crowds comes from the recipe: where and how often each Grow branches, with settings you can map from attributes, and Switches that change the rules in parts of the tree. Prune can also remove growth that meets a condition as the tree grows; it is experimental and still being developed.
Attributes
A large part of how Natsura grows a tree is attributes: values on the points of the skeleton that maps, switches, effectors and decorations read as the tree grows and after it.
Each source point starts a tree. Wire points into the Simulate's Source input, from Seed Points or your own scatter in Houdini. The Simulate reads seed and width from them (Seed Attribute and Width Attribute), and every other attribute on a point keeps its name and is carried into the tree grown from it, so the maps and switches in your graph can read it while the tree grows. This is how one recipe grows different trees: compute attributes on the points from the scene, such as the slope of the ground or the distance to the edge of a wood, and map Grow parameters from them. To grow trees of different ages, give each point an age of your own and map the Grows' Growth % from it. Seed Points writes source_age, source_species and source_random for this; nothing reads them until you map from them. Use your own names rather than ones Natsura writes, such as age or height, which are overwritten as the tree grows. A name starting with source_ also stays on the Simulate's meshed output.
Natsura writes its own attributes across the skeleton as it grows:
height,distance_to_rootandusay where a point is: its world height, its distance along the tree from the root, and how far along its chain it is. They change during growth, so they are what a Grow map or a Switch usually reads.generationis the step a point was created on, andagehow many steps ago that was. On a growing tipageis always 0 or 1, so it is for the finished tree: decorations, traits and maps on a decoration, such as a different part on older wood.elevation_angleis the angle of a branch from horizontal, a good trait for choosing parts.- With an environment on the Simulate's Geometry input,
aosays how open a point is, and the light and surface directions can steer growth as effector rows.
To add your own during growth, write it in a Wrangle, from what the tips carry or from Houdini geometry wired into it.
Nodes read attributes by name. Maps, Switch conditions and a Grow's effector rows pick from a menu of the attributes declared so far, including your source point attributes and Wrangle outputs, and a map can read the value on the element itself or on a parent (Read From). The Assembly Decoration reads the finished skeleton and matches its parts to these attributes as traits. The full list, with which attributes change during growth, is on the Wrangle page.
Status
Enable Postprocess, Map Random and Seed Points are experimental. In 0.7.3 a Switch tests thresholds only; its snippet option has no effect.
Drawing a Tree
Draw a tree's branches by hand, or bring in curves from SpeedTree, and pass them through Natsura with the Custom Module node so they can be grown on, decorated and reshaped like a grown tree. Experimental.
Shaping
How you control the form of a tree in Natsura: mapping, effectors and posing, the environment a tree grows in, and the viewport tools for working by hand.