Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.61 KB

README.md

File metadata and controls

28 lines (22 loc) · 1.61 KB

Marching-Cubes

This project is inspired from Sebastian Lague's marching squares and marching cubes videos, as well as Coding Train's Coding in the Cabana video on this topic. Feel free to add any contribution. An improved version using compute shaders is available here.

Screenshot

Dependencies

This C++ code uses GLFW3 and GLEW libraries for the 3D rendering. The noise functions come from FastNoise library by Auburn. This project was originally developed on CodeBlocks IDE using GNU GCC compiler.

Controls

  • Drag the mouse to rotate around the generated shape;
  • space to generate a new random shape;
  • A to show/hide axes (red for x, yellow for y, blue for z);
  • B to show/hide wireframe box.

Improvements ideas

  • Complete the CellGrid::fillGrid() method to allow more advanced patterns (e.g. floored terrain, terracing);
  • Use compute shaders to generate the noise and the cubes/vertices;
  • Add UI to configure the noise function

Project ideas

  • Continuous terrain generator;
  • Simulate flocking behaviour with boids around the generated terrain.

Used resources