Tree Root Generator (Houdini)

Published: Oct 30, 2021 by Bailey Martin

Houdini Python Assets Tools Pipeline

This is a Houdini based tool used to generate tree roots from input spawn positions, with a variety of inputs.

It uses a Space Colonization algorithm for branch generation rather than L systems. This algorithm typically gives a more realistic distribution of branches, as each node is fighting against other existing nodes for growth space.

Image


Space Colonization

Compared to typical branch generation methods that work outward from generated branches, the Space Colonization method works kind of in reverse. The the generator is given a series of input “Attractors” which act as possible target positions for branches to grow toward. During each cycle all attractors are looped over to find the nearest Node (knot of a branch) within a maximum attraction distance, and then a new node is created at the average position for each nodes closest attractors.

You can see this in action in the gifs below. Where the nodes work outward into the available attractor positions.

Space Colonization - Single Node Space Colonization - Multiple Nodes
Image Image
Roots are spawned from a single node.
The roots are free to expand as far as possible as they
are only fighting against themselves.
Roots are spawned from multiple nodes.
Each root is fighting with both itself and its siblings.
Resulting in a system that has to fight for growth space.
Space Colonization - Inside a 3D Volume
Image
Since the space colonization algorithm goes of possible attraction points, data can be generated on any input volume.

Inputs

Image

Input Description
Spawn Positions A series of vertices acting as spawn positions for the roots.
Spawn Volume Geometry used as the spawn volume for the attraction points.
Distribution Bounds Geometry used as the bounds for all attraction points. Positions outside of the geometry are disallowed.

Parameters

Image

Parameter Description
Generation Method Method used to distribute the node attraction points.
Surface Attraction points are distributed only on the surface of the spawn volume
Volume Attraction points are distributed anywhere within the spawn volume
   
Recursion Depth Number of loops used for the generation algorithm.
Attraction Point Density Density of the attraction point generation (10cm² for surface - 10cm³ for volume)
Attraction Radius Distance a valid Node must be from an attraction point to be considered a valid target (cm)
Attraction Deadzone Any attraction points closer than this value to a node are considered occupied.
Max Branch Levels Maximum level depth of branches allowed (Ie, 3 = root -> branch -> twig)
Max Child Branches Maxumum amount of child branches a single branch can have.
   
Root Thickness Thickness in centimeters of the branch. This is multiplied by current branch level (Ie, thickness of 3 will result in level 1 being 3cm, level 2 being 2cm, level 3 being 1cm)
Root Smoothness Optional post smoothing of the generated root splines.
Roots Subdivisions Number of cylindrical edges in each root. Level 0 branches will use this value, with each later level dropping the density by 1 until a minimum of 3 is reached.

Examples

Generation Method : Surface Generation Method: Volume
Image Image
Example of attraction point distribution on surface mode. Example of attraction point distribution on volume mode.
Max Branch Levels : 2 Max Branch Levels : 6
Image Image
Conforming To Environments
Image
Since any input geometry can be given, the roots can conform to any environment. Here you can see them creeping up a wall.
With some minor changes the algorithm could also raycast into geometry to ensure only attraction points on one given side of a surface can interfere with each other (at the cost of generation times).
Houdini Python Assets Tools Pipeline

Share

Store

Retro Filters Pack

Pack containing filters for VHS / Glitch, CRT Monitor, Vintage, Pixelate, Retro Console, Arcade Machine, and more..

Iridescent Materials Pack

Pearlescent, Bubbles, Iridescent Paint

Sketch-It

Hand Drawn Post Process Pack