VoxelWorld banner

VoxelWorld

4 devlogs
43h 44m 59s
Simon

Devlog 04:

After some more optimizations I am now able to render quite a large region. The problem that now arrises is the amount of buffers used. Every chunk at the moment uses 6 buffers and QRhi just cant handle this. The next approach to fix this is to switch from QRhi to Vulkan to gain more control and implement a solution that can work for far larger render distances.

Optimizations:

  • Greedy Meshing
  • Frustum Culling
  • Fully async chunk and mesh generation
  • Removing faces that are facing away from the player
0
Simon

Devlog 03:

Voxel Worlds are hard :(

What I did:

  • Moved chunk mesh generation in seperate worker threads and tried to make everything needed thread safe
  • Implemented movement and game logic through its own classes running in its own thread
  • Implemented instanced drawing for quads, drasticly reducing the amount of verticies and removing the need of indicies through TriangleStrip
  • Added chunk generation using perlin noise
Attachment
0
Simon

Devlog 02:

After too many hours, I now finally got a codebase, that can do efficient rendering of chunks using QRhi under Qml.

To achieve this the hardest parts were:

  • Reducing the trafic between cpu and gpu. Only seending meshes if they changed
  • Creating efficient meshes, using face culling for now (greedy meshing planned)
  • Effiently storing the chunk data
  • Getting the order of the triangles right to enable backface culling
  • QRhi stuff:
    • Understanding the basics of the rendering pipeline and how QRhiCommandBuffers work

The picture currently shows one 32x16x32 stone chunk rendered with different colored faces.

If you have any questions feel free to comment <:

Attachment
0
Simon

Devlog 01:

Tried a lot with QRhi and Qt Quick 3D but always had problems with optimization and different threads accessing different things and bing blocked by operations.

New try with QRhiWindow to stay in c++ for the whole 3D pipeline.

Allready learned a lot about 3D rendering and optimization.

Attachment
0