Hello! I whipped up this cool voxel demo that I think is pretty cool. It can handle different voxel sizes, debris, and uses good techniques to make it really fast.
Personally I think it’s really performant, and works really well. I made this video demonstration really fast, so there isn’t much detail and I slapped in some free model signs.
All the code here was written by me.
It takes in multiple parameters, listed below:
- Hitbox (The part where the hole should be)
- MinVoxelSize
- MaxVoxelSize
- Debris?
- DebrisAmount
- Parts to ignore in voxelization.
The code uses octree’s to divide up the cube first, surrounding only the needed voxels, then greedy meshing comes through and combines all extra parts together.
Imagine each voxel was 0.2 studs big, and i took a 20 studs big cube. I could fit 1,000,000 cubes inside that .
But, if I use greedy meshing and octrees to divide it up, I can sometimes get away with <20 parts per hole made! Of course, with big explosions its around ~120
Should I release this?