sm.voxelTerrainCell.setMaterialAndDensityConvexHull

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

Kind: Function

Environments: Terrain

Terrain

sm.voxelTerrainCell.setMaterialAndDensityConvexHull(
    vertices,
    margin,
    material,
    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.
material integer New material in convex 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)