Skip to content

therealnv6/voxel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voxel

a simple voxel game "engine" written in Rust, using Bevy

screenshot

NOTE!

  • This is not highly in development anymore, as I've gotten too bored of this project. I'll still be working on it every now and then.
  • This is all based off of my ideas; nothing I'm using is based on already existing algorithms of any sort (except for noise generation, but that's something completely unrelated). Most of it is definitely sub-optimal.

Roadmap

  • 3D chunk registry
  • 3D noise generation
  • CPU "frustum" culling
  • LOD 1
  • Off-load onto GPU using compute shaders.
  • Massively refactor code; the current code sucks.
  • Good performance.
    • Currently, performance scales pretty bad. 8x4x82 discovery radius rather easily achieves framerates of ~15003, whereas 8x8x8 gets around ~7003, and 12x12x12 gets ~1303. 6x6x64 discovery radius manages to achieve ~800. A big part here is still not having LOD implemented, and not culling the occluded faces that are only occluded by the adjacent chunk(s).
  • Face culling
    • Per-chunk occlusion culling (cpu-based)
    • Neighboring chunk occlusion culling (cpu-based)
      • This is going to need some tinkering. The meshing happens on another thread which does not have access to the registry, so we'd have to get the adjacent chunks their voxels, and pass them into the thread. It's easily doable but I'm too lazy right now.
  • Biome Generation
    • Low priorty. Currently, we're just generating random "canyons" with 3D simplex noise, barely processed.

Footnotes

  1. Face culling is completely broken in LOD, which means it's basically unusable. Haven't really taken the time to look into this.

  2. 8x4x8 in a 18x18x18 chunk hierarchy; meaning 8 chunks * 4 chunks * 8 chunks * 18 voxels * 18 voxels * 18 voxels = 3,686,400 voxels. 5

  3. This is based on my personal computer; i7 10700k, RTX 3070, 16 GB @3600 MHz 2 3

  4. 6x6x6 in a 32x32x32 chunk hierarchy: meaning 6 chunks * 6 chunks * 6 chunks * 32 voxels * 32 voxels * 32 voxels = 7077888 voxels. 5

  5. This is worst case scenario, which can never really happen due to face culling. 2

About

voxel stuff in bevy!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published