Terrain
Terrain lets you to create dynamically morphable environments.
Memory category | Instances |
---|
Member index 56
Removed member index 35
Description
Terrain lets you create dynamically morphable environments with little to no lag. It is currently 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.
History 254
- 623 Change Tags of GrassLength from [NotScriptable, NotBrowsable] to [NotScriptable]
- 616 Change Tags of WriteVoxelChannels from [] to [CustomLuaState]
- 616 Change Tags of ReadVoxelChannels from [] to [CustomLuaState]
- 604 Add WriteVoxelChannels
- 604 Add ReadVoxelChannels
- 603 Remove WriteVoxelChannels
- 603 Remove ReadVoxelChannels
- 604 Add WriteVoxelChannels
- 604 Add ReadVoxelChannels
- 595 Add GrassLength
- 582 Add SetMaterialInTransformSubregion
- 582 Add ReplaceMaterialInTransformSubregion
- 573 Change ReturnType of WriteVoxels from void to null
- 573 Change ReturnType of SetWaterCell from void to null
- 573 Change ReturnType of SetMaterialInTransform from void to null
- 573 Change ReturnType of SetMaterialColor from void to null
- 573 Change ReturnType of SetCells from void to null
- 573 Change ReturnType of SetCell from void to null
- 573 Change ReturnType of ReplaceMaterialInTransform from void to null
- 573 Change ReturnType of ReplaceMaterial from void to null
- 573 Change ReturnType of PasteRegion from void to null
- 573 Change ReturnType of FillWedge from void to null
- 573 Change ReturnType of FillRegion from void to null
- 573 Change ReturnType of FillCylinder from void to null
- 573 Change ReturnType of FillBlock from void to null
- 573 Change ReturnType of FillBall from void to null
- 573 Change ReturnType of ConvertToSmooth from void to null
- 573 Change ReturnType of Clear from void to null
- 573 Change ReturnType of AutowedgeCells from void to null
- 569 Add SmoothRegion
- 567 Change ThreadSafety of GetMaterialColor from Unsafe to Safe
- 566 Add SetMaterialInTransform
- 566 Add ReplaceMaterialInTransform
- 565 Remove ShowTerrainRegion
- 565 Remove SetWireframeRegion
- 565 Remove SetTerrainRegion
- 565 Remove HideTerrainRegion
- 565 Add GetTerrainWireframe
- 560 Add CanSmoothVoxelsBeUpgraded
- 560 Add
- 554 Add CanShorelinesBeUpgraded
- 554 Add
- 553 Change Default of WaterWaveSpeed from to 10
- 553 Change Default of WaterWaveSize from to 0.150000006
- 553 Change Default of WaterTransparency from to 0.300000012
- 553 Change Default of WaterReflectance from to 1
- 553 Change Default of WaterColor from to Color3(0.05, 0.33, 0.36)
- 553 Add
- 553 Add
- 553 Change Default of MaxExtents from to
- 553 Change Default of from to None
- 553 Change Default of IsSmooth from to true
- 553 Change Default of Decoration from to false
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 549 Add ShowTerrainRegion
- 549 Add SetWireframeRegion
- 549 Add SetTerrainRegion
- 549 Add HideTerrainRegion
- 498 Change Parameters of PasteRegion from (region: Instance, corner: Vector3int16, pasteEmptyCells: bool) to (region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: bool)
- 498 Change ReturnType of CopyRegion from Instance to TerrainRegion
- 486 Change ThreadSafety of ReadVoxels from ReadOnly to Safe
- 486 Change ThreadSafety of WaterWaveSpeed from ReadOnly to ReadSafe
- 486 Change ThreadSafety of WaterWaveSize from ReadOnly to ReadSafe
- 486 Change ThreadSafety of WaterTransparency from ReadOnly to ReadSafe
- 486 Change ThreadSafety of WaterReflectance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of WaterColor from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MaxExtents from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MaterialColors from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of IsSmooth from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Decoration from ReadOnly to ReadSafe
- 484 Remove TerrainProgressUpdate
- 484 Remove SetImportHeightmapPaused
- 484 Remove ImportHeightmap
- 484 Remove CancelImportHeightmap
- 466 Add
- 462 Change ThreadSafety of TerrainProgressUpdate from to Unsafe
- 462 Change ThreadSafety of WriteVoxels from to Unsafe
- 462 Change ThreadSafety of WorldToCellPreferSolid from to Unsafe
- 462 Change ThreadSafety of WorldToCellPreferEmpty from to Unsafe
- 462 Change ThreadSafety of WorldToCell from to Unsafe
- 462 Change ThreadSafety of SetWaterCell from to Unsafe
- 462 Change ThreadSafety of SetMaterialColor from to Unsafe
- 462 Change ThreadSafety of SetImportHeightmapPaused from to Unsafe
- 462 Change ThreadSafety of SetCells from to Unsafe
- 462 Change ThreadSafety of SetCell from to Unsafe
- 462 Change ThreadSafety of ReplaceMaterial from to Unsafe
- 462 Change ThreadSafety of ReadVoxels from to ReadOnly
- 462 Change ThreadSafety of PasteRegion from to Unsafe
- 462 Change ThreadSafety of ImportHeightmap from to Unsafe
- 462 Remove ImportHeightMap
- 462 Change ThreadSafety of GetWaterCell from to Unsafe
- 462 Change ThreadSafety of GetMaterialColor from to Unsafe
- 462 Change ThreadSafety of GetCell from to Unsafe
- 462 Change ThreadSafety of FillWedge from to Unsafe
- 462 Change ThreadSafety of FillRegion from to Unsafe
- 462 Change ThreadSafety of FillCylinder from to Unsafe
- 462 Change ThreadSafety of FillBlock from to Unsafe
- 462 Change ThreadSafety of FillBall from to Unsafe
- 462 Change ThreadSafety of CountCells from to Unsafe
- 462 Change ThreadSafety of CopyRegion from to Unsafe
- 462 Change ThreadSafety of ConvertToSmooth from to Unsafe
- 462 Change ThreadSafety of Clear from to Unsafe
- 462 Change ThreadSafety of CellCornerToWorld from to Unsafe
- 462 Change ThreadSafety of CellCenterToWorld from to Unsafe
- 462 Change ThreadSafety of CancelImportHeightmap from to Unsafe
- 462 Change ThreadSafety of AutowedgeCells from to Unsafe
- 462 Change ThreadSafety of AutowedgeCell from to Unsafe
- 462 Change ThreadSafety of WaterWaveSpeed from to ReadOnly
- 462 Change ThreadSafety of WaterWaveSize from to ReadOnly
- 462 Change ThreadSafety of WaterTransparency from to ReadOnly
- 462 Change ThreadSafety of WaterReflectance from to ReadOnly
- 462 Change ThreadSafety of WaterColor from to ReadOnly
- 462 Change ThreadSafety of MaxExtents from to ReadOnly
- 462 Change ThreadSafety of MaterialColors from to ReadOnly
- 462 Change ThreadSafety of IsSmooth from to ReadOnly
- 462 Change ThreadSafety of Decoration from to ReadOnly
- 457 Add SetImportHeightmapPaused
- 457 Add ImportHeightmap
- 457 Add CancelImportHeightmap
- 417 Add FillWedge
- 410 Add Decoration
- 400 Add ReplaceMaterial
- 392 Add FillCylinder
- 391 Add TerrainProgressUpdate
- 391 Add ImportHeightMap
- 349 Change Tags of WriteVoxels from [] to [CustomLuaState]
- 349 Change Tags of ReadVoxels from [] to [CustomLuaState]
- 349 Add MaterialColors
- 317 Add SetMaterialColor
- 317 Add GetMaterialColor
- 297 Change Tags of ConvertToSmooth from [] to [Deprecated]
- 297 Change Tags of IsSmooth from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 262 Add WaterReflectance
- 251 Change Tags of SetWaterCell from [] to [Deprecated]
- 251 Change Tags of SetCells from [] to [Deprecated]
- 251 Change Tags of SetCell from [] to [Deprecated]
- 251 Change Tags of GetWaterCell from [] to [Deprecated]
- 251 Change Tags of GetCell from [] to [Deprecated]
- 251 Change Tags of AutowedgeCells from [] to [Deprecated]
- 251 Change Tags of AutowedgeCell from [] to [Deprecated]
- 250 Change Tags of SetWaterCell from [Deprecated] to []
- 250 Change Tags of SetCells from [Deprecated] to []
- 250 Change Tags of SetCell from [Deprecated] to []
- 250 Change Tags of GetWaterCell from [Deprecated] to []
- 250 Change Tags of GetCell from [Deprecated] to []
- 250 Change Tags of AutowedgeCells from [Deprecated] to []
- 250 Change Tags of AutowedgeCell from [Deprecated] to []
- 251 Change Tags of SetWaterCell from [] to [Deprecated]
- 251 Change Tags of SetCells from [] to [Deprecated]
- 251 Change Tags of SetCell from [] to [Deprecated]
- 251 Change Tags of GetWaterCell from [] to [Deprecated]
- 251 Change Tags of GetCell from [] to [Deprecated]
- 251 Change Tags of AutowedgeCells from [] to [Deprecated]
- 251 Change Tags of AutowedgeCell from [] to [Deprecated]
- 223 Add WaterWaveSpeed
- 223 Add WaterWaveSize
- 223 Add WaterTransparency
- 223 Add WaterColor
- 222 Remove WaterWaveSpeed
- 222 Remove WaterWaveSize
- 222 Remove WaterTransparency
- 222 Remove WaterColor
- 223 Add WaterWaveSpeed
- 223 Add WaterWaveSize
- 223 Add WaterTransparency
- 223 Add WaterColor
- 193 Add WriteVoxels
- 193 Add ReadVoxels
- 193 Add FillRegion
- 193 Add FillBlock
- 193 Add FillBall
- 193 Add ConvertToSmooth
- 193 Add IsSmooth
- 130 Add PasteRegion
- 130 Add CopyRegion
- 79 Change Tags of SetWaterCell from [preliminary] to []
- 79 Change Tags of GetWaterCell from [preliminary] to []
- 78 Change Tags of SetWaterCell from [] to [preliminary]
- 78 Change Tags of GetWaterCell from [] to [preliminary]
- 79 Change Tags of SetWaterCell from [preliminary] to []
- 79 Change Tags of GetWaterCell from [preliminary] to []
- 67 Remove resize
- 67 Remove makeJoints
- 67 Remove destroy
- 67 Remove clone
- 67 Remove breakJoints
- 67 Remove Resize
- 67 Remove MakeJoints
- 67 Remove Destroy
- 67 Remove Clone
- 67 Remove BreakJoints
- 67 Remove Velocity
- 67 Remove Transparency
- 67 Remove RotVelocity
- 67 Remove Reflectance
- 67 Remove Position
- 67 Remove Name
- 67 Remove Material
- 67 Remove Locked
- 67 Remove Friction
- 67 Remove Elasticity
- 67 Remove CanCollide
- 67 Remove CFrame
- 67 Remove BrickColor
- 67 Remove Archivable
- 67 Remove Anchored
- 61 Add SetWaterCell
- 61 Add GetWaterCell
- 55 Add resize
- 55 Add makeJoints
- 55 Add destroy
- 55 Add clone
- 55 Add breakJoints
- 55 Add Resize
- 55 Add MakeJoints
- 55 Add Destroy
- 55 Add Clone
- 55 Add BreakJoints
- 55 Add Velocity
- 55 Add Transparency
- 55 Add RotVelocity
- 55 Add Reflectance
- 55 Add Position
- 55 Add Name
- 55 Add Material
- 55 Add Locked
- 55 Add Friction
- 55 Add Elasticity
- 55 Add CanCollide
- 55 Add CFrame
- 55 Add BrickColor
- 55 Add Archivable
- 55 Add Anchored
- 55 Change Tags of Terrain from [preliminary, NotCreatable] to [NotCreatable]
- 53 Remove
- 49 Add AutowedgeCells
- 49 Add AutowedgeCell
- 47 Add WorldToCellPreferSolid
- 47 Add WorldToCellPreferEmpty
- 47 Add WorldToCell
- 47 Add SetCells
- 47 Add SetCell
- 47 Add GetCell
- 47 Add CountCells
- 47 Add Clear
- 47 Add CellCornerToWorld
- 47 Add CellCenterToWorld
- 47 Add MaxExtents
- 47 Add
- 47 Add Terrain
Members 56
AutowedgeCell
Parameters (3) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
Returns (1) | ||
bool |
(OBSOLETE) No longer does anything.
Thread safety | Unsafe |
---|
History 5
- 462 Change ThreadSafety of AutowedgeCell from to Unsafe
- 251 Change Tags of AutowedgeCell from [] to [Deprecated]
- 250 Change Tags of AutowedgeCell from [Deprecated] to []
- 251 Change Tags of AutowedgeCell from [] to [Deprecated]
- 49 Add AutowedgeCell
AutowedgeCells
Parameters (1) | ||
---|---|---|
region | Region3int16 | |
Returns (1) | ||
null |
(OBSOLETE) No longer does anything.
Thread safety | Unsafe |
---|
History 6
- 573 Change ReturnType of AutowedgeCells from void to null
- 462 Change ThreadSafety of AutowedgeCells from to Unsafe
- 251 Change Tags of AutowedgeCells from [] to [Deprecated]
- 250 Change Tags of AutowedgeCells from [Deprecated] to []
- 251 Change Tags of AutowedgeCells from [] to [Deprecated]
- 49 Add AutowedgeCells
CanShorelinesBeUpgraded
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
CanSmoothVoxelsBeUpgraded
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
CellCenterToWorld
Parameters (3) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
Returns (1) | ||
Vector3 |
Returns the world position of the center of the terrain cell (x, y, z).
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of CellCenterToWorld from to Unsafe
- 47 Add CellCenterToWorld
CellCornerToWorld
Parameters (3) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
Returns (1) | ||
Vector3 |
Returns the position of the lower-left-forward corner of the grid cell (x, y, z).
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of CellCornerToWorld from to Unsafe
- 47 Add CellCornerToWorld
Clear
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Clears the terrain.
Thread safety | Unsafe |
---|
ConvertToSmooth
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Transforms the legacy terrain engine into the new terrain engine.
All places now automatically use the new terrain engine, so this method is obsolete.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 573 Change ReturnType of ConvertToSmooth from void to null
- 462 Change ThreadSafety of ConvertToSmooth from to Unsafe
- 297 Change Tags of ConvertToSmooth from [] to [Deprecated]
- 193 Add ConvertToSmooth
CopyRegion
Parameters (1) | ||
---|---|---|
region | Region3int16 | |
Returns (1) | ||
TerrainRegion |
Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later. Note: TerrainRegion data does not replicate between server and client.
Thread safety | Unsafe |
---|
History 3
- 498 Change ReturnType of CopyRegion from Instance to TerrainRegion
- 462 Change ThreadSafety of CopyRegion from to Unsafe
- 130 Add CopyRegion
CountCells
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
int |
Returns the number of non-empty cells in the Terrain.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of CountCells from to Unsafe
- 47 Add CountCells
Decoration
Type | Default | |
---|---|---|
bool | false |
Currently enables or disables animated grass on the Grass terrain material, although future modifications of this property may control additional decorative features.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 4
- 553 Change Default of Decoration from to false
- 486 Change ThreadSafety of Decoration from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Decoration from to ReadOnly
- 410 Add Decoration
FillBall
Parameters (3) | ||
---|---|---|
center | Vector3 | |
radius | float | |
material | Material | |
Returns (1) | ||
null |
Fills a ball of smooth terrain in a given space.
Thread safety | Unsafe |
---|
FillBlock
Parameters (3) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
material | Material | |
Returns (1) | ||
null |
Fills a block of smooth terrain with a given location, rotation, size, and material.
Thread safety | Unsafe |
---|
FillCylinder
Parameters (4) | ||
---|---|---|
cframe | CFrame | |
height | float | |
radius | float | |
material | Material | |
Returns (1) | ||
null |
Fills a cylinder of smooth terrain in a given space. The space is defined using a CFrame, height, and radius.
Usage
1
|
|
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of FillCylinder from void to null
- 462 Change ThreadSafety of FillCylinder from to Unsafe
- 392 Add FillCylinder
FillRegion
Parameters (3) | ||
---|---|---|
region | Region3 | |
resolution | float | |
material | Material | |
Returns (1) | ||
null |
Fills a Region3 space with smooth terrain.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of FillRegion from void to null
- 462 Change ThreadSafety of FillRegion from to Unsafe
- 193 Add FillRegion
FillWedge
Parameters (3) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
material | Material | |
Returns (1) | ||
null |
FillWedge()
fills a wedge-shaped volume of Terrain with the
given Material and the area's CFrame and size. The
orientation of the wedge is the same as an equivalent WedgePart.
Thread safety | Unsafe |
---|
GetCell
Parameters (3) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
Returns (1) | ||
Tuple |
Returns the closest CellMaterial from the legacy terrain engine that matches the smooth terrain voxel specified. CellBlock will always be ''Solid'' and CellOrientation will always be ''NegZ''.
Thread safety | Unsafe |
---|
GetMaterialColor
Parameters (1) | ||
---|---|---|
material | Material | |
Returns (1) | ||
Color3 |
Returns the current terrain material color for the specified terrain material.
Thread safety | Safe |
---|
History 3
- 567 Change ThreadSafety of GetMaterialColor from Unsafe to Safe
- 462 Change ThreadSafety of GetMaterialColor from to Unsafe
- 317 Add GetMaterialColor
GetTerrainWireframe
Parameters (2) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
Returns (1) | ||
Array |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetWaterCell
Parameters (3) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
Returns (1) | ||
Tuple |
Returns if the cell is a water cell. The WaterForce parameter will always be None and the WaterDirection will always be NegX.
Thread safety | Unsafe |
---|
History 8
- 462 Change ThreadSafety of GetWaterCell from to Unsafe
- 251 Change Tags of GetWaterCell from [] to [Deprecated]
- 250 Change Tags of GetWaterCell from [Deprecated] to []
- 251 Change Tags of GetWaterCell from [] to [Deprecated]
- 79 Change Tags of GetWaterCell from [preliminary] to []
- 78 Change Tags of GetWaterCell from [] to [preliminary]
- 79 Change Tags of GetWaterCell from [preliminary] to []
- 61 Add GetWaterCell
GrassLength
Type | Default | |
---|---|---|
float | 0.699999988 |
Specifies the length of animated grass on the Grass terrain material, assuming Decoration is enabled. Valid values are between 0.1 and 1.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 2
- 623 Change Tags of GrassLength from [NotScriptable, NotBrowsable] to [NotScriptable]
- 595 Add GrassLength
IsSmooth
Type | Default | |
---|---|---|
bool | true |
Returns true if the current game is using the smooth terrain system. The legacy terrain engine has been removed, so this property will always be true.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
MaterialColors
Type | Default | |
---|---|---|
BinaryString |
MaterialColors represents the editor for the Material Color feature, and cannot be edited by scripts.
To get the color of a material, use: Terrain:GetMaterialColor()
To set the color of a material, use: Terrain:SetMaterialColor()
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 3
- 486 Change ThreadSafety of MaterialColors from ReadOnly to ReadSafe
- 462 Change ThreadSafety of MaterialColors from to ReadOnly
- 349 Add MaterialColors
MaxExtents
Type | Default | |
---|---|---|
Region3int16 |
Displays the boundaries of the largest possible editable region.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 4
- 553 Change Default of MaxExtents from to
- 486 Change ThreadSafety of MaxExtents from ReadOnly to ReadSafe
- 462 Change ThreadSafety of MaxExtents from to ReadOnly
- 47 Add MaxExtents
PasteRegion
Parameters (3) | ||
---|---|---|
region | TerrainRegion | |
corner | Vector3int16 | |
pasteEmptyCells | bool | |
Returns (1) | ||
null |
Applies a chunk of terrain to the Terrain object. Note: TerrainRegion data does not replicate between server and client.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of PasteRegion from void to null
- 498 Change Parameters of PasteRegion from (region: Instance, corner: Vector3int16, pasteEmptyCells: bool) to (region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: bool)
- 462 Change ThreadSafety of PasteRegion from to Unsafe
- 130 Add PasteRegion
ReadVoxelChannels
Parameters (3) | ||
---|---|---|
region | Region3 | |
resolution | float | |
channelIds | Array | |
Returns (1) | ||
Dictionary |
Returns a region of terrain voxel data in table format based on the channel names.
Thread safety | Safe |
---|
History 4
- 616 Change Tags of ReadVoxelChannels from [] to [CustomLuaState]
- 604 Add ReadVoxelChannels
- 603 Remove ReadVoxelChannels
- 604 Add ReadVoxelChannels
ReadVoxels
Parameters (2) | ||
---|---|---|
region | Region3 | |
resolution | float | |
Returns (1) | ||
Tuple |
Returns a certain region of smooth terrain in table format.
Thread safety | Safe |
---|
History 4
- 486 Change ThreadSafety of ReadVoxels from ReadOnly to Safe
- 462 Change ThreadSafety of ReadVoxels from to ReadOnly
- 349 Change Tags of ReadVoxels from [] to [CustomLuaState]
- 193 Add ReadVoxels
ReplaceMaterial
Parameters (4) | ||
---|---|---|
region | Region3 | |
resolution | float | |
sourceMaterial | Material | |
targetMaterial | Material | |
Returns (1) | ||
null |
ReplaceMaterial replaces terrain of a certain Material within a Region3 with another material. Essentially, it is a find-and-replace operation on Terrain materials.
Constraints
When calling this method, the resolution
parameter must be exactly 4.
Additionally, the Region3 must be aligned to the terrain materials grid,
i.e. the components of the Region3's minimum and maximum points must be
divisible by 4. Use Region3:ExpandToGrid() to make a region
compatible with this function.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of ReplaceMaterial from void to null
- 462 Change ThreadSafety of ReplaceMaterial from to Unsafe
- 400 Add ReplaceMaterial
ReplaceMaterialInTransform
Parameters (4) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
sourceMaterial | Material | |
targetMaterial | Material | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 573 Change ReturnType of ReplaceMaterialInTransform from void to null
- 566 Add ReplaceMaterialInTransform
ReplaceMaterialInTransformSubregion
Parameters (5) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
sourceMaterial | Material | |
targetMaterial | Material | |
targetRegion | Region3int16 | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
SetCell
Parameters (6) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
material | CellMaterial | |
block | CellBlock | |
orientation | CellOrientation | |
Returns (1) | ||
null |
Sets the occupancy of the specified terrain voxel to 1, and sets it's material to the closest smooth terrain material that matches the CellMaterial.
CellBlock and CellOrientation have no effect.
Thread safety | Unsafe |
---|
SetCells
Parameters (4) | ||
---|---|---|
region | Region3int16 | |
material | CellMaterial | |
block | CellBlock | |
orientation | CellOrientation | |
Returns (1) | ||
null |
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 CellMaterial.
CellBlock and CellOrientation have no effect.
Thread safety | Unsafe |
---|
SetMaterialColor
Parameters (2) | ||
---|---|---|
material | Material | |
value | Color3 | |
Returns (1) | ||
null |
Sets current terrain material color for specified terrain material. Terrain material will shift its base color toward specified color.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of SetMaterialColor from void to null
- 462 Change ThreadSafety of SetMaterialColor from to Unsafe
- 317 Add SetMaterialColor
SetMaterialInTransform
Parameters (3) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
targetMaterial | Material | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 573 Change ReturnType of SetMaterialInTransform from void to null
- 566 Add SetMaterialInTransform
SetMaterialInTransformSubregion
Parameters (4) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
targetMaterial | Material | |
targetRegion | Region3int16 | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
SetWaterCell
Parameters (5) | ||
---|---|---|
x | int | |
y | int | |
z | int | |
force | WaterForce | |
direction | WaterDirection | |
Returns (1) | ||
null |
Sets the specified terrain voxel's material to ''Water'' and sets its occupancy to 1. WaterDirection and WaterForce no longer have any effect.
Note: This API was intended for Roblox's old terrain system, which has since been removed from the engine.
Thread safety | Unsafe |
---|
History 9
- 573 Change ReturnType of SetWaterCell from void to null
- 462 Change ThreadSafety of SetWaterCell from to Unsafe
- 251 Change Tags of SetWaterCell from [] to [Deprecated]
- 250 Change Tags of SetWaterCell from [Deprecated] to []
- 251 Change Tags of SetWaterCell from [] to [Deprecated]
- 79 Change Tags of SetWaterCell from [preliminary] to []
- 78 Change Tags of SetWaterCell from [] to [preliminary]
- 79 Change Tags of SetWaterCell from [preliminary] to []
- 61 Add SetWaterCell
SmoothRegion
Parameters (3) | ||
---|---|---|
region | Region3 | |
resolution | float | |
strength | float | |
Returns (1) | ||
Tuple |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Safe |
History 1
- 569 Add SmoothRegion
WaterColor
Type | Default | |
---|---|---|
Color3 | 0.05, 0.33, 0.36 |
The tint of the Terrain water.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 6
- 553 Change Default of WaterColor from to Color3(0.05, 0.33, 0.36)
- 486 Change ThreadSafety of WaterColor from ReadOnly to ReadSafe
- 462 Change ThreadSafety of WaterColor from to ReadOnly
- 223 Add WaterColor
- 222 Remove WaterColor
- 223 Add WaterColor
WaterReflectance
Type | Default | |
---|---|---|
float | 1 |
Controls how opaque the Terrain's water reflections are.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 4
- 553 Change Default of WaterReflectance from to 1
- 486 Change ThreadSafety of WaterReflectance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of WaterReflectance from to ReadOnly
- 262 Add WaterReflectance
WaterTransparency
Type | Default | |
---|---|---|
float | 0.300000012 |
The transparency of the Terrain water.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 6
- 553 Change Default of WaterTransparency from to 0.300000012
- 486 Change ThreadSafety of WaterTransparency from ReadOnly to ReadSafe
- 462 Change ThreadSafety of WaterTransparency from to ReadOnly
- 223 Add WaterTransparency
- 222 Remove WaterTransparency
- 223 Add WaterTransparency
WaterWaveSize
Type | Default | |
---|---|---|
float | 0.150000006 |
Sets the maximum height of the Terrain water waves in studs. This is currently constrained to between 0 and 1.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 6
- 553 Change Default of WaterWaveSize from to 0.150000006
- 486 Change ThreadSafety of WaterWaveSize from ReadOnly to ReadSafe
- 462 Change ThreadSafety of WaterWaveSize from to ReadOnly
- 223 Add WaterWaveSize
- 222 Remove WaterWaveSize
- 223 Add WaterWaveSize
WaterWaveSpeed
Type | Default | |
---|---|---|
float | 10 |
Sets how many times the Terrain water waves will move up and down per minute. This is currently constrained to between 0 and 100.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 6
- 553 Change Default of WaterWaveSpeed from to 10
- 486 Change ThreadSafety of WaterWaveSpeed from ReadOnly to ReadSafe
- 462 Change ThreadSafety of WaterWaveSpeed from to ReadOnly
- 223 Add WaterWaveSpeed
- 222 Remove WaterWaveSpeed
- 223 Add WaterWaveSpeed
WorldToCell
Parameters (1) | ||
---|---|---|
position | Vector3 | |
Returns (1) | ||
Vector3 |
Returns the grid cell location that contains the point position.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of WorldToCell from to Unsafe
- 47 Add WorldToCell
WorldToCellPreferEmpty
Parameters (1) | ||
---|---|---|
position | Vector3 | |
Returns (1) | ||
Vector3 |
Returns the grid cell location that contains the point position, preferring empty grid cells when position is on a grid edge.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of WorldToCellPreferEmpty from to Unsafe
- 47 Add WorldToCellPreferEmpty
WorldToCellPreferSolid
Parameters (1) | ||
---|---|---|
position | Vector3 | |
Returns (1) | ||
Vector3 |
Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of WorldToCellPreferSolid from to Unsafe
- 47 Add WorldToCellPreferSolid
WriteVoxelChannels
Parameters (3) | ||
---|---|---|
region | Region3 | |
resolution | float | |
channels | Dictionary | |
Returns (1) | ||
null |
Sets a region of terrain using a dictionary of voxel channel data.
Thread safety | Unsafe |
---|
History 4
- 616 Change Tags of WriteVoxelChannels from [] to [CustomLuaState]
- 604 Add WriteVoxelChannels
- 603 Remove WriteVoxelChannels
- 604 Add WriteVoxelChannels
WriteVoxels
Parameters (4) | ||
---|---|---|
region | Region3 | |
resolution | float | |
materials | Array | |
occupancy | Array | |
Returns (1) | ||
null |
Sets a certain region of smooth terrain using table format.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of WriteVoxels from void to null
- 462 Change ThreadSafety of WriteVoxels from to Unsafe
- 349 Change Tags of WriteVoxels from [] to [CustomLuaState]
- 193 Add WriteVoxels
Removed members 35
Anchored
Type | Default | |
---|---|---|
bool |
Category | |
---|---|
Loaded/Saved | false |
Archivable
Type | Default | |
---|---|---|
bool |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove Archivable
- 55 Add Archivable
BreakJoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
History 2
- 67 Remove BreakJoints
- 55 Add BreakJoints
BrickColor
Type | Default | |
---|---|---|
BrickColor |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove BrickColor
- 55 Add BrickColor
CFrame
Type | Default | |
---|---|---|
CoordinateFrame |
Category | |
---|---|
Loaded/Saved | false |
CanCollide
Type | Default | |
---|---|---|
bool |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove CanCollide
- 55 Add CanCollide
CancelImportHeightmap
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 484 Remove CancelImportHeightmap
- 462 Change ThreadSafety of CancelImportHeightmap from to Unsafe
- 457 Add CancelImportHeightmap
Clone
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instance |
Destroy
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
Elasticity
Type | Default | |
---|---|---|
float |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove Elasticity
- 55 Add Elasticity
Friction
Type | Default | |
---|---|---|
float |
Category | |
---|---|
Loaded/Saved | false |
HideTerrainRegion
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 565 Remove HideTerrainRegion
- 549 Add HideTerrainRegion
ImportHeightMap
Parameters (3) | ||
---|---|---|
heightMapBinary | string | |
colorMapBinary | string | |
region | Region3 | |
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|
History 2
- 462 Remove ImportHeightMap
- 391 Add ImportHeightMap
ImportHeightmap
Parameters (4) | ||
---|---|---|
region | Region3 | |
heightmapAssetId | Content | |
colormapAssetId | Content | |
defaultMaterial | Material | |
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 484 Remove ImportHeightmap
- 462 Change ThreadSafety of ImportHeightmap from to Unsafe
- 457 Add ImportHeightmap
Locked
Type | Default | |
---|---|---|
bool |
Category | |
---|---|
Loaded/Saved | false |
MakeJoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
History 2
- 67 Remove MakeJoints
- 55 Add MakeJoints
Material
Type | Default | |
---|---|---|
Material |
Category | |
---|---|
Loaded/Saved | false |
Name
Type | Default | |
---|---|---|
string |
Category | |
---|---|
Loaded/Saved | false |
Position
Type | Default | |
---|---|---|
Vector3 |
Category | |
---|---|
Loaded/Saved | false |
Reflectance
Type | Default | |
---|---|---|
float |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove Reflectance
- 55 Add Reflectance
Resize
Parameters (2) | ||
---|---|---|
normalId | NormalId | |
deltaAmount | int | |
Returns (1) | ||
bool |
RotVelocity
Type | Default | |
---|---|---|
Vector3 |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove RotVelocity
- 55 Add RotVelocity
SetImportHeightmapPaused
Parameters (1) | ||
---|---|---|
paused | bool | |
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 484 Remove SetImportHeightmapPaused
- 462 Change ThreadSafety of SetImportHeightmapPaused from to Unsafe
- 457 Add SetImportHeightmapPaused
SetTerrainRegion
Parameters (2) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 565 Remove SetTerrainRegion
- 549 Add SetTerrainRegion
SetWireframeRegion
Parameters (2) | ||
---|---|---|
cframe | CFrame | |
size | Vector3 | |
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 565 Remove SetWireframeRegion
- 549 Add SetWireframeRegion
ShowTerrainRegion
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 565 Remove ShowTerrainRegion
- 549 Add ShowTerrainRegion
TerrainProgressUpdate
Parameters (1) | |
---|---|
progressRatio | float |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 484 Remove TerrainProgressUpdate
- 462 Change ThreadSafety of TerrainProgressUpdate from to Unsafe
- 391 Add TerrainProgressUpdate
Transparency
Type | Default | |
---|---|---|
float |
Category | |
---|---|
Loaded/Saved | false |
History 2
- 67 Remove Transparency
- 55 Add Transparency
Velocity
Type | Default | |
---|---|---|
Vector3 |
Category | |
---|---|
Loaded/Saved | false |
breakJoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
History 2
- 67 Remove breakJoints
- 55 Add breakJoints
clone
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instance |
destroy
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
makeJoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
void |
History 2
- 67 Remove makeJoints
- 55 Add makeJoints
resize
Parameters (2) | ||
---|---|---|
normalId | NormalId | |
deltaAmount | int | |
Returns (1) | ||
bool |