---
title: "Forest Generator - s&box library"
description: "Uses noise to generate a forest using prefabs (trees, shrubs, grass etc.)"
canonical: "https://sbox.watch/libraries/doubled/forest_generator/"
generated_at: "2026-07-22T23:18:23.253Z"
---

# Forest Generator

Uses noise to generate a forest using prefabs (trees, shrubs, grass etc.)

- Type: library
- Ident: doubled.forest_generator
- Creator: doubled
- Canonical: https://sbox.watch/libraries/doubled/forest_generator/
- Markdown: https://sbox.watch/libraries/doubled/forest_generator.md
- sbox.game: https://sbox.game/doubled/forest_generator/
- Generated: 2026-07-22T23:18:23.253Z

## Stats

- 24h momentum: +0
- Terry score: 27%
- Favorites: 4
- Upvotes: 1
- Downvotes: 0
- Updated: Feb 20, 2026
- Created: Feb 20, 2026
- Size: 41.4 MB
- Files: 283
- Tags: foliage, forest, generator, grass, noise, perlin, procedural, shrub

## Description

Doubled – Forest Generator & Terrain Painter
A pair of editor tools for procedural world building directly inside the s&box editor.
Forest Generator
Scatter prefabs across your scene procedurally with full artistic control.
- Prefab list with weighted randomization – define any number of prefabs (trees, rocks, props…) each with an independent spawn probability weight
- Bounding box placement – draw the area directly in the scene or set it manually
- Perlin noise density – control where prefabs cluster and where they thin out using noise scale and threshold
- Random scale variation – set min/max scale per generation run
- Align to terrain normal – objects orient themselves to the slope they're placed on
- Seed-based randomization – repeat or vary results with a single seed value
- Preset save/load – store and recall your favourite configurations as JSON files

Terrain Painter
Procedurally apply materials to your terrain in one click using three purpose-built layers.
- Base layer – the ground material (e.g. grass) that covers everything
- Shore layer (sand) – paints a beach band around a configurable water level using world-space height. Supports smooth blending into the base layer, organic noise displacement on the shoreline edge, and a max-height cap to prevent painting sand on cliffs
- Slope layer (rock) – paints steep areas with a configurable slope threshold. Fades smoothly into the underlying material (grass or sand) using a configurable blend width. Respects a shore-avoidance zone so rocky cliffs near the water correctly show sand underneath, not rock
- Smart two-material resolve – because s&box terrain blends exactly two materials per texel, the painter automatically picks the best pair (rock over sand on a rocky beach, rock over grass inland, sand over grass on a flat beach)
- Preset save/load – same JSON system as the Forest Generator


