Skip to content

The Tree Editor

The Tree Editor grows trees from a hierarchy of generators, the way SpeedTree does. A trunk generator grows the trunk, a limb generator places limbs on it, boughs grow on the limbs, twigs on the boughs and leaf cards on the twigs. Each generator has settings for how many nodes it places, where it places them, how they bend and how they are skinned. Change a setting and the preview regrows the tree.

Build writes the tree into the project’s assets as ordinary BeamNG content: .dae models with three detail levels and a billboard, materials, and forest items with wind settings. A Foliage node scatters them like any stock tree, and the Real preview and both exports use them.

Open it with File → Tree Editor. Trees are stored in the project folder (assets/trees/<name>.tree.json), so save the project before you open the editor.

The Tree Editor with a beech template: the trees and generators on the left, the Real preview in the middle, the selected generator’s properties on the right

Area What it’s for
Trees (top left) The project’s trees. New starts one from a template, Duplicate copies the selected tree, Delete removes it with its built models and forest items.
Generators (left) The selected tree’s generator hierarchy, with the number of nodes each one grew. Select a generator to edit it, untick it to switch it off. See Generators.
Forces (bottom left) Forces that bend the branches while they grow. See Forces.
Preview (middle) The tree, regrown after every change. The line under it gives the height, the crown radius and the triangle count of each detail level.
Properties tab The settings of the selected generator, force or node.
Materials tab The bark, leaf and fruit textures. See Materials.
Tree tab The template, the number of variants, the seed and the wind. See Building and using trees.
Build, Use in Foliage Write the tree into the project’s assets, and put its name into a Foliage tier.

Every change is one step on the editor’s own undo stack (Ctrl+Z, Ctrl+Y). A value dragged with the mouse is one step, not one per pixel.

The Tree Editor’s toolbar

From left to right:

  • Undo and Redo.
  • Randomize (dice) gives the selected generator a new seed, or the whole tree when nothing is selected. Only that generator’s nodes change: every generator draws from its own random stream.
  • Variant previews one of the tree’s variants. Each variant is the same tree grown with its own seed, and Build writes them all.
  • Detail level: near, middle or far detail. The game switches between them by the tree’s size on screen.
  • View mode (below).
  • Scale reference: a see-through 1.9 m person, a car, or both, next to the tree.
  • Frame points the camera at the whole tree.
  • Edit mode: Edit generators (the normal mode) or Edit nodes, which lets you pick one branch in the preview and change it by hand. See Editing single branches.

The same beech in the five view modes

Mode What it shows
Lit A quick shaded view. It draws the selected generator’s spines and leaf points, forces and envelopes over the tree, and it is the view used for picking nodes.
Real (as in game) The tree on a plot of grass, drawn by the same renderer as the Real preview: sun and shadows, sky light, ambient occlusion, the game’s level-of-detail rules. This is the default when your graphics card supports it.
Unlit Textures only, no shading. Good for checking UVs and leaf atlases.
Wind colours The vertex colours BeamNG’s forest wind reads: blue = branch bending, red = leaf flutter, green = the phase of each bough. The trunk is black, so it doesn’t sway.
Wireframe The triangles. Use it with the detail level to see where the budget goes.

Orbit the view with the left mouse button, pan with the right or middle button, and zoom with the wheel.

Near, middle and far detail of the beech in wireframe, with their triangle counts

Every tree is built with three detail levels and a billboard, like stock BeamNG trees. Middle and far detail use fewer sides and segments per branch, drop the thinnest branches and keep only part of the leaf cards (the kept ones grow, so the crown keeps its volume). The counts under the preview turn amber above a stock-like budget of 6000 / 2000 / 600 triangles. Each generator’s Detail Levels group sets what it keeps.

A birch with the 1.9 m human and a covered car beside it

With the asset library loaded the references are the game’s own 1.9 m human scale figure and a covered car. Without it they are simple box stand-ins.

New starts a tree from one of seven species templates. Each has its own structure, tuned against reference photographs:

Oak, beech, birch, poplar and fir templates

Scots pine and juniper templates, and two trees from the Sri Lankan Lowlands example

Template Structure
Oak A short bole that forks into four crooked limbs carrying boughs, plus crown boughs on the leader.
Beech A tall trunk with boughs, twigs in flat alternating sprays, leaves in layers.
Birch Ascending boughs with hanging twigs and leaves.
Poplar A Lombardy column: steep, short boughs from low on the trunk, a fluted base.
Fir Whorls of four boughs, a cone shape, sagging boughs with upturned tips, herringbone needle sprays.
Scots Pine A clean, sinuous bole with dead stubs, and a high, flat-topped crown of crooked whorled boughs.
Juniper A short fluted bole splitting into two to four twisted stems.

* The coconut palm and the Kumbuk come from the Sri Lankan Lowlands example, which ships twelve trees made in the editor, with their own painted textures. Open that project to see how palms (Frond generators), fruit and large broadleaves are built.

Tree → Template → Reset replaces a tree’s generators, forces and materials with a template’s.

  1. Save your project, then open File → Tree Editor.
  2. Click New, pick a template (say Beech) and give the tree a name. The name is also the prefix of its forest items.
  3. Select Boughs in the generator list and change Count, Start Angle and Gravity in the Properties tab. The preview follows.
  4. Pick Human (1.9 m) in the scale reference box to check the size, and look at the detail levels.
  5. Press Build. The status line lists the forest items written, <name>_v0 to <name>_v3.
  6. Press Use in Foliage and pick a Foliage node and tier. The tree’s name goes into that tier’s Item Types, and every variant is scattered.

The next pages go through the generators and their settings with pictures. Every setting is listed in the generator reference.