I Increased the Resolution of My Voxel Engine ( LOD )

Опубликовано: 28 Октябрь 2024
на канале: MaxMakesGames
5,177
273

A voxel world with a small resolution feels way too blocky and doesn't allow many details in the world and structures. That is why I decided to increase it. Even better than that, I implemented a system that lets me have different resolutions at different locations. That allows me to have details without needing the whole world to be detailed and also allows me to have a Level of Detail ( LOD ) system implemented to improve the performances.

I decided to use an octree to store my voxels from now on. It is a sparse data structure. That means that it has empty areas, saving a lot of memory. An octree is also very fast to traverse, meaning I can do queries, raycasts, destruction, etc much faster.

The main problem now is that I still use meshes to render, so I have to transform my octree into a new mesh everytime I want to update the LOD, destroy or modify it in any way. That takes a lot of time and makes my engine have lag spikes. That's why I'm going to code my own 3D renderer using raytracing next to allow me to render the world without any mesh. That is going to ruin some of the work I just did in this video ( like the LOD since that's for meshes ), but the octree is going to be really useful for raytracing and I can send the data of the octree to the raytracer directly so I won't even need to do any meshes or check for face visibility.

---------------------------------

Subscribe for game making tutorials, other game-making related content and to follow my projects with the devlogs !

0:00 Intro
0:20 Goal
2:00 Octree start
2:29 LOD
2:56 Textures
3:32 Update LOD
4:02 Landscape
5:10 Higher Resolution
5:30 Projectiles
6:12 Destruction
6:50 Lag
7:27 Raytracing