# World.voxelDensityAddition

Modify destructable terrain

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
world:voxelDensityAddition(
    position,
    surfaceNormal,
    maxDistance,
    targetDensity,
    material,
    filter?,
    player?
)
```

[Open the full Game reference](../Game-Script-Environment/Userdata/World.md#voxeldensityaddition)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `world` | [World](../Game-Script-Environment/Userdata/World.md) | The world. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The voxel world position. |
| `surfaceNormal` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The surface normal. |
| `maxDistance` | number | The maximum distance from position that can be modified. |
| `targetDensity` | integer | The target density to add. |
| `material` | integer | The material to add [0-7]. |
| `filter` *(optional)* | integer | The materials the shape can modify. (See [sm.world.voxelFilter](../Game-Script-Environment/Static-Functions/sm.world.md#voxelfilter)). (Defaults to sm.world.voxelFilter.all) |
| `player` *(optional)* | [Player](../Game-Script-Environment/Userdata/Player.md) | The player who constructed. (Optional) |
