sm.voxelTerrainCell.setDensityConvexHull

Sets density in convex hull shape to the cell's voxel grid.

Kind: Function

Environments: Terrain

Terrain

sm.voxelTerrainCell.setDensityConvexHull(
    vertices,
    margin,
    density,
    voxelFilter,
    noiseFrequency,
    noiseIntensity
)

Open the full Terrain reference

Parameters:

Name Type Description
vertices table Table of vertices {Vec3, ...} that make up the convex hull.
margin number Hull margin added outside the hull.
density number New normalized density.
voxelFilter (optional) integer The voxel material filter to overwrite. (Defaults to sm.voxelTerrainCell.voxelFilter.all)
noiseFrequency (optional) number Noise frequency of applied simplex noise. (Defaults to 1)
noiseIntensity (optional) number Noise intensity of applied simplex noise. (Defaults to 0)