Roblox Wiki
Roblox Wiki
No edit summary
Tags: Visual edit apiedit
 
(21 intermediate revisions by 9 users not shown)
Line 1: Line 1:
  +
{{Missing API Documentation}}
[[File:Terrain.jpg|400px|thumb|A screenshot showing off the Legacy Terrain.]]
 
  +
{{Infobox class}}
The '''Terrain''' object is a feature of ROBLOX which was introduced in 2011. In 2015 smooth Terrain was introduced and new worlds created will use that type of terrain.
 
   
  +
Object representing a high performance bounded grid of static 4x4 parts. This class cannot be [[instantiated]].
==Smooth terrain==
 
Smooth terrain is an update to terrain in 2015.
 
   
  +
{{Member list}}
==Legacy terrain==
 
Legacy Terrain, usually referred to as just Terrain, is the terrain object when the smooth Terrain feature is disabled. The Terrain object allows for a player to build landscapes without using Parts. The Terrain is made up of many individual cells including ramps, cubes, and corner ramps. When the cells are filled in the terrain automatically determines what faces are showing and then creates the terrain mesh based off the cells.
 
   
  +
== External links ==
As it is based off the BasePart class most properties the Terrain object inherits are not modifiable. An explosion will remove the cells in its blast radius if the explosion is set up to do so. This provides a simple way to create craters ingame.
 
   
  +
* {{DevHub class link}}
In ROBLOX Studio the [[Terrain plugin|Terrain]] [[Plugins|plugin]] allows you to create craters or mountains etc, or you could just randomize it using the [[Terrain Generator]] script in the plugin. Read more about the terrain generator [http://blog.roblox.com/?s=terrain+generator here.]
 
  +
* {{Roblox API Reference class link}}
 
==Features==
 
*Vast voxel-based grid of boxes and wedges.
 
*Integrated with the ROBLOX physics engine.
 
*Sand & Grass environments currently available.
 
*Destructible terrain
 
*It is fully scriptable in Lua (but API will change before release).
 
*Editable with ROBLOX and user-made Studio plugins.
 
*First version out in September.
 
 
===Terrain Materials (Voxel)===
 
[[File:Terrain Materials.jpg|thumb|500px|The sixteen different materials of Voxel Terrain.]]
 
#Grass
 
#Sand
 
#Brick
 
#Granite
 
#Asphalt
 
#Iron Plate
 
#Aluminum Plate
 
#Gold
 
#Wood Planks
 
#Logs
 
#Gravel
 
#Cinderblock
 
#Mossy Rock
 
#Concrete
 
#Red Plastic
 
#Blue Plastic
 
#Water
 
 
<span>Terrain Materials (Smooth)</span>
 
# <span>Wood Planks</span>
 
# Sand
 
# Grass
 
# Water
 
# <span>Granite</span>
 
# Brick
 
# <span>Stone</span>
 
# Cement
 
 
==Hacks==
 
When the Terrain object was released, people had the ability to hack [[ROBLOX]] [[games]], by [[Terrain Generator|generating Terrain]] over the existing [[place]]. This makes the place hard to play or even broken because of the terrain that was not supposed to be in the level. The place could also be [[Water|flooded]]. There are some scripts that prevent terrain hacks from occuring. However, not all hacks are yet resolved.
 
 
The hacks were done by replacing all voxel values (including the empty ones) to any other values that weren't empty.
 
 
==Criticism==
 
[[File:RobloxandMinecraftTerrainComparison.png|thumb|220x220px|ROBLOX's terrain (left) compared to Minecraft's terrain (right).]]
 
Many people thought that the terrain were resembling Minecraft's terrain, however they are not similar in any way. It was also criticized for the amount of lag in places and lack of effort in building bases in places.
 
 
==History==
 
In an update, more Terrain Voxel textures were introduced, bringing the number up to sixteen.
 
 
[[File:Imagewater.jpg|thumb|[[Water]] was added to Terrain.]]
 
 
On December 7, 2013, an update was added that increased the size of the Terrain from 512x64x512 to 64000x64000x64000. This allowed players to add Terrain Water to existing places that are very large.
 
 
In a later update to ROBLOX, the appearance of Terrain materials was updated to match the Part's material appearance.
 
 
On May 31, 2015, a new type of Terrain named Smooth Terrain was added, increasing the graphical fidelity and changing the physics engine from a blocky style to a smoother, more photo-realistic, style.
 
 
Also at one point they made water more realistic by reflecting everything.
 
 
==Deprecation==
 
On January 1, 2017, ROBLOX scheduled to remove Legacy terrain. The forum post on the devforums can be found [http://http://devforum.roblox.com/t/old-terrain-is-deprecated-and-will-be-removed-in-january-2017/28214 here]. This caused rage throughout the community.
 
 
==Gallery==
 
<gallery>
 
File:Terrain 1.jpg
 
File:Terrain 2.jpg
 
File:Terrain 3.jpg
 
File:Terrain 4.jpg
 
File:Terrain Materials.jpg
 
File:Terrain Toolbar.jpg
 
File:Water.jpg
 
File:Water 2.jpg
 
File:Water 3.jpg
 
File:smooth-0.png
 
</gallery>
 
 
[[Category:Terrain]]
 

Latest revision as of 03:02, 23 June 2023

Missing API Documentation
This API Class does not have any or complete API documentation. Please add API documentation if possible.

Object representing a high performance bounded grid of static 4x4 parts. This class cannot be instantiated.

Properties

Decoration: bool

  • Not scriptableThis member cannot be accessed by Lua code.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/Decoration.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

GrassLength: float

  • Not scriptableThis member cannot be accessed by Lua code.
  • Not browsableThis member is not visible in documentation for end-users.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/GrassLength.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

IsSmooth: bool

  • Read-onlyThis property is capable of being read but not written.
  • Not replicatedThis member is not replicated across the network boundary.
  • DeprecatedThis member will be phased out and should be avoided while it is still available.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/IsSmooth.
  • Category: Data.
  • Serialization: cannot load or save.
  • Thread safety: read safe

LastUsedModificationMethod: TerrainAcquisitionMethod

  • HiddenThis property is not shown in the object browser and properties window.
  • Not replicatedThis member is not replicated across the network boundary.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/LastUsedModificationMethod.
  • Category: Data.
  • Read security: RobloxScriptSecurity.
  • Write security: RobloxScriptSecurity.
  • Serialization: cannot load or save.
  • Thread safety: read safe

MaterialColors: BinaryString

  • Not scriptableThis member cannot be accessed by Lua code.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/MaterialColors.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

MaxExtents: Region3int16

  • Read-onlyThis property is capable of being read but not written.
  • Not replicatedThis member is not replicated across the network boundary.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/MaxExtents.
  • Category: Data.
  • Serialization: cannot load or save.
  • Thread safety: read safe

ShorelinesUpgraded: bool

  • HiddenThis property is not shown in the object browser and properties window.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/ShorelinesUpgraded.
  • Category: Appearance.
  • Read security: RobloxScriptSecurity.
  • Write security: RobloxScriptSecurity.
  • Serialization: can save and load.
  • Thread safety: read safe

SmoothVoxelsUpgraded: bool

  • HiddenThis property is not shown in the object browser and properties window.
This class member is missing documentation. Create or add to its subpage at Class:Terrain/SmoothVoxelsUpgraded.
  • Category: Appearance.
  • Read security: RobloxScriptSecurity.
  • Write security: RobloxScriptSecurity.
  • Serialization: can save and load.
  • Thread safety: read safe

WaterColor: Color3

This class member is missing documentation. Create or add to its subpage at Class:Terrain/WaterColor.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

WaterReflectance: float

This class member is missing documentation. Create or add to its subpage at Class:Terrain/WaterReflectance.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

WaterTransparency: float

This class member is missing documentation. Create or add to its subpage at Class:Terrain/WaterTransparency.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

WaterWaveSize: float

This class member is missing documentation. Create or add to its subpage at Class:Terrain/WaterWaveSize.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

WaterWaveSpeed: float

This class member is missing documentation. Create or add to its subpage at Class:Terrain/WaterWaveSpeed.
  • Category: Appearance.
  • Serialization: can save and load.
  • Thread safety: read safe

Methods

AutowedgeCell(x: int, y: int, z: int): bool

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
xint
yint
zint
  • Thread safety: unsafe

AutowedgeCells(region: Region3int16): null

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
regionRegion3int16
  • Thread safety: unsafe

CanShorelinesBeUpgraded(): bool

This class member is missing documentation. Create or add to its subpage at Class:Terrain/CanShorelinesBeUpgraded.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

CanSmoothVoxelsBeUpgraded(): bool

This class member is missing documentation. Create or add to its subpage at Class:Terrain/CanSmoothVoxelsBeUpgraded.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

CellCenterToWorld(x: int, y: int, z: int): Vector3

Parameters
NameType
xint
yint
zint
  • Thread safety: unsafe

CellCornerToWorld(x: int, y: int, z: int): Vector3

Parameters
NameType
xint
yint
zint
  • Thread safety: unsafe

Clear(): null

Clears all existing terrain voxels.

  • Thread safety: unsafe

ConvertToSmooth(): null

  • DeprecatedThis member will be phased out and should be avoided while it is still available.

Was previously used to convert legacy terrain to smooth terrain technology. This method no longer does anything when called because legacy terrain has been removed.

  • Security: PluginSecurity.
  • Thread safety: unsafe

CopyRegion(region: Region3int16): TerrainRegion

Parameters
NameType
regionRegion3int16
  • Thread safety: unsafe

CountCells(): int

This class member is missing documentation. Create or add to its subpage at Class:Terrain/CountCells.
  • Thread safety: unsafe

FillBall(center: Vector3, radius: float, material: Material): null

Parameters
NameType
centerVector3
radiusfloat
materialMaterial
  • Thread safety: unsafe

FillBlock(cframe: CFrame, size: Vector3, material: Material): null

Parameters
NameType
cframeCFrame
sizeVector3
materialMaterial
  • Thread safety: unsafe

FillCylinder(cframe: CFrame, height: float, radius: float, material: Material): null

Parameters
NameType
cframeCFrame
heightfloat
radiusfloat
materialMaterial
  • Thread safety: unsafe

FillRegion(region: Region3, resolution: float, material: Material): null

Parameters
NameType
regionRegion3
resolutionfloat
materialMaterial
  • Thread safety: unsafe

FillWedge(cframe: CFrame, size: Vector3, material: Material): null

Parameters
NameType
cframeCFrame
sizeVector3
materialMaterial
  • Thread safety: unsafe

GetCell(x: int, y: int, z: int): Tuple

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
xint
yint
zint
  • Thread safety: unsafe

GetMaterialColor(material: Material): Color3

Parameters
NameType
materialMaterial
  • Thread safety: safe

GetTerrainWireframe(cframe: CFrame, size: Vector3): Array

Parameters
NameType
cframeCFrame
sizeVector3
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

GetWaterCell(x: int, y: int, z: int): Tuple

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
xint
yint
zint
  • Thread safety: unsafe

PasteRegion(region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: bool): null

Parameters
NameType
regionTerrainRegion
cornerVector3int16
pasteEmptyCellsbool
  • Thread safety: unsafe

ReadVoxels(region: Region3, resolution: float): Tuple

  • Custom Lua stateThis member uses the Lua C API directly.
Parameters
NameType
regionRegion3
resolutionfloat
  • Thread safety: safe

ReplaceMaterial(region: Region3, resolution: float, sourceMaterial: Material, targetMaterial: Material): null

Parameters
NameType
regionRegion3
resolutionfloat
sourceMaterialMaterial
targetMaterialMaterial
  • Thread safety: unsafe

ReplaceMaterialInTransform(cframe: CFrame, size: Vector3, sourceMaterial: Material, targetMaterial: Material): null

Parameters
NameType
cframeCFrame
sizeVector3
sourceMaterialMaterial
targetMaterialMaterial
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

ReplaceMaterialInTransformSubregion(cframe: CFrame, size: Vector3, sourceMaterial: Material, targetMaterial: Material, targetRegion: Region3int16): null

Parameters
NameType
cframeCFrame
sizeVector3
sourceMaterialMaterial
targetMaterialMaterial
targetRegionRegion3int16
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

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

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
xint
yint
zint
materialCellMaterial
blockCellBlock
orientationCellOrientation
  • Thread safety: unsafe

SetCells(region: Region3int16, material: CellMaterial, block: CellBlock, orientation: CellOrientation): null

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
regionRegion3int16
materialCellMaterial
blockCellBlock
orientationCellOrientation
  • Thread safety: unsafe

SetMaterialColor(material: Material, value: Color3): null

Parameters
NameType
materialMaterial
valueColor3
  • Thread safety: unsafe

SetMaterialInTransform(cframe: CFrame, size: Vector3, targetMaterial: Material): null

Parameters
NameType
cframeCFrame
sizeVector3
targetMaterialMaterial
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

SetMaterialInTransformSubregion(cframe: CFrame, size: Vector3, targetMaterial: Material, targetRegion: Region3int16): null

Parameters
NameType
cframeCFrame
sizeVector3
targetMaterialMaterial
targetRegionRegion3int16
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

SetWaterCell(x: int, y: int, z: int, force: WaterForce, direction: WaterDirection): null

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
xint
yint
zint
forceWaterForce
directionWaterDirection
  • Thread safety: unsafe

SmoothRegion(region: Region3, resolution: float, strength: float): Tuple

  • Custom Lua stateThis member uses the Lua C API directly.
Parameters
NameType
regionRegion3
resolutionfloat
strengthfloat
  • Security: RobloxScriptSecurity.
  • Thread safety: safe

WorldToCell(position: Vector3): Vector3

Parameters
NameType
positionVector3
  • Thread safety: unsafe

WorldToCellPreferEmpty(position: Vector3): Vector3

Parameters
NameType
positionVector3
  • Thread safety: unsafe

WorldToCellPreferSolid(position: Vector3): Vector3

Parameters
NameType
positionVector3
  • Thread safety: unsafe

WriteVoxels(region: Region3, resolution: float, materials: Array, occupancy: Array): null

  • Custom Lua stateThis member uses the Lua C API directly.
Parameters
NameType
regionRegion3
resolutionfloat
materialsArray
occupancyArray
  • Thread safety: unsafe

Removed members

Methods

  • breakJoints
  • BreakJoints
  • CancelImportHeightmap
  • clone
  • Clone
  • destroy
  • Destroy
  • HideTerrainRegion
  • ImportHeightmap
  • ImportHeightMap
  • makeJoints
  • MakeJoints
  • resize
  • Resize
  • SetImportHeightmapPaused
  • SetTerrainRegion
  • SetWireframeRegion
  • ShowTerrainRegion

Properties

  • Anchored
  • Archivable
  • BrickColor
  • CanCollide
  • CFrame
  • DebugAnimation
  • Elasticity
  • Friction
  • Locked
  • Material
  • Name
  • Position
  • Reflectance
  • RotVelocity
  • Transparency
  • Velocity

Events

  • TerrainProgressUpdate

External links