A downloadable tool for Windows

πŸ›‘οΈ Antivirus Notice
This program may be flagged by some antivirus software because it’s a custom .exe generated with PyInstaller.
It does not contain any malware — you can check the source code yourself on GitHub.
If in doubt, run the .py version directly using Python.

🌲 treegen-pinegen v1.5.3

Procedural voxel tree generator for MagicaVoxel 

Generate customizable .vox trees using palettes, sliders, and pure Python.

Built with Python, NumPy, and Pillow. The project uses a PyQt6 GUI (treegen_qt.py) which calls the shared core in worker modules.

✨ Features

  • Five generators:
    • Treegen - oak-style branching tree generator
    • Pinegen - pine/conifer generator with cone-shaped leaf clusters
    • Birchgen - birch tree generator with slender trunks and spreading crown
    • Palmgen - tropical palm generator (new)
  • GUI:
    • PyQt6 UI: treegen_qt.py (menu, About dialog, inline status, tabbed interface)
  • Real-time preview with multiprocessing (heavy generation in subprocesses for speed)
  • Export to MagicaVoxel .vox via VoxExporter
  • Randomize presets and deterministic generation via seed
  • Organized output folders: output/tree/ and output/pine/
  • "Open file after generation" option (platform-aware)
  • Non-modal export status displayed above each preview in the PyQt UI


✨ Controls (implemented in the PyQt UI):

  • Treegen sliders/controls and ranges:
    • Size: 0.1 — 3.0
    • Trunk Size: 0.1 — 1.2
    • Spread: 0.0 — 1.0
    • Twist (twisted): 0.0 — 1.0
    • Leafiness: 0.0 — 3.0
    • Gravity: -1.0 — 1.0
    • Wide: 0.0 — 1.0
    • Iterations: 5 — 15 (integer)
    • Seed: 1 — 9999
  • Pinegen sliders/controls and ranges:
    • Size: 0.1 — 3.0
    • Twist (twisted): 0.0 — 4.0
    • Trunk Size: 1.0 — 3.0
    • Trunk Height: 0.0 — 5.0
    • Branch Density: 0.0 — 3.0
    • Branch Length: 0.0 — 3.0
    • Branch Direction: -5.0 — 5.0
    • Leafiness: 0.0 — 2.0
    • Leaf Radius: 1.0 — 4.0
    • Leaf Stretch: 0.5 — 3.0
    • Leaf Bias: -1.0 — 1.0
    • Seed: 1 — 9999

  • Palmgen sliders/controls and ranges:


    • Size: 0.1 — 3.0
    • Trunk Height: 0.0 — 340.0
    • Trunk Width: 0.3 — 4.0
    • Trunk Iter: 12 — 80 (integer)
    • Bend: 0.0 — 1.0
    • Frond Count: 4 — 72
    • Frond Length: 0.1 — 3.0
    • Frond Var: 0.0 — 1.0
    • Frond Random: 0.0 — 1.0
    • Gravity: 0.0 — 1.0
    • Frond Width: 0.1 — 1.0
    • Seed: 1 — 9999

  • Kapokgen sliders/controls and ranges (new):
    • Size: 0.1 — 3.0
    • Trunk Extend: 0.0 — 340.0
    • Trunk Size: 0.3 — 4.0
    • Trunk Iter: 8 — 40 (integer)
    • Bend: 0.0 — 1.0
    • Root Twist: 0.0 — 1.0
    • Root Profile: 0.0 — 1.0
    • Root Spread: 0.0 — 1.0
    • Root Count: 0 — 8 (integer)
    • Root Variance: 0.0 — 1.0
    • Canopy Iter: 5 — 15 (integer)
    • Wide: 0.0 — 1.0
    • Spread: 0.0 — 1.0
    • Canopy Twist: 0.0 — 1.0
    • Leaves: 0.0 — 3.0
    • Gravity: -1.0 — 1.0
    • Canopy Thick: 0.0 — 1.0
    • Canopy Profile: 0.0 — 1.0
    • Canopy Flat: 0.0 — 1.0
    • Canopy Start: 0.0 — 1.0
    • Seed: 1 — 9999

Other UI features (PyQt6 port)

  • Menu bar: File β†’ Close, Help β†’ About (About shows app/version/credits)
  • Inline status: export results appear above the preview (tree_dim_label/pine_dim_label/birch_dim_label)
  • Preview uses worker modules and runs in a worker QThread with progress signals and cooperative cancellation
  • Export runs in a separate process (ProcessPoolExecutor) and writes .vox files using VoxExporter
  • Tabbed interface for easy switching between generators
  • Previews update on startup, tab changes, and palette selections

πŸ›  How to Use:

  1. Download and extract the ZIP

  1. Run the .exe (or the Python script if you're on Linux/macOS)

  2. Adjust the sliders and click "Generate"

  3. Load the .vox file in Magicavoxel or drop it into your game!

Requirements for compilation

Minimum Python packages:

  • Python 3.8+
  • numpy
  • pillow
  • PyQt6

Install with pip:

pip install numpy pillow PyQt6

Running compilation

PyQt6 UI (primary):

python treegen_qt.py

Export & Output

  • Exports produce .vox files compatible with MagicaVoxel and are saved to output/tree/oroutput/pine/.
  • Filenames use timestamps (e.g., treegen_20231005_143022.vox) to ensure uniqueness without external counter files.

πŸ“œ License

MIT — Free to use, remix, and plant digital forests 🌳🌲

πŸ“œ Credits

Made by NGNT Creations.

Download

Download
treegen.zip
External
Download
treegen.zip 50 MB

Install instructions

πŸ›  How to Use:

  1. Download and extract the ZIP

  2. Run the .exe

  3. Adjust the sliders and click "Generate"

  4. Load the .vox file in MagicaVoxel or drop it into your game!

Development log

Leave a comment

Log in with itch.io to leave a comment.