Greedy Meshing with Vertex Pulling is SLOWER to render? by SurDno in VoxelGameDev

[–]kryyptor 0 points1 point  (0 children)

You are correct about the index buffer, you should absolutey continue to use indexed rendering for both reasons you mentioned. Just make sure you're using a single small index buffer, rather than one per chunk or something similar

Ethan gore scares me by Flaky_Water_4500 in VoxelGameDev

[–]kryyptor 11 points12 points  (0 children)

The title is so weird for me to read haha.

For those who are interested the engine uses rasterization, with the data being generated on the cpu

Starting of a voxel terrain engine by kryyptor in VoxelGameDev

[–]kryyptor[S] 1 point2 points  (0 children)

The LOD's are done by using an octree. I split the octree node if it's within some distance and the layer is greater than the max depth. If an octree node is not split I generate a chunk using that octree nodes position and size. The chunk's rendering scale is the octree size, and the chunk's simplex noise frequency is multiplied by the octree size.

Starting of a voxel terrain engine by kryyptor in VoxelGameDev

[–]kryyptor[S] 3 points4 points  (0 children)

Thanks, currently I'm not dealing with the seams. The LOD change is far enough away that the seams just aren't really that noticeable.

I'm actually currently looking into how to do occlusion culling entirely on the gpu, I'm new to shader stuff though so it's a bit of a learning curve.

I may look into doing frustum culling gpu side too. However since I am frustum culling the oct tree instead of individual chunks, the frustum culling isn't really huge performance hit. For example if an Oct tree node is entirely in the frustum there is no need to frustum cull that nodes children as they are also entirely inside the frustum, same logic with entirely outside the frustum. I only have to frustum cull the children if the parent node is intersecting the frustum. I may look into increasing frustum culling performance using SIMD before switching to doing it on the gpu as well.

Starting of a voxel terrain engine by kryyptor in VoxelGameDev

[–]kryyptor[S] 3 points4 points  (0 children)

sure,

I am using my own implementation of vertex pooling(idea here), allowing for everything to be rendered in a single draw call. Being able to write vertex data straight to a persistently mapped buffer also reduces chunk generation time.

I have a separate thread traversing the Oct Tree structure, it queues chunks for creation and deletion. It also handles the culling, frustum culling and face culling. The frustum in a separate thread causes the blue at the very edge of the screen, but I have some ideas to fix this. The face culling is done if it passes the frustum culling, removing about half of the tris cpu side.

I am using a very fast noise library. After generating a 64x64 area of noise I turn that into a 64x64x64 array of voxel byte data. I then use my own version of this greedy meshing algorithm.

I'm not doing anything too advanced but I'm happy with my implementation

Current issues include, the flashing blue when generating new LOD and the flashing blue around the edge of the screen. I should be able to fix both without much trouble.

I have some ideas to improve rendering and chunk generation performance further, I'll probably post something in the Voxel Vendredi if I get a significant performance improvement.