Skip to content

3D Procedural environment generation in C++ with OpenGL

Notifications You must be signed in to change notification settings

lozog/Procedural-Nature-3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Nature Environment with Procedurally Generated Terrain and Trees

Screenshot of inparams2 Screenshot of inparams1 Screenshot of inparams3 Screenshot of inparams4 Screenshot of inparams5


Build

This program uses premake4 as the cross-platform build system. First you will need to build all the static libraries that the projects depend on. To build the libraries, open up a terminal, and cd to the top level of the project directory and then run the following:

$ premake4 gmake
$ make

This will build the following static libraries, and place them in the top level lib folder of the project directory.

  • libcs488-framework.a
  • libglfw3.a
  • libimgui.a

I have added libSOIL.a to this folder. This may work out of the box, or you may need to manually install SOIL on your machine.

Next we can build the actual project. To do this, cd into the src/ directory and run the following terminal commands in order to compile the A5 executable using all .cpp files in the src directory:

$ cd src/
$ premake4 gmake
$ make

Other Resources


Dependencies


Original Objectives

  1. UI: Implement a first-person camera with associated controls to allow navigation of the scene, including movement in 3 axes, speed adjustment, and camera rotation

  2. Modelling: Add a skybox to the scene using cube mapping

  3. Implement reflections for water using OpenGL's stencil buffer

  • I implemented skybox reflections on the water instead
  1. Generate a pseudo-random terrain heightmap with Perlin noise

  2. Add grass to the scene using billboards to create the illusion of many blades of grass

  3. Add texture to the ground and foliage using texture mapping

  4. Use L-systems to procedurally generate trees

  5. Implement shadows using a depth map stored in an OpenGL frame buffer

9. Implement bloom using framebuffers and Gaussian blur

  1. Use a 'screen-door' effect to simulate alpha transparency for grass

About

3D Procedural environment generation in C++ with OpenGL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published