A procedural tree generator addon for Blender using a node-based workflow.
Note: Maintained fork of Mtree by MaximeHerpin.
- Quick Generate - One-click tree generation with presets (Oak, Pine, Willow)
- Node-based workflow - Build trees visually by connecting nodes for full control
- Procedural generation - Control trunk, branches, and leaves with parameters
- Multi-level branching - Chain branch nodes for complex tree structures
- Crown shapes - 8 botanical envelope shapes (conical, spherical, flame, etc.) based on Weber & Penn
- L-system growth - Biologically-inspired growth simulation with apical dominance
- Realistic physics - Gravity, stiffness, and natural spiral patterns (phyllotaxis)
- Leaf distribution - Automatic leaf placement on thin branches via geometry nodes
- Pivot Painter 2.0 export - Export wind animation data for Unreal Engine 5
- Non-destructive - Adjust parameters and regenerate anytime
- Blender 5.0 or later
- This is simply because I haven't tested it on earlier versions
- Download the latest release for your OS from Releases
- In Blender: Edit -> Preferences -> Add-ons -> Install
- Select the downloaded
.zipfile - Enable "Modular Tree" in the addon list
- Open the 3D View sidebar (press
N) - Select the MTree tab
- Click Generate Tree and choose a preset (Oak, Pine, Willow, or Random)
- Open a Node Editor and select Mtree from the tree type dropdown
- Add a Tree Mesher node (Shift+A)
- Add a Trunk node and connect Tree Mesher's output to Trunk's input
- Add a Branches node and connect Trunk's output to Branches' input
- Click Generate Tree in the Tree Mesher node
- (Optional) Click Add Leaves to distribute leaves on the tree
Tip: Select a Branch node and press N to see organized parameter sections with descriptions, plus preset buttons (Oak, Pine, Willow, Random) to quickly configure branch characteristics.
| Node | Description |
|---|---|
| Tree Mesher | Generates the final mesh; connect to Trunk |
| Trunk | Creates the main trunk with length, radius, and shape controls |
| Branches | Adds branches with density, angle, gravity, and split options |
| Growth | L-system style growth with apical dominance and iterations |
| Radius Override | Fine-tunes branch thickness along their length |
| Random Value | Generates random values for parameter variation |
| Ramp | Creates gradient values from start to end of branches |
Use the Presets section in the inspector panel (N key) to apply Oak, Pine, Willow, or Random configurations, or manually adjust:
- Seed - Controls randomization (same seed = same tree)
- Length/Radius - Size and thickness
- Up Attraction/Gravity - How branches grow relative to gravity
- Split - Probability and angle of branch splitting
- Phyllotaxis - Spiral angle between branches (137.5 is the golden angle)
- Crown Shape - Control tree silhouette (Cylindrical, Conical, Spherical, Flame, etc.)
Crown Shape controls branch lengths based on height, creating realistic tree silhouettes. Available in the Branch node inspector panel under "Crown Shape":
| Shape | Use Case |
|---|---|
| Cylindrical | Default, uniform branches |
| Conical | Pine, fir, spruce (Christmas tree) |
| Spherical | Oak, maple (round crown) |
| Hemispherical | Dome-shaped canopy |
| Flame | Cedar, cypress (pointed top) |
| Inverse Conical | Wide bottom, narrow top |
Enable Preview in Viewport to visualize the envelope. See Crown Shape Guide for details.
- Iterations - Number of growth cycles
- Apical Dominance - How much the main stem suppresses side branches
- Grow/Split/Cut Thresholds - Control branching behavior
- Gravitropism - Response to gravity direction
After generating a tree, click "Add Leaves" in Tree Mesher to configure:
- Density - Leaves per area
- Max Radius - Only place leaves on thin branches
- Scale/Rotation Variation - Natural randomness
- Leaf Object - Use a custom leaf mesh
Export hierarchical wind animation data for Unreal Engine 5:
- Generate a tree using the Tree Mesher node
- In the Node Editor, add an Export > Pivot Painter node
- Connect your Tree Mesher output to the Pivot Painter node
- Set the export path and click Export
This creates two EXR textures and a UV2 layer compatible with Epic's
PivotPainter2FoliageShader material function.
See UE5 Material Setup Guide for detailed import and material configuration instructions.
Note: Currently only Unreal Engine 5 export is fully tested. I am working towards testing properly in Unity
This project uses modern Python tooling:
- uv - Fast Python package manager (used in CI)
- Ruff - Fast Python linter and formatter
- pre-commit - Git hooks for code quality
- clang-format - C++ code formatting
To set up the development environment:
# Install pre-commit hooks (requires uv)
uvx pre-commit installSee CONTRIBUTING.md for full development setup and build instructions.
For detailed build instructions, architecture overview, and C++ library usage, see CONTRIBUTING.md.
Maintainer: GoodPie Original Author: MaximeHerpin