- Home /
Voxel Marching Hibrid
I need help with optimizing a voxel based game i am makeing, the part that needs refinded is a function that goes thought every block in a chunk and checks a 5/5/5 area around it, it does this for every shape and rotation i make. this makes a marching cubes like terrain, but is still cube based, and will break like blocks, think of the game space enggers in it's blockbuilding, mixed with voxel based minecraft.
So what i need it to figure out a way to compare 1 5/5/5 arangment of blocks extreamly quick.
takes more then 20 seconds for this chunk, and i need it much lower for my game, so post any ideas please.
You could look at the profiler to see if there are any standout bottlenecks.
Only process small pieces of the terrain that have changed, rather than recomputing the whole thing when something changes.
This might also work well as a compute shader.
It's not really clear what you want from us. I also don't quite get why you want to compare every block / voxel to the 5x5x5 neighboring voxels. $$anonymous$$arching cubes create one mesh piece for each 2x2x2 cell. How exactly do you store your raw voxel data? Do you generate a mesh collider from the mesh? If you don't show the code we can't say what you may should optimise.
Your answer
Follow this Question
Related Questions
Smooth Voxel Planets? 1 Answer
Editing voxels @ chunk borders 1 Answer
Voxel-Grid rounded Marching Cube values for a sphere 1 Answer