# sm.voxelTerrainCell.fillEmptyConvexHull

Sets empty voxel (below threshold) material and density in convex hull shape in the cell's voxel grid.

**Kind:** Function

**Environments:** Terrain

## Terrain

``` { .lua .api-signature }
sm.voxelTerrainCell.fillEmptyConvexHull(
    vertices,
    margin,
    densityThreshold,
    material,
    density,
    noiseFrequency?,
    noiseIntensity?
)
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.voxelTerrainCell.md#fillemptyconvexhull)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `vertices` | table | Table of vertices \{[Vec3](../Terrain-Script-Environment/Userdata/Vec3.md), ...\} that make up the convex hull. |
| `margin` | number | Hull margin added outside the hull. |
| `densityThreshold` | number | Existing normalized density must be below threshold for fill to happen. |
| `material` | integer | New material to set in convex hull. |
| `density` | number | New normalized density to set in convex hull. |
| `noiseFrequency` *(optional)* | number | Noise frequency of applied simplex noise. (Defaults to 1) |
| `noiseIntensity` *(optional)* | number | Noise intensity of applied simplex noise. (Defaults to 0) |
