How to do voxel grouping?

I am making minecraft terrain, but every voxel is a block. I want to use greedy meshing to fill in these blocks, but I don’t know where to start.

Before you post a link to @Elttob’s tutorial or @Dev_HDWC’s tutorial, I don’t want them. They didn’t help me - I understand the concept but I cant manage to code it.

Dev’s tutorial doesn’t even explain how the endX, endY, startX, startY variables work, so that got me stuck too.

I want help with creating a greedy mesher - one that I actually understand. And, no, im not asking for you to code it for me. I’m just asking you to give examples of how to make and and possibly make one myself.

PS: if even you don’t know what that is, this might explain it for you.

Cheers.

4 Likes

What specifically are you stuck on?

1 Like

Making the algorithm scan through the map data and find blocks the blocks around it for the greedy mesher. It’s hard to explain.

I used this to help me make my greedy mesh

and here is the code in JavaScript

and here is a video of the greedy mesh working that I made in C / OpenGL

and this is also a grate thing to read because greedy mesh is kind of slow to compute
this this is another alternative of generating the mesh

3 Likes

I would be better if it was in lua instead of javascript as I haven’t learnt much about it.
Also, I literally saw one of your videos when i watched the terrain video. Wow.

I do find this articles interesting, and I have read a bit of it (im too tired to read the whole thing rn) so ill post when I get any results tmr.

Lua and JavaScript are very close to one another but the code on its own is kind complex so can be hard to understand

this version is in C# and has some comments so maybe that might be helpful to you

1 Like

i recently made a new video covering this topic you can find it here

1 Like