Skip to content

Terrain

Supported Class Physics NotCreatable

Terrain lets you to create dynamically morphable environments.

Note: Voxel terrain is present; newer terrain material variants are limited.

28 Nova members · 37 modern Roblox members not implemented yet

Description

The Terrain class lets you create dynamically morphable environments. It is based on a 4×4×4 grid of cells, where each cell has a number between 0 and 1 representing how much the geometry should occupy the cell, and the material of the cell. The occupancy determines how the cell will morph together with surrounding cells, and the result is the illusion of having no grid constraint.

For more information, see Terrain.

Inheritance

Object → Instance → PVInstance → BasePart → Terrain

Nova inheritance: Instance → PVInstance → BasePart → Terrain

Properties

IsSmooth Supported Property Deprecated Returns true if the game is using the smooth terrain system.
IsSmooth: bool

Returns true if the game is using the smooth terrain system.

Roblox documentation

MaxExtents Supported Property Displays the boundaries of the largest possible editable region.
MaxExtents: Region3int16

Displays the boundaries of the largest possible editable region.

Displays the boundaries of the largest possible editable region as a Region3int16. The returned value spans from (-32000, -32000, -32000) to (32000, 32000, 32000) in cell coordinates, where each cell is 4 studs wide. This corresponds to a world-space volume of -128,000 to 128,000 studs on each axis. The property is read-only.

Roblox documentation

WaterColor Supported Property The tint of Terrain water.
WaterColor: Color3

The tint of Terrain water.

The tint color applied to Terrain water. This Color3 value is blended with the water's base appearance to shift its overall hue. The default value is [0.05, 0.33, 0.36] (a dark teal).

Roblox documentation

WaterTransparency Supported Property The transparency of Terrain water.
WaterTransparency: float

The transparency of Terrain water.

The transparency of Terrain water, on a scale of 0 (fully opaque) to 1 (fully transparent). The default value is 0.3.

Roblox documentation

WaterWaveSize Supported Property Sets the maximum height of Terrain water waves in studs.
WaterWaveSize: float

Sets the maximum height of Terrain water waves in studs. This is currently constrained to between 0 and 1.

Roblox documentation

WaterWaveSpeed Supported Property Sets how many times Terrain water waves will move up and down per minute.
WaterWaveSpeed: float

Sets how many times Terrain water waves will move up and down per minute. This is currently constrained to between 0 and 100.

Roblox documentation

Methods

AutowedgeCell Supported Function Deprecated Nova: conditional Legacy terrain auto-wedging. Works on non-smooth terrain; no-op on smooth terrain.
Terrain:AutowedgeCell(int x, int y, int z): bool

Legacy terrain auto-wedging. Works on non-smooth terrain; no-op on smooth terrain.

This is part of the legacy voxel terrain API. Nova returns early on smooth terrain, but the method is still implemented for legacy/non-smooth terrain cells.

Roblox reference signature
Terrain:AutowedgeCell(x: int, y: int, z: int): bool
Nova behaviour: Conditional on the terrain grid. Modern Roblox's 'obsolete' wording is not universally true in Nova.

Roblox documentation

AutowedgeCells Supported Function Deprecated Nova: conditional Legacy terrain auto-wedging for a region. Works on non-smooth terrain; no-op on smooth terrain.
Terrain:AutowedgeCells(Region3int16 region)

Legacy terrain auto-wedging for a region. Works on non-smooth terrain; no-op on smooth terrain.

The region variant of the legacy auto-wedge API. Nova still implements it for legacy/non-smooth terrain and returns without work on smooth terrain.

Roblox reference signature
Terrain:AutowedgeCells(region: Region3int16): null
Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

CellCenterToWorld Supported Function Returns the world position of the center of the terrain cell.
Terrain:CellCenterToWorld(int x, int y, int z): Vector3

Returns the world position of the center of the terrain cell.

Returns the world position of the center of the terrain cell at grid coordinates (x, y, z). Each terrain cell is 4×4×4 studs, so this method returns the position of the lower-left-forward corner of the cell plus an offset of (2, 2, 2) studs.

Roblox reference signature
Terrain:CellCenterToWorld(x: int, y: int, z: int): Vector3

Roblox documentation

CellCornerToWorld Supported Function Returns the position of the lower-left-forward corner of the grid cell.
Terrain:CellCornerToWorld(int x, int y, int z): Vector3

Returns the position of the lower-left-forward corner of the grid cell.

Returns the world position of the lower-left-forward corner of the terrain cell at grid coordinates (x, y, z). Each terrain cell is 4×4×4 studs, so the corner position is (x * 4, y * 4, z * 4).

Roblox reference signature
Terrain:CellCornerToWorld(x: int, y: int, z: int): Vector3

Roblox documentation

Clear Supported Function Clears all terrain.
Terrain:Clear()

Clears all terrain.

Clears the entire terrain, removing all material and occupancy data from every voxel. After calling this method, the Terrain object contains no geometry until new terrain is written via methods such as FillBlock() or WriteVoxels().

Roblox reference signature
Terrain:Clear(): null

Roblox documentation

ConvertToSmooth Supported Function Deprecated Nova: still functional Converts legacy terrain to smooth terrain. Still implemented for terrain regions.
Terrain:ConvertToSmooth()

Converts legacy terrain to smooth terrain. Still implemented for terrain regions.

Modern Roblox says all places use smooth terrain now. Nova still ships the legacy terrain path and implements this conversion for terrain regions.

Roblox reference signature
Terrain:ConvertToSmooth(): null
Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.
Security: PluginSecurity

Roblox documentation

CopyRegion Supported Function Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later.
Terrain:CopyRegion(Region3int16 region): Instance

Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later. Note that TerrainRegion data does not replicate between server and client.

Roblox reference signature
Terrain:CopyRegion(region: Region3int16): TerrainRegion

Roblox documentation

CountCells Supported Function Returns the number of non-empty cells in the terrain.
Terrain:CountCells(): int

Returns the number of non-empty cells in the terrain.

Returns the approximate number of non-empty cells in the terrain. A cell is considered non-empty when it has a material other than Air and an occupancy greater than zero. This count is an approximation and can be used to quickly gauge how much terrain geometry exists in the place.

Roblox documentation

FillBall Supported Function Fills a ball of smooth terrain in a given space.
Terrain:FillBall(Vector3 center, float radius, Material material)

Fills a ball of smooth terrain in a given space.

Fills a spherical volume of smooth terrain centered at center with the given radius (in studs) and Material. Voxels within the sphere are set to full occupancy with the specified material. Existing terrain inside the sphere is overwritten.

Roblox reference signature
Terrain:FillBall(center: Vector3, radius: float, material: Material): null

Roblox documentation

FillBlock Supported Function Fills a block of smooth terrain with a given location, rotation, size, and material.
Terrain:FillBlock(CoordinateFrame cframe, Vector3 size, Material material)

Fills a block of smooth terrain with a given location, rotation, size, and material.

Fills an oriented rectangular volume of smooth terrain at the position and rotation specified by cframe, with the dimensions given by size (in studs), using the specified Material. Because the block is oriented by a CFrame, it can be rotated to any angle. Existing terrain inside the volume is overwritten.

Roblox reference signature
Terrain:FillBlock(cframe: CFrame, size: Vector3, material: Material): null

Roblox documentation

FillRegion Supported Function Fills a Region3 space with smooth terrain.
Terrain:FillRegion(Region3 region, float resolution, Material material)

Fills a Region3 space with smooth terrain.

Fills an axis-aligned Region3 volume of smooth terrain with the specified Material at full occupancy. The resolution parameter must be exactly 4. The region must be aligned to the voxel grid; use Region3.ExpandToGrid() to align a region before calling.

Roblox reference signature
Terrain:FillRegion(region: Region3, resolution: float, material: Material): null

Roblox documentation

GetCell Supported Function Deprecated Returns the closest cell material from the legacy terrain engine that matches the smooth terrain voxel specified.
Terrain:GetCell(int x, int y, int z): Tuple

Returns the closest cell material from the legacy terrain engine that matches the smooth terrain voxel specified.

Roblox reference signature
Terrain:GetCell(x: int, y: int, z: int): Tuple

Roblox documentation

GetWaterCell Supported Function Deprecated Returns true if the cell is a water cell.
Terrain:GetWaterCell(int x, int y, int z): Tuple

Returns true if the cell is a water cell.

Roblox reference signature
Terrain:GetWaterCell(x: int, y: int, z: int): Tuple

Roblox documentation

PasteRegion Supported Function Applies a chunk of terrain to the Terrain object.
Terrain:PasteRegion(Instance region, Vector3int16 corner, bool pasteEmptyCells)

Applies a chunk of terrain to the Terrain object. Note that TerrainRegion data does not replicate between server and client.

Roblox reference signature
Terrain:PasteRegion(region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: bool): null

Roblox documentation

ReadVoxels Supported Function Returns a certain region of smooth terrain in table format.
Terrain:ReadVoxels(Region3 region, float resolution): Tuple

Returns a certain region of smooth terrain in table format.

Returns the voxel data for a region of smooth terrain as two 3D arrays: materials (an array of Material values) and occupancies (an array of numbers between 0 and 1). The region must be aligned to the voxel grid, resolution must be 4, and the region cannot exceed 4,194,304 voxels. For more granular channel control, see ReadVoxelChannels().

Roblox reference signature
Terrain:ReadVoxels(region: Region3, resolution: float): Tuple

Roblox documentation

SetCell Supported Function Deprecated Sets the occupancy and material of a specific terrain voxel.
Terrain:SetCell(int x, int y, int z, CellMaterial material, CellBlock block, CellOrientation orientation)

Sets the occupancy and material of a specific terrain voxel.

Sets the occupancy of the specified terrain voxel to 1 and sets its material to the closest smooth terrain material that matches the cell material.

Roblox reference signature
Terrain:SetCell(x: int, y: int, z: int, material: CellMaterial, block: CellBlock, orientation: CellOrientation): null

Roblox documentation

SetCells Supported Function Deprecated Sets the occupancy and material of all terrain voxels in a specific region.
Terrain:SetCells(Region3int16 region, CellMaterial material, CellBlock block, CellOrientation orientation)

Sets the occupancy and material of all terrain voxels in a specific region.

Sets the occupancy of all terrain voxels in the specified region to 1 and sets their materials to the closest smooth terrain material that matches the cell material.

Roblox reference signature
Terrain:SetCells(region: Region3int16, material: CellMaterial, block: CellBlock, orientation: CellOrientation): null

Roblox documentation

SetWaterCell Supported Function Deprecated Sets the specified terrain voxel's material to water and sets its occupancy to 1.
Terrain:SetWaterCell(int x, int y, int z, WaterForce force, WaterDirection direction)

Sets the specified terrain voxel's material to water and sets its occupancy to 1.

Roblox reference signature
Terrain:SetWaterCell(x: int, y: int, z: int, force: WaterForce, direction: WaterDirection): null

Roblox documentation

WorldToCell Supported Function Returns the grid cell location that contains the position point.
Terrain:WorldToCell(Vector3 position): Vector3

Returns the grid cell location that contains the position point.

Returns the grid cell location that contains the point position.

Roblox reference signature
Terrain:WorldToCell(position: Vector3): Vector3

Roblox documentation

WorldToCellPreferEmpty Supported Function Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge.
Terrain:WorldToCellPreferEmpty(Vector3 position): Vector3

Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge.

Returns the grid cell location that contains the point position, preferring empty grid cells when position is on a grid edge.

Roblox reference signature
Terrain:WorldToCellPreferEmpty(position: Vector3): Vector3

Roblox documentation

WorldToCellPreferSolid Supported Function Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.
Terrain:WorldToCellPreferSolid(Vector3 position): Vector3

Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.

Roblox reference signature
Terrain:WorldToCellPreferSolid(position: Vector3): Vector3

Roblox documentation

WriteVoxels Supported Function Sets a certain region of smooth terrain using table format.
Terrain:WriteVoxels(Region3 region, float resolution, Array materials, Array occupancy)

Sets a certain region of smooth terrain using table format.

Sets a region of smooth terrain from two 3D arrays: materials (an array of Material values) and occupancy (an array of numbers between 0 and 1). Both arrays must have dimensions that exactly match the target region in voxels. The region must be aligned to the voxel grid, resolution must be 4, and the region cannot exceed 4,194,304 voxels. For more granular channel control, see WriteVoxelChannels().

Roblox reference signature
Terrain:WriteVoxels(region: Region3, resolution: float, materials: Array, occupancy: Array): null

Roblox documentation

Inherited members

Inherited from BasePart: 65 properties, 54 methods, 13 events. They are documented on the base class page.

37 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's Terrain class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Properties

Member Signature Status Notes Flags
WaterReflectance WaterReflectance: float Not yet Controls how opaque Terrain water reflections are. —

Methods

Member Signature Status Notes Flags
CanSmoothVoxelsBeUpgraded Terrain:CanSmoothVoxelsBeUpgraded(): bool Not yet — RobloxScriptSecurity
ClearVoxelsAsync_beta Terrain:ClearVoxelsAsync_beta(region: Region3, channelIds: Array): null Not yet — CustomLuaState
CreateVoxelBuffer_beta Terrain:CreateVoxelBuffer_beta(): VoxelBuffer Not yet — RobloxScriptSecurity
DrawBufferAsync Terrain:DrawBufferAsync(cframe: CFrame, scale: float, resolution: int, source: VoxelBuffer, mergeConfig: Dictionary): null Not yet — Yields, RobloxScriptSecurity
FillBallSlot Terrain:FillBallSlot(center: Vector3, radius: float, solidMaterialIndex: int): null Not yet — RobloxScriptSecurity
FillBlockSlot Terrain:FillBlockSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: int): null Not yet — RobloxScriptSecurity
FillCylinder Terrain:FillCylinder(cframe: CFrame, height: float, radius: float, material: Material): null Not yet Fills a cylinder of smooth terrain in a given space. —
FillCylinderSlot Terrain:FillCylinderSlot(cframe: CFrame, height: float, radius: float, solidMaterialIndex: int): null Not yet — RobloxScriptSecurity
FillRegionSlot Terrain:FillRegionSlot(region: Region3, resolution: float, solidMaterialIndex: int): null Not yet — RobloxScriptSecurity
FillWedge Terrain:FillWedge(cframe: CFrame, size: Vector3, material: Material): null Not yet Fills a wedge-shaped volume of terrain with the given Material. —
FillWedgeSlot Terrain:FillWedgeSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: int): null Not yet — RobloxScriptSecurity
GenerateWaterFlowMap Terrain:GenerateWaterFlowMap(generateFoam: bool): null Not yet — RobloxScriptSecurity
GetMaterialColor Terrain:GetMaterialColor(material: Material): Color3 Not yet Returns current terrain material color for specified terrain material. —
GetMaterialSlot Terrain:GetMaterialSlot(slotIndex: int): Tuple Not yet — —
GetTerrainWireframe Terrain:GetTerrainWireframe(cframe: CFrame, size: Vector3): Array Not yet — RobloxScriptSecurity
IterateVoxelsAsync_beta Terrain:IterateVoxelsAsync_beta(region: Region3, resolution: int, channelIds: Array): TerrainIterateOperation Not yet — CustomLuaState
ModifyVoxelsAsync_beta Terrain:ModifyVoxelsAsync_beta(region: Region3, resolution: int, channelIds: Array): TerrainModifyOperation Not yet — CustomLuaState
ReadBufferAsync Terrain:ReadBufferAsync(region: Region3, resolution: int): VoxelBuffer Not yet — Yields, RobloxScriptSecurity
ReadVoxelChannels Terrain:ReadVoxelChannels(region: Region3, resolution: float, channelIds: Array): Dictionary Not yet Returns a region of terrain voxel data in table format based on the channel names. CustomLuaState
ReadVoxelsAsync_beta Terrain:ReadVoxelsAsync_beta(region: Region3, resolution: int, channelIds: Array): TerrainReadOperation Not yet — CustomLuaState
ReplaceMaterial Terrain:ReplaceMaterial(region: Region3, resolution: float, sourceMaterial: Material, targetMaterial: Material): null Not yet Replaces the terrain of a material within a region with another material. —
ReplaceMaterialInTransform Terrain:ReplaceMaterialInTransform(cframe: CFrame, size: Vector3, sourceMaterial: Material, targetMaterial: Material): null Not yet — RobloxScriptSecurity
ReplaceMaterialInTransformSubregion Terrain:ReplaceMaterialInTransformSubregion(cframe: CFrame, size: Vector3, sourceMaterial: Material, targetMaterial: Material, targetRegion: Region3int16): null Not yet — RobloxScriptSecurity
ReplaceMaterialInTransformSubregionSlot Terrain:ReplaceMaterialInTransformSubregionSlot(cframe: CFrame, size: Vector3, sourceMaterialIndex: int, targetMaterialIndex: int, targetRegion: Region3int16): null Not yet — RobloxScriptSecurity
ResetMaterialSlot Terrain:ResetMaterialSlot(slotIndex: int): null Not yet — —
ResetWaterFlowMap Terrain:ResetWaterFlowMap(): null Not yet — RobloxScriptSecurity
SetMaterialColor Terrain:SetMaterialColor(material: Material, value: Color3): null Not yet Sets current terrain material color for specified terrain material. —
SetMaterialInTransform Terrain:SetMaterialInTransform(cframe: CFrame, size: Vector3, targetMaterial: Material): null Not yet — RobloxScriptSecurity
SetMaterialInTransformSubregion Terrain:SetMaterialInTransformSubregion(cframe: CFrame, size: Vector3, targetMaterial: Material, targetRegion: Region3int16): null Not yet — RobloxScriptSecurity
SetMaterialInTransformSubregionSlot Terrain:SetMaterialInTransformSubregionSlot(cframe: CFrame, size: Vector3, targetMaterialIndex: int, targetRegion: Region3int16): null Not yet — RobloxScriptSecurity
SetMaterialSlot Terrain:SetMaterialSlot(slotIndex: int, baseMaterial: Material, materialVariant: string, color: Color3): null Not yet — —
SmoothRegion Terrain:SmoothRegion(region: Region3, resolution: float, strength: float): Tuple Not yet — CustomLuaState, RobloxScriptSecurity
SmoothRegionMaterialSlots Terrain:SmoothRegionMaterialSlots(region: Region3, resolution: float, strength: float): Tuple Not yet — CustomLuaState, RobloxScriptSecurity
WriteVoxelChannels Terrain:WriteVoxelChannels(region: Region3, resolution: float, channels: Dictionary): null Not yet Sets a region of terrain using a dictionary of voxel channel data. CustomLuaState
WriteVoxelsAsync_beta Terrain:WriteVoxelsAsync_beta(region: Region3, resolution: int, channelIds: Array): TerrainWriteOperation Not yet — CustomLuaState

Events

Member Signature Status Notes Flags
GridBackendReloadRequired GridBackendReloadRequired(wouldUseNewGrid: bool) Not yet — RobloxScriptSecurity

Roblox reference: Terrain

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.