- Clone Unity Official ECS Samples.
- Clone this repository to
Samples/Assets
folder.
The following are adjustable parameters in VoxelizationSystem
.
voxelSize
Voxelization resolution. Small value leads to higher memory use.minDuration
A lower bound of duration. Used for small-scale voxelization to delay the spawning process.maxMovingNumber
Maximum allowed number of simultaneously moving voxels. Smaller value leads to longer duration and better frame rate.modelName
The name of model to be loaded inResources/
folder.bottomColor
&topColor
The color of bottom and top of voxelized model. The rest will be interpolated.volumetric
Whether to perform volumetric voxelization (expansive).randomOrder
Whether to randomize spawn order.
Model Size (Bounding box): 11.7 * 20.7 * 3.8
- Resolution: 0.1
- Resulting voxels count: 38k
- Time: < 1sec (with Core i7-8850H)
- Resolution: 0.1
- Resulting voxels count: 140k
- Time: ~ 1sec (with Core i7-8850H)