The idea of this of the projection is simulate water movement on terrain, defined by a given file.
I used an algorithm, called Pipe-method, it is used along with height-field model. It works like this :
one creates a 2D array for storing water depth values, along with array for storing flow values.
(The flow is a water movement from given point to its neighbors.)
At each iteration of algorithm loop one updates flow values for each point and then updates depth according to new flow values.
- Rain
- Heavy rain
- Well
- Wave
- Four waves
- Flood
Noise is feature, that allows to generate better terrain. Noise configuration is passed to binary file as second argument. You can template of the configuration in noise folder. Generally every line of configuration file it looks like this :
[noise type] : [frequency] [range] (offset) (power)
Install some packages :
brew install glew
brew install glfw
brew install glm
brew install freetype
To compile program :
cd build
make
To run program pass terrain file and optionally noise file to binary
./build/mod1 [map file] (noise file)
- OpenGL 3D Game Tutorial - OpenGL game engine
- Equilinox - Game Menu - GUI on OpenGL
- Learn OpenGL - Big OpenGL tutorial
- OpenGL Low-Poly Terrain Tutorial - Tutorial on creating low-poly models
- Tutorial: Simple start with OpenCL and C++ - Tutorial on OpenCL C++ Wrapper
- Making maps with noise functions - Improving terrain model using Perlin noise
- "Large-Scale Water Simulation in Games" - Book about water simulation
- "Real-Time Fluid Simulation Using Height Fields" - Thesis about water simulation