All Projects β†’ stanfortonski β†’ Procedural-Terrain-Generator-OpenGL

stanfortonski / Procedural-Terrain-Generator-OpenGL

Licence: MIT license
Procedural terrain generator with tessellation | C++ OpenGL 4.1

Programming Languages

C++
36643 projects - #6 most used programming language
GLSL
2045 projects

Projects that are alternatives of or similar to Procedural-Terrain-Generator-OpenGL

Dungeontemplatelibrary
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 595 (+507.14%)
Mutual labels:  procedural-generation, terrain, graphics-programming, 3d-graphics
VulkanRenderer
Personal repo for learning the vulkan graphics api
Stars: ✭ 42 (-57.14%)
Mutual labels:  procedural-generation, graphics-programming, procedural-terrain
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+354.08%)
Mutual labels:  graphics-programming, 3d-graphics, 3d-models
DrawSpace
Space-game oriented rendering engine
Stars: ✭ 20 (-79.59%)
Mutual labels:  procedural-generation, graphics-programming, perlin-noise
StickMan-3D
StickMan 3D: First Round | indie fighting game | C++ OpenGL
Stars: ✭ 60 (-38.78%)
Mutual labels:  3d-graphics, 3d-models, 3d-mesh
AsLib
🎨: RPG map maker (paint tool)
Stars: ✭ 82 (-16.33%)
Mutual labels:  procedural-generation, terrain, procedural-terrain
Three.terrain
A procedural terrain generation engine for use with the Three.js 3D graphics library for the web.
Stars: ✭ 353 (+260.2%)
Mutual labels:  procedural-generation, terrain
Tree Gen
Procedural generation of tree models in blender
Stars: ✭ 465 (+374.49%)
Mutual labels:  procedural-generation, 3d-models
Veloren
[Mirror] An open world, open source voxel RPG inspired by Dwarf Fortress and Cube World
Stars: ✭ 868 (+785.71%)
Mutual labels:  procedural-generation, terrain
Spheres
Methods to create a sphere mesh
Stars: ✭ 168 (+71.43%)
Mutual labels:  procedural-generation, terrain
SimpleErosion
Simple C++ implementatoin of particle-based hydraulic erosion on a square grid
Stars: ✭ 64 (-34.69%)
Mutual labels:  procedural-generation, terrain
Unity3d Ai And Procedural Generation Framework
Unity3D AI and Procedural Generation Framework.
Stars: ✭ 58 (-40.82%)
Mutual labels:  procedural-generation, terrain
Mixture
Mixture is a powerful node-based tool crafted in unity to generate all kinds of textures in realtime
Stars: ✭ 209 (+113.27%)
Mutual labels:  procedural-generation, graphics-programming
DungeonTemplateLibraryUnity
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 51 (-47.96%)
Mutual labels:  procedural-generation, terrain
Thalatta
An open source terrain generation suite.
Stars: ✭ 37 (-62.24%)
Mutual labels:  procedural-generation, terrain
Erics Magicavoxel Shaders
Shaders for MagicaVoxel including Terrain Generator, Life Game, Waterflow Emulator, Advanced Flood System etc.
Stars: ✭ 99 (+1.02%)
Mutual labels:  procedural-generation, terrain
GroundGrowing
Open Source Unity3d Planetary Terrain Editor Extension with incremental background updates via multithreading
Stars: ✭ 66 (-32.65%)
Mutual labels:  terrain, perlin
Shan Shui Inf
Procedurally generated Chinese landscape painting.
Stars: ✭ 3,168 (+3132.65%)
Mutual labels:  procedural-generation, perlin-noise
Perlin-Noise-3D-Voxel-Generator
Voxel generator based on perlin 3d noise | Python OpenGL
Stars: ✭ 22 (-77.55%)
Mutual labels:  perlin-noise, perlin-terrain
Weltenschaft
Open-Source terrain generator πŸ—ΊοΈ
Stars: ✭ 41 (-58.16%)
Mutual labels:  procedural-generation, terrain

Procedural-Terrain-Generator-OpenGL

Procedural Terrain Generator With Tessellation OpenGL 4.1 | C++

Terrain with water relfection

YouTube video: https://www.youtube.com/watch?v=KDmZJgTf-HE

How it work?

Terrain: For creating realistic surface I choosed Perlin Noise or simply noise method to generate heightmap. Heightmap is stored in 2D texture. The same data which we generate is used for convert heightmap to normalmap. That process is achieved by using Sobel Operator and normalize texture data. By the way it is easy to generated normal in shaders but that is expensive for efficient of our gpu. CPU do that faster and once, so for me better. And again we have to pass normalmap to graphic card memory as 2D texure. So now we have two textures. We can pass textures to shaders and use as samplers. Heightmap is used to increase y-axis in tesselation evaluation shader and normalmap is used to calculate the normal of surface to make proper light. OpenGL 4.0 provide us tesselation feature. With Tessellation it is easy to create terrain with dynamic level of detail. Distance between surface and camera can be used for evaluation the LOD. So if we're farther from the surface it will be rendered faster. Answer is short: tessellation is also in use in this project.

Water: Water is a simple plane without tessellation. The water is using dudv map for realistic movement the water and normalmap to calculate light. Water include reflections and refraction for good visual effect. The reflection on the water are created by bind the custom framebuffer and render the scene, but before we have to set the camer under the water. This method allow us to save actual scene to the texture instead straight to the screen something like post processing but we pass that to the water surface not to the screen space. The refraction are creating in the same way but the clip distance is different for each step but camera must be above the water level. For reflections we are rendering scene above the water and for the refraction all what is bellow the water. In the end all of textures are mixing in fragment shader and creating realistic calm water. This method force rendering the scene three times and once the water.

This application is based on my own Engine 3D.

Control/Input:

  mouse - rotation the camera
  WASD - movement
  P - polygon mode on
  O - object mode on so off polygon mode
  Y - increase level of tessellation
  T - decrease level of tessellation
  C - shadows on
  Z - shadows off
  N - water on
  M - water off
  ESC - exit
  1-0 - Ten methods for terrain generation
  = - increase height level
  - - decrease height level

Package includes exe file compiled in Windows 10 MinGW G++ and dll files.

Requirements:

  • Efficient graphics card that support OpenGL 4.1
  • Graphics card drivers

Tested on RX 480 and GTX 650 ti.

Screenshots:

Terrain ss 1 Terrain ss 3 Terrain ss 4 Terrain ss 5 Terrain ss 6 Terrain ss 7 Terrain ss 8 Water first ss Water last ss

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].