Skip to content

Node reference ​

INFO

This page is generated from the node registry by scripts/docs_nodes.py. The editor shows the same labels and help in the Properties panel (the info button beside each field) and in the tooltip of each node in the Nodes panel. From the command line: askrgarden-cli nodes -v or askrgarden-cli nodes --json.

Each node below lists its ports (what it receives and what it gives) and its parameters. The parameter name in bold is what the editor shows; the key in code is what the .treegen.json file stores.

Value types on links ​

A link carries one type of value. The editor colours each port by its type and refuses a link between different types.

TypePort colourWhat it carries
skeleton #c9915aAll stems so far: lines with a radius per point, the parent stem, the level and where each stem starts on its parent.
foliage #6fbf4aLeaf placements: position, orientation, size, atlas variant and parent stem.
volume #8f7fd6A closed shape (ellipsoid, cone, cylinder, box, profile) that a crown grows into or is pruned to.
mesh #4fa3d9Triangles with normals, tangents, UVs, wind data and one material.
material #d9c24fA PBR material: texture slots, factors, alpha mode and UV rules.

Generators ​

Trunk ​

trunk · Category: Generators

Grows the stems that come out of the ground (one trunk or several).

Ports

PortDirectionTypeWhat it does
skeletonoutputskeletonThe trunk stems.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Stems countint11 … 12MainHow many stems grow from the ground.
Height lengthfloat (takes ± variance or a curve)80.1 … 80MainLength of each trunk stem in meters.
Base radius base_radiusfloat (takes ± variance or a curve)0.250.005 … 4MainRadius at the ground, in meters.
Tip radius tip_radius_ratiofloat0.150 … 1MainRadius at the top as a fraction of the base radius.
Segments segmentsint162 … 200MainPoints along the stem; more follow curves better.
Lean lean_anglefloat (takes ± variance or a curve)00 … 80MainLean from vertical, in degrees.
Lean direction lean_directionfloat0-360 … 360MainCompass direction of the lean, in degrees.
Wobble wobblefloat0.080 … 1MainHow much the stem wanders sideways.
Wobble frequency wobble_frequencyfloat0.250 … 5MainWobble waves per meter.
Root flare flarefloat0.60 … 4MainExtra radius at the very base (0.6 = 60% wider).
Flare height flare_heightfloat0.60.01 … 10MainHeight in meters over which the flare fades out.
Spread spreadfloat0.30 … 10Several stemsWith several stems: distance of each base from the centre, meters.
Spread angle spread_anglefloat120 … 80Several stemsWith several stems: extra outward lean, degrees.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Branches ​

branches · Category: Generators

Grows child stems on the selected stems: placement, angle, length and radius may vary along the parent.

Ports

PortDirectionTypeWhat it does
parentinputskeletonStems to grow on.
skeletonoutputskeletonInput plus the new stems.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Grow on selectenum"newest_level"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainWhich stems receive children (default: the newest level).
Placement placementenum"spiral"spiral, alternate, opposite, whorled, randomMainspiral = golden angle; alternate; opposite pairs; whorled rings; random.
Count countfloat (takes ± variance or a curve)120 … 500MainChildren per parent stem (used when density is 0).
Density densityfloat00 … 200MainChildren per meter of parent; overrides count when above 0.
Per whorl per_whorlint32 … 12MainChildren per ring when placement is whorled.
Start range_startfloat0.30 … 1MainWhere children start on the parent (0 base, 1 tip).
End range_endfloat0.950 … 1MainWhere children end on the parent.
Position jitter position_jitterfloat0.30 … 1MainRandom shift of each child along the parent.
Angle anglefloat (takes ± variance or a curve)500 … 180MainAngle between child and parent, degrees.
Roll jitter roll_jitterfloat150 … 180MainRandom turn around the parent, degrees.
Length lengthfloat (takes ± variance or a curve)00 … 60MainAbsolute part of the child length, meters.
Length of parent length_of_parentfloat (takes ± variance or a curve)0.40 … 3MainPart of the child length as a fraction of the parent length.
Shorter near tip limit_to_parent_restbooltrue—MainLimit children near the parent tip to the parent length left above them.
Radius ratio radius_ratiofloat0.550.01 … 1MainChild base radius as a fraction of the parent radius where it starts.
Tip radius tip_radius_ratiofloat0.150 … 1MainChild tip radius as a fraction of its base radius.
Bend up up_bendfloat (takes ± variance or a curve)15-180 … 180MainTotal bend toward the sky along the child, degrees.
Gravity gravityfloat (takes ± variance or a curve)100 … 180MainTotal bend toward the ground along the child, degrees.
Wobble wobblefloat0.120 … 1MainHow much children wander sideways.
Wobble frequency wobble_frequencyfloat0.80 … 10MainWobble waves per meter.
Segments segmentsint81 … 100MainPoints along each child.
Min radius min_radiusfloat00 … 1MainChildren thinner than this at their base are not grown.
Fork tips split_tipfloat00 … 1MainChance that a child forks into two short stems at its tip.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Space colonization ​

space_colonization · Category: Generators

Grows branches toward points scattered in a volume, competing for space (Runions et al. 2007).

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems to start from.
volumeinputvolumeWhere the crown may grow.
skeletonoutputskeletonInput plus the grown branches.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Attractors attractorsint80010 … 20000MainPoints scattered in the volume; more gives denser crowns.
Step stepfloat0.30.02 … 5MainLength of each new segment (D), meters.
Influence radius influence_radiusfloat61 … 50MainHow far an attractor pulls, in multiples of the step.
Kill radius kill_radiusfloat1.50.5 … 20MainAn attractor this close to a branch is used up, in multiples of the step.
Bias direction biasvec3[0.0, 1.0, 0.0]—MainDirection added to every growth step.
Bias strength bias_strengthfloat0.20 … 5MainWeight of the bias direction.
Max iterations max_iterationsint2001 … 5000MainUpper limit of growth steps.
Start from start_fromenum"newest_level"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainStems whose points may sprout branches.
Start at start_atfloat0.50 … 1MainOnly points above this fraction of each start stem may sprout.
Pipe exponent grow_radius_byfloat2.31.5 … 3.5MainPipe model exponent: parent radius^e = sum of child radius^e (2 to 3).
Tip radius tip_radiusfloat0.0080.0005 … 0.2MainRadius of the finest twigs, meters.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Volume ​

volume_shape · Category: Generators

A closed shape used by space colonization (where branches may grow) and by prune.

Ports

PortDirectionTypeWhat it does
volumeoutputvolumeThe shape.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Shape shapeenum"ellipsoid"ellipsoid, cone, cylinder, box, profileMainellipsoid, cone, cylinder, box, or profile (radius by height).
Size sizevec3[3.0, 3.0, 3.0]—MainRadii (ellipsoid), half sizes (box), or radius, height, radius (cone, cylinder, profile).
Centre centervec3[0.0, 7.0, 0.0]—MainCentre (ellipsoid, box) or base centre (cone, cylinder, profile), meters.
Profile profilelist[[0, 0.3], [0.4, 1.0], [1, 0.1]]—MainFor shape profile: [height 0-1, radius 0-1] points.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Modifiers ​

Bend ​

bend · Category: Modifiers

Bends the selected stems toward a direction, more toward their tips.

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems to bend.
skeletonoutputskeletonBent stems.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Toward directionenum"gravity"gravity, up, sun, customMaingravity (down), up, sun (up and slightly sideways) or a custom vector.
Custom direction custom_directionvec3[1.0, 0.0, 0.0]—MainUsed when Toward is custom.
Strength strengthfloat (takes ± variance or a curve)20-180 … 180MainBend angle at the tip, degrees; a curve along the stem shapes it.
Stems selectenum"newest_level"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainWhich stems bend.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Prune ​

prune · Category: Modifiers

Removes stems (and everything growing on them) by level, thinness, chance or a volume.

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems to prune.
keep_insideinput (optional)volumeOptional: stems mostly outside it are removed.
skeletonoutputskeletonWhat is left.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Stems selectenum"all"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainWhich stems may be removed.
Min radius min_radiusfloat00 … 1MainRemove stems thinner than this at the base, meters.
Max level max_levelint100 … 10MainRemove stems deeper than this level (0 = trunk).
Knock out knockoutfloat00 … 1MainFraction of stems removed at random.
Inside fraction inside_fractionfloat0.50 … 1MainWith a volume: keep a stem when at least this fraction of its points is inside.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Radius rule ​

radius_rule · Category: Modifiers

Rebuilds every radius from the tips down with the pipe model, so parents are as thick as their children need.

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems.
skeletonoutputskeletonStems with new radii.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Exponent exponentfloat2.31.5 … 3.5Main2 = da Vinci's rule; 2-3 in practice. Higher makes parents thinner.
Min tip radius min_tip_radiusfloat0.0040.0005 … 0.2MainSmallest radius at any tip, meters.
Taper taperfloat (takes ± variance or a curve)10.05 … 4MainMultiplier along each stem (use a curve over along_stem).
Root flare flarefloat00 … 4MainExtra radius at the base of trunk stems.
Flare height flare_heightfloat0.60.01 … 10MainHeight over which the flare fades, meters.
Scale scalefloat10.05 … 10MainMultiplies every radius at the end.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Wobble ​

wobble · Category: Modifiers

Adds smooth random waves along the selected stems.

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems.
skeletonoutputskeletonWobbled stems.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Amount amountfloat0.030 … 0.5MainSideways offset as a fraction of stem length.
Frequency frequencyfloat0.50 … 10MainWaves per meter.
Stems selectenum"all"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainWhich stems wobble.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Foliage ​

Leaves ​

leaves · Category: Foliage

Places leaf cards on the selected stems.

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems that carry leaves.
foliageoutputfoliageLeaf placements.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Grow on selectenum"newest_level"newest_level, all, not_trunk, level_0, level_1, level_2, level_3, level_4MainWhich stems carry leaves.
Placement placementenum"random"spiral, alternate, opposite, whorled, randomMainHow leaves are spread along a stem; random uses a low-discrepancy sequence.
Count countfloat (takes ± variance or a curve)100 … 500MainLeaves per stem (used when density is 0).
Density densityfloat00 … 500MainLeaves per meter of stem; overrides count when above 0.
Start range_startfloat0.20 … 1MainWhere leaves start on the stem.
End range_endfloat10 … 1MainWhere leaves end on the stem.
Size sizefloat (takes ± variance or a curve){"value": 0.35, "variance": 0.08}0.005 … 10MainCard height, meters.
Angle anglefloat (takes ± variance or a curve)550 … 180MainAngle between leaf and stem, degrees.
Facing orientationenum"face_up"follow_stem, face_up, face_outMainfollow_stem keeps the stem in the card plane; face_up turns cards to the sky; face_out away from the stem.
Tilt jitter tiltfloat250 … 90MainRandom turn of each card around its own axis, degrees.
Atlas variants atlas_variantslist[1.0]—MainWeight of each atlas region (one number per region of the leaf material).
Tip cluster tip_clusterint20 … 30MainExtra leaves at the tip of each stem.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Meshers ​

Bark mesher ​

bark_mesher · Category: Meshers

Turns stems into bark tubes with tiling UVs (whole tiles around, true length along).

Ports

PortDirectionTypeWhat it does
skeletoninputskeletonStems to mesh.
materialinput (optional)materialBark material.
meshoutputmeshBark mesh.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Mesh name mesh_namestring"bark"—MainName of the mesh in exported files.
Sides (thin) radial_segments_minint43 … 64MainSides around the thinnest stems.
Sides (thick) radial_segments_maxint123 … 64MainSides around the trunk.
Rings per meter length_resolutionfloat30.2 … 50MainRings along each stem per meter (original points are always kept).
Tiles around uv_tiles_aroundint00 … 32MainTexture tiles around each stem; 0 = automatic from the radius and the material tile size.
UV jitter uv_offset_jitterfloat10 … 1MainRandom UV offset per stem to hide repeats.
Close tips capsbooltrue—MainClose the tip of each tube.
LOD stem drop lod_stem_powerfloat10.2 … 4LODsLower LODs keep detail^power of the stems, thickest first.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Leaf mesher ​

leaf_mesher · Category: Meshers

Turns leaf placements into cards (quads, crossed quads or your own card mesh).

Ports

PortDirectionTypeWhat it does
foliageinputfoliageLeaf placements.
materialinput (optional)materialLeaf material.
custom_cardinput (optional)meshOptional card mesh: x across, y up from the base, z normal; height 1.
meshoutputmeshLeaf mesh.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Mesh name mesh_namestring"leaves"—MainName of the mesh in exported files.
Card cardenum"quad"quad, cross, customMainquad = one plane; cross = two crossed planes; custom = the connected mesh.
Pivot pivotenum"base"base, centerMainWhere the card attaches: its base or its centre.
Normals normalsenum"crown"flat, crownMainflat = card normal; crown = blended toward the crown's outside for soft shading.
Crown blend crown_amountfloat0.60 … 1MainHow much crown normals replace card normals.
Columns subdiv_xint11 … 8MainQuads across each card (quad and cross cards; custom meshes are left as they are). Raised to 2 when fold is set and to 4 when cup is set.
Rows subdiv_yint11 … 8MainQuads along each card's length. Raised to at least 3 when curl, twist or shape variation is set.
Fold foldfloat0-1 … 1MainV-fold along the midrib: the sides lift toward the card normal (about 60 degrees per side at 1; negative folds the other way). Needs 2 columns; a single column is raised to 2.
Curl curlfloat0-1 … 1MainBends the card along its length as an arc, tip toward the normal (up to 90 degrees at 1). Rows are raised to at least 3.
Cup cupfloat0-1 … 1MainBends the card across its width as a smooth arc (a rounder fold, up to 120 degrees in total). Columns are raised to at least 4.
Twist twistfloat0-1 … 1MainTwists the card around its midrib from base to tip (up to 90 degrees at the tip). Rows are raised to at least 3.
Shape variation shape_jitterfloat00 … 1MainRandom per-leaf variation of fold, curl, cup and twist (seeded, so builds are repeatable). Lower LODs use fewer subdivisions and clusters stay flat.
Clusters below cluster_belowfloat0.150 … 1LODsLODs with detail below this merge leaves into few large cards.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Mesh input ​

mesh_input · Category: Meshers

Reads a GLB, glTF, OBJ or FBX mesh: a custom leaf card, a fruit, or a reference.

Ports

PortDirectionTypeWhat it does
materialinput (optional)materialMaterial to use.
meshoutputmeshThe mesh (all parts joined).

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
File pathpath——MainMesh file relative to the project.
Scale scalefloat10.0001 … 1000MainMultiplies positions.
Mesh name mesh_namestring""—MainName in exported files (empty = file name).
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Materials ​

PBR material ​

pbr_material · Category: Materials

Textures and factors of one material (bark or leaves). Can be filled from a PBRGenerator manifest.

Ports

PortDirectionTypeWhat it does
materialoutputmaterialThe material.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Name namestring""—MainMaterial name in the exported files (empty = node id).
PBRGenerator manifest pbrgen_manifestpath——MainA <prefix>_manifest.json from PBRGenerator; fills every slot with its colour space and normal convention.
base color base_colortexture——TexturesAlbedo (sRGB); its alpha cuts leaves out.
opacity opacitytexture——TexturesCoverage when the alpha is not in the base colour (white = solid).
normal normaltexture——TexturesTangent-space normal map; set its convention (opengl or directx).
roughness roughnesstexture——TexturesRoughness, 1 = rough (a smoothness map with invert: true).
metallic metallictexture——TexturesMetallic, almost always empty for trees.
occlusion occlusiontexture——TexturesAmbient occlusion, white = open.
height heighttexture——TexturesHeight, white = high (16-bit kept).
translucency translucencytexture——TexturesLight through the leaf (colour x amount).
tint mask tint_masktexture——TexturesWhere per-instance tint applies (white = full).
emissive emissivetexture——TexturesEmitted light (sRGB), rarely used.
Colour base_color_factorlist[1.0, 1.0, 1.0, 1.0]—MainRGBA multiplier (linear); the colour when there is no texture.
Roughness roughness_factorfloat10 … 1MainRoughness multiplier.
Metallic metallic_factorfloat00 … 1MainMetallic multiplier.
Normal strength normal_scalefloat10 … 4MainStrength of the normal map.
Occlusion strength occlusion_strengthfloat10 … 1MainHow much the occlusion map darkens.
Alpha alpha_modeenum"opaque"opaque, maskMainopaque for bark; mask cuts leaves out at the cutoff.
Alpha cutoff alpha_cutofffloat0.50 … 1MainAlpha below this is cut away.
Two-sided double_sidedboolfalse—MainRender both faces (leaves).
Tile size tile_size_mfloat10.01 … 100MainWorld size of one texture tile in meters (bark: sets UV density).
Tile size from manifest tile_size_from_manifestbooltrue—MainUse the manifest's physical tile size when it has one.
Atlas regions atlaslist[[0.0, 0.0, 1.0, 1.0]]—MainLeaf regions [u0, v0, u1, v1] in the texture (v down, glTF); the leaf base is at v1.
Translucency translucency_factorfloat00 … 1MainHow much light passes through (leaves).
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Output ​

Tree output ​

tree_output · Category: Output

What gets built and exported: the meshes, the LOD chain, wind data and the impostor.

Only one per graph.

Ports

PortDirectionTypeWhat it does
meshesinput (takes many links)meshMeshes of the tree.

Parameters

ParameterKindDefaultRange / optionsGroupWhat it does
Name namestring"tree"—MainBase name of exported files and meshes.
Species tag speciesstring""—MainFree tag written into the export metadata (for scatter tools).
LODs lodslist[1.0, 0.5, 0.2]—LODsDetail fraction of each LOD, from 1.0 (everything) down.
Switch sizes lod_screen_sizeslist[]—LODsScreen height fraction where each LOD ends (empty = suggested).
Wind data wind_databooltrue—EngineWrite wind data in vertex colour and UV2/UV3 (layout treegen_wind_v1).
Merge by material merge_by_materialbooltrue—EngineOne mesh part per material in each LOD.
Shadow proxies shadow_proxyboolfalse—EngineAlso write a cheaper shadow-casting mesh per LOD.
Collision capsules collisionbooltrue—EngineWrite trunk and bough capsules into the export metadata.
Impostor impostorobject{"enabled": false, "grid": 8, "layout": "hemi", "frame_px…—ImpostorOctahedral impostor: the tree photographed from many directions into one atlas, drawn far away as a single card that picks and blends the nearest views. It replaces thousands of triangles with a few. Each field below has its own explanation.
Re-roll seed_offsetint00 … 1000000AdvancedChanges this node's random stream only; every other node keeps its result.

Fields of Impostor (impostor)

ParameterKindDefaultRange / optionsWhat it does
Export the impostor enabledboolfalse—Adds the impostor as the last LOD of every export (atlases, and the card in GLB/glTF). The preview can bake and show it even with this off.
Views per side gridenum86, 8, 12The tree is photographed from grid x grid directions: 8 = 64 views. More views = smoother change as the camera moves, but each view gets a smaller share of the atlas (or the atlas grows).
Directions covered layoutenum"hemi"hemi, fullhemi: only from the horizon up, right for anything standing on the ground (all views are useful). full: the whole sphere, also from below, for objects seen from any side (half the views point up).
Pixels per view frame_pxenum256128, 256, 384, 512, 1024Side of each view in the atlas. The atlas is grid x this: 8 x 256 = 2048 px. 512 is much sharper up close but takes about four times longer to bake and four times the memory.
Normal + depth size normal_scaleenum0.50.25, 0.5, 1Size of the normal and depth atlas relative to the colour atlas: 0.5 = half the side (a quarter of the memory). Lighting and parallax come from it; 1 is sharper.
Card strips stripsenum81, 2, 4, 8The card is cut into this many horizontal strips, each as wide as the tree at that height, so the engine draws fewer empty pixels. 8 strips = 16 triangles; 1 = a plain square of 2 triangles.
LOD photographed source_lodint00 … 8Which LOD of the tree is rendered into the views. 0 = the most detailed.
Mask atlas extra_mapsboolfalse—Also writes a mask atlas (R ambient occlusion, G roughness, B translucency) for engine shaders that use it.