unity-volume-sampler
Mesh volume sampler with voxelizer & 3D poisson disk sampling for Unity.
Usage
// Volume instance has sample points & grid information (grid size & unit length).
Volume volume = VolumeSampler.Sample(
mesh, // mesh to sample volume
resolution, // grid resolution
distance // minimum distance between samples
);
VolumeSamplerWindow
Menu : Window -> VolumeSampler
VolumeSamplerWindow builds a Volume asset from a mesh file & save it in a project.
Compatibility
Tested on Unity 2018.3.0f2, windows10.
Sources
- mattatz/unity-voxel - https://github.com/mattatz/unity-voxel
- njanakiev/poisson-disk-sampling - https://github.com/njanakiev/poisson-disk-sampling
- keijiro/Pcx - https://github.com/keijiro/Pcx/blob/master/Assets/Pcx/Runtime/Shaders/Disk.cginc