How do I optimize voxel?

How do I optimize voxel?

Each optimizations that is implemented for a voxel engine is designed to fulfil a specific purpose, such as:

  1. Increase render time and frame rate performance.
  2. Make the chunk rebuild/re-create algorithm faster.
  3. Decrease the storage space required to store voxel information.
  4. Reduce memory footprint of voxel data in RAM.

What is a voxel world?

Basically, if the world is using a 3D grid of values (usually editable as well), it’s called a voxel world. Some games use algorithms such as marching cubes when generated the geometry, so it doesn’t look like simple blocks like Minecraft.

How long does it take to initialize voxel world?

Update: a new article has been posted that describes the further optimisations made to reduce chunk mesh initialisation time down to 0.48ms. The map is divided into chunks of 32 x 32 x 32 blocks. Each chunk has its own mesh – a list of triangles – which must be regenerated each time a block is added, removed or damaged.

How are the blocks divided in voxel world?

The map is divided into chunks of 32 x 32 x 32 blocks. Each chunk has its own mesh – a list of triangles – which must be regenerated each time a block is added, removed or damaged. Block data is stored in the following structure:

What is the visibleface function in voxel world?

The VisibleFace functions are used to check whether or not a block is empty. Most comparisons are within the working chunk, so we prioritise accessing block data directly within the chunk if possible. DifferentBlock is used to determine whether a block is different to the current run.

How many faces can I pass per voxel?

This means I can pass up to six faces, then one color (vs a color for each vertex of the voxel). If you are using GL_QUADS and cubic voxels, this could save up to 20 bytes (160 bits) per voxel! (15 bytes with no alpha, although usually you want to keep things 4-byte aligned.)