Where to get started on a voxel engine for unity?

I already know about voxels, the occulsion culling and how its all done, but not so sure about under the hood. Where would I go to learn how to make some sort of minecraft thing, or at least some sort of voxel generator in unity.

Any tips or links wood be very helpful.

Haven’t you already made multiple posts and started a thread about this? Look through the “After playing mine craft…” thread.

I did. And It didn’t help.

I have an idea in my head of how you could do it.

So you start with an empty three dimensional array of structs.

In this struct you would have:
bool exists; // does a block exist here?
bool [ ]polygonSides = new bool[6]; // a bool to store if each side of the block currently has a polygon drawn there. 1 = up, 2 = front, 3 = left, 4 = back, 5 = right, 6 = down

Create this three dimensional array of structs.

Then create 1 block in the middle, you set the ‘exists’ bool to true
then you programmatically create the 6 sides to this 1 block, setting each polygonSides bool to true, since you made the 6 sides to the block

Then you create another block across the map, and again programmatically create the 6 sides to this 1 block. Setting its exists bool to true and all the polygonSides bools to true

Now create another block right next to one of your already existing blocks. In your ‘createblock’ function you will need to have it run a test on each adjacent voxel cell, check to see if a block is already there. This would be just check if the adjacent slots ‘exists’ flag is true in your array of structs.

If your createblock function detects a block already existing, right next to your new block. What it will do is delete the face of the already existing block that will be in contact with your new block, setting the corresponding polygonSides bool to false. You will then of course set the ‘exists’ flag to true on your new block, create the 5 sides of your new block, only 5 instead of 6 because one side of this block will be in contact with your already existing block. And then set your corresponding 5 ‘polygonSide’ bools to true.

There ya go. This will let you make a vast grid of block, with only faces existing where they need to exist.