Skip to content

lazergenixdev/First-Voxel-Engine

Repository files navigation

My First Voxel Engine

Building

  1. Run setup_windows.bat (or use command premake5 vs2022 if you have premake)
  2. Open generated Visual Studio Solution to build code

Technical Information

Features:

  • Infinite terrain generation (using basic perlin noise)
  • Dynamic chunk remeshing (multi-threaded)
  • Static skybox (just using a cubemap)
  • Greedy Meshing (unoptimized, but still reasonably fast)
  • Basic diffuse + specular lighting
  • Outline post processing pass using the depth buffer
  • Textured blocks with mipmapping

Wireframe view

View under the map to verify back face culling

Further improvements to be made:

  • Smaller vertex size (currently 24 bytes per vertex 😞)
  • Optimized meshing (using SIMD extensions + bigger chunk size)
  • Dynamic skybox with sun as directional light source
  • Shadow mapping
  • Screen-Space Ambient Occlusion
  • Distance Fog
  • Frustum Culling
  • Add/Removing blocks
  • debug outline flickering
  • debug mipmap edges

References

Initially copied the meshing code directly from Javascript and translated to C++; but the algorithm did not provide face normals, thus I had to ultimatly write my own greedy meshing that did give normal data. However, this article did give me a better understanding of the greedy meshing algorithm.

Got the method of how to get a basic outline from this article, but I wanted only a basic outline, so the depth buffer was enough.

About

First Voxel Engine (greedy meshing)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors