Skip to content

NGNT/treegen-pinegen

Repository files navigation

🌲 treegen-pinegen

treegen-pinegen logo

Procedural Voxel Tree + Pine Tree Generator for MagicaVoxel

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

Built with Python, Tkinter, and NumPy — no external 3D tools required.

✨ Features

  • 🌳 Treegen – Oak-style branching tree generator
  • 🌲 Pinegen – Pine tree generator with cone-shaped leaf clusters
  • 🎨 Custom Palettes – Use .png palettes for different tree types
  • 🧩 Tabbed GUI – Switch between tree and pine generation in one app
  • 🎛️ Sliders for Everything – Size, twist, branch density, leafiness, and more
  • 🪟 Preview Window - Visualize your output in real-time before you generate
  • 💾 .VOX Export – Compatible with MagicaVoxel
  • 📁 Organized Output – Saves to output/tree/ and output/pine/

🚀 How to Run

  1. Install dependencies
pip install pillow numpy
  1. Run the app
python treegen-pinegen.py

Downloads

You can also find the pre-compiled .exe under Releases to get right in.

🛠️ Build to .exe (Optional)

You can compile it into a standalone executable using PyInstaller:

pyinstaller --onefile --windowed --icon=treegen_icon.ico ^
  --add-data "treegen_brand.png;." ^
  --add-data "pinegen_brand.png;." ^
  --add-data "palettes;palettes" ^
  treegen-pinegen.py

💡 On macOS/Linux, replace ; with : in --add-data paths.

🖼️ Palettes

Each palette is a 256x1 PNG image with indexed colors.

  • Tree palettes: palettes/tree/
  • Pine palettes: palettes/pine/
  • Make sure to add new palettes to the appropriate internal dictionary in the script.

👤 Credits

Created by NGNT
With GUI and architecture support from Cursor and ChatGPT 🤖
Inspired by nature.

📜 License

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


About

The procedural voxel tree + pine tree generator for MagicaVoxel

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages