• Stars
    star
    190
  • Rank 196,897 (Top 4 %)
  • Language
    C
  • Created over 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Procedural tree mesh generator (and editor)

ProcTree

This is a liberally licensed procedural tree generator in c++, along with an editor HappyTree.

Quick walkthrough of 20150123 version (youtube video)

The procedural generation itself is a port from https://github.com/supereggbert/proctree.js/ see http://snappytree.com for an online demonstration of the original proctree.js (with webgl). The c++ port is several orders of magnitude faster than the original, and also fixes the UV mapping.

Binaries

Download win32 binaries at: http://iki.fi/sol/zip/happytree_20150123.zip

Additional (not mandatory) 400 megs of trunk / twig textures http://iki.fi/sol/zip/happytree_20150118_tex.zip

If you opt to download the additional textures, just unzip both zips in the same place. HappyTree will work without the additional textures (it'll actually be faster), so if you're just trying it out, I recommend NOT downloading the additional stuff.

All of the textures are CC0 / public domain material (primarily, if not completely, by nobiax.deviantart.com). The additional textures do let you make more varieties of trees though; the base package only comes with one trunk and twig texture.

The happytree editor requires OpenGL 3.3, but seriously, who doesn't have that?

Usage should be pretty intuitive, you can rotate the camera by dragging and zoom in and out with the mouse wheel.

Motivation

I wanted a tree generator I can use to generate trees at runtime in C.

License

The generator itself is licensed under 3-clause BSD license (personally I'd have opted for something even more liberal, but that's what the original proctree.js used). See the source file for the actual license.

The editor's sources and support libraries are under variety of bsd and zlib liceses. See legal_notes.txt in the happytree directory for details.

Dependencies

The generator itself has no dependencies, and was designed to be easily plugged into whatever.

The editor (HappyTree) has a bunch of dependencies:

  • proctree (naturally)
  • GLee opengl extension library (included)
  • stb_image image loading library (included)
  • My modified opengl framework (included)
  • Ocornut's ImGui library (included)
  • SDL 1.2 cross-platform library
  • glm gl math library

Notes

The ported proctree.cpp does not generate exactly the same output as the original proctree.js. This may be partially due to the different math accuracy used, but it's possible that I managed to slip a bug or two into the algorithm. (Feel free to debug..)

Anything else?

Feel free to contact me, http://iki.fi/sol/

More Repositories

1

soloud

Free, easy, portable audio engine for games
C
1,617
star
2

escapi

Extremely Simple Capture API (ESCAPI) - simple webcam API for windows
C++
177
star
3

ipc

Public domain single header inter process communication primitives
C
122
star
4

emu8051

8051/8052 emulator with curses-based UI
C
102
star
5

atanua

Atanua Real-Time Logic Simulator
C
102
star
6

sassy

Sassy Audio Spreadsheet
C
92
star
7

dxwrapper

DirectX 1-7 wrapper project for making old games run on new hardware
C++
78
star
8

img2spec

Image Spectrumizer - convert RGB images into zx spectrum -friendly data
C++
76
star
9

speccy

zx spectrum development tools
C
61
star
10

specnext

Collection of my projects for zx spectrum next
C
43
star
11

shadertoolkit

A toolkit of public domain single-header libraries for shader-based opengl apps
C
39
star
12

covert_action

Sid Meier's Covert Action (1990) modding tools
C
19
star
13

textgl

Software rendered GL subset for text mode demos
C++
18
star
14

spriterotator

non-destructive sprite rotator
C
16
star
15

lfac

LFAC - Low Fidelity Audio Codec
C++
14
star
16

physfs_magicstream

PhysFS fork with magic streams
C
12
star
17

d3

DialogTree (d3) game dialogue engine
C++
9
star
18

adventofcode2021

Advent of code 2021 framework, c/c++
C++
8
star
19

munray

MunRay - a raytracer with no redeeming value
C++
8
star
20

solvbe

Universal VESA VBE 1.2 emulator for windows XP (and later) command prompt
C++
7
star
21

tiefighter-ddwrapper

DirectDraw wrapper for Star Wars - TIE Fighter (1998)
C++
6
star
22

interjector

C code instrumenting tool
C++
6
star
23

litterae_finis

Text mode demo "Litterae Finis" (2013) source code
C++
6
star
24

2dglbasecode

Sol's 2d GL basecode
C
4
star
25

dmlitefix

Hack to make the Alesis DM Lite drumkit usable with VSTs.
C++
3
star
26

nextfli

ZX Spectrum Next specific animation encoder (autodesk flic inspired)
C
3
star
27

zak

Zak file format, for register dump-based music (mos 6581sid, mos 8580 sid, ay-3-8910, ym2149f, etc)
C++
3
star
28

cfl

Compressed File Library, a doom wad-like virtual filesystem for games
C++
2
star
29

lcov-latex

LaTeX output from LCOV
Perl
2
star
30

wordchain

Word chain generator, analyses word chain probabilities in text and generates new text randomly
C++
2
star