Treeline – GPU Vegetation & Forests for URP
Any tree you already have. Create a vegetation type from a prefab: LOD Groups or *_LOD0 / *_LOD1 meshes are ... Keep painting with Unity's terrain tools. ... Procedural grass generator.
by PrimeMode Studios
Price History +
- Unity 2022.3 LTS (URP 14) and Unity 6 (URP 17)
- Universal Render Pipeline: Forward, Forward+ and Deferred
- Needs compute shaders and indirect drawing: tested on Windows with DirectX 11 and DirectX 12
- GPU culling per camera, LOD 0 / LOD 1 / impostors with dithered cross-fade, impostor baker
- GPU grass from terrain detail layers or density maps, wind, up to 16 benders
- Unity Terrain bridge, biome rules, trunk collider pool
- Benchmark scene: 200,000 trees, 105 fps (Treeline) vs 5.7 fps (Unity terrain trees) on an RTX 2060 SUPER at 1920 x 1080
- Both input systems in the demo
- No third-party dependencies, no network calls
- Demo art based on CC0 assets from Poly Haven (see Third-Party Notices)
- Full C# and HLSL source code
Forests to the horizon, at a frame rate you can ship.
Treeline draws your vegetation with the GPU doing the work: a compute shader culls every plant for every camera, picks its level of detail and fills indirect draw calls. No GameObjects per tree, no CPU loops over instances, no per-blade memory for grass. In the included benchmark scene the same 200,000 trees run at 105 fps with Treeline and 5.7 fps with Unity's terrain trees (RTX 2060 SUPER, 1920 x 1080). The scene is in the package: press T to switch and measure it on your own machine.
What it does
- GPU culling and indirect drawing. Frustum and distance culling in a compute shader for each camera (game, scene view, reflection probes), then one indirect draw per mesh and level. Trees just outside the view keep casting their shadows into it.
- Levels of detail without popping. LOD 0, LOD 1 and a baked impostor, with a dithered cross-fade between them. Impostors are 8 x 8 hemi-octahedral captures blended from three views, baked for you in one click; the near ones cast real shadows.
- Any tree you already have. Create a vegetation type from a prefab: LOD Groups or *_LOD0 / *_LOD1 meshes are merged, URP Lit, Standard and similar materials are converted to the Treeline leaves and bark shaders, the impostor is baked.
- Keep painting with Unity's terrain tools. Add Treeline Terrain to a terrain and Treeline draws the trees you paint, with nothing to export.
- Biome rules. Fill whole terrains in a second: rules by terrain layer, height, slope, density, spacing and patchiness, clearings, scale ranges, saved as compact instance sets. A report tells you what each rule placed and why it skipped the rest.
- Grass and flowers by the million. Scattered by the GPU around the camera every frame from density maps, thinned with distance while the cover stays even, with colour patches to break the carpet. It costs no memory per plant.
- Grass that moves. Wind with rolling gusts for trees and grass (Unity WindZone supported), and up to 16 characters or vehicles pushing the grass aside.
- Procedural grass generator. No grass art? Create a clump of curved blades and flowers from a menu, with your colours, in seconds.
- Solid trunks. A small pool of capsule colliders follows your player, so trees block without thousands of colliders in the scene.
- Debug view. Colour by level (LOD 0, LOD 1, impostor, impostor with shadow) to tune the distances.
In the box
- A 2 x 2 km demo valley to walk or fly through: six trees (fir, pine, oak, birch, poplar, dead tree), two bushes, three rocks, eight grasses and flowers (two made with the grass generator), placed by 19 biome rules.
- The 4 x 4 km benchmark scene with 200,000 trees, Treeline against Unity's terrain trees.
- A manual with a quick start and every setting explained.
- Full C# and HLSL source, commented in plain English.