FANDOM


(Class page for Terrain)
Line 1: Line 1:
βˆ’
{{Infobox class}}[[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 May 2015, smooth terrain was introduced and new worlds created will use that type of terrain.
+
| explorer order = 0
  +
| tags = notCreatable}}
   
βˆ’
==Smooth terrain==
+
Object representing a high performance bounded grid of static 4x4 parts. This class cannot be [[instantiated]].
βˆ’
Smooth terrain is an update to terrain in 2015. It is a type of terrain that has a realistic feel to it, but it isn't blocky, unlike legacy terrain.
 
   
βˆ’
==Legacy Terrain==
+
== Properties ==
βˆ’
{{Warning|Legacy Terrain is being '''completely removed''' on January 1, 2017. Any places that still use old terrain will be forced to use new terrain. All games in 2017 that still use old terrain is not immediately updated.}}
 
βˆ’
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.
 
   
βˆ’
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 in-game.
+
This class has seven [[properties]].
   
βˆ’
In ROBLOX Studio the [[Terrain plugin|Terrain]] [[Plugins|plugin]] allows you to create craters, 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].
+
=== {{property|readonly|name=IsSmooth|type=bool}} ===
   
βˆ’
Legacy terrain is obsolete. Some games that have been not updated since smooth terrain is mandatory still exists.
+
=== {{property|readonly|name=MaxExtents|type=Region3int16}} ===
   
βˆ’
==Features[[File:Captu.png|thumb|400px|Legacy terrain in its existence in 2017. This game hasn't been updated since 2013. Notice the new ROBLOX logo and the timestamp on the bottom-right that says 2017.]]==
+
=== {{property|name=WaterColor|type=Color3}} ===
βˆ’
*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)===
+
=== {{property|name=WaterReflectance|type=float}} ===
βˆ’
[[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
 
   
βˆ’
===Terrain Materials (Smooth)===
 
βˆ’
# Wood Planks
 
βˆ’
# Sand
 
βˆ’
# Grass
 
βˆ’
# Water
 
βˆ’
# Granite
 
βˆ’
# Brick
 
βˆ’
# Stone
 
βˆ’
# Cement
 
   
βˆ’
==Hacks==
 
βˆ’
When the Terrain object was released, people had the ability to hack [[ROBLOX]] [[Game universe|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 occurring. 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.
+
=== {{property|name=WaterTransparency|type=float}} ===
   
βˆ’
==Criticism==
 
βˆ’
[[File:RobloxandMinecraftTerrainComparison.png|thumb|220x220px|ROBLOX's terrain (left) compared to Minecraft's terrain (right).]]
 
βˆ’
Many people thought that the terrain were resembling [[wikipedia:Minecraft|Minecraft]]'s terrain, however they are barely 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.]]
+
=== {{property|name=WaterWaveSize|type=float}} ===
   
βˆ’
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.
+
=== {{property|name=WaterWaveSpeed|type=float}} ===
   
βˆ’
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==
+
== Methods ==
βˆ’
<gallery>
+
βˆ’
File:Terrain 1.jpg
+
This class has twenty-two [[methods]].
βˆ’
File:Terrain 2.jpg
+
βˆ’
File:Terrain 3.jpg
+
=== {{method|deprecated|bool|name=AutowedgeCell|int x|int y|int z}} ===
βˆ’
File:Terrain 4.jpg
+
βˆ’
File:Terrain Materials.jpg
+
=== {{method|deprecated|void|name=AutowedgeCells|Region3int16 region}} ===
βˆ’
File:Terrain Toolbar.jpg
+
βˆ’
File:Water.jpg
+
=== {{method|Vector3|name=CellCenterToWorld|int x|int y|int z}} ===
βˆ’
File:Water 2.jpg
+
βˆ’
File:Water 3.jpg
+
=== {{method|Vector3|name=CellCornerToWorld|int x|int y|int z}} ===
βˆ’
File:smooth-0.png
+
βˆ’
</gallery>
+
=== {{method|void|name=Clear}} ===
βˆ’
[[Category:Terrain]]
+
  +
=== {{method|PluginSecurity|void|name=ConvertToSmooth}} ===
  +
  +
=== {{method|Instance|name=CopyRegion|Region3int16 region}} ===
  +
  +
=== {{method|int|name=CountCells}} ===
  +
  +
=== {{method|void|name=FillBall|Vector3 center|float radius|Material material}} ===
  +
  +
=== {{method|void|name=FillBlock|CoordinateFrame cframe|Vector3 size|Material material}} ===
  +
  +
=== {{method|void|name=FillRegion|Region3 region|float resolution|Material material}} ===
  +
  +
=== {{method|deprecated|Tuple|name=GetCell|int x|int y|int z}} ===
  +
  +
Returns CellMaterial, CellBlock, CellOrientation
  +
  +
=== {{method|deprecated|Tuple|name=GetWaterCell|int x|int y|int z}} ===
  +
  +
Returns hasAnyWater, WaterForce, WaterDirection
  +
  +
=== {{method|void|name=PasteRegion|Instance region|Vector3int16 corner|bool pasteEmptyCells}} ===
  +
  +
=== {{method|Tuple|name=ReadVoxels|Region3 region|float resolution}} ===
  +
  +
=== {{method|deprecated|void|name=SetCell|int x|int y|int z|CellMaterial material|CellBlock block|CellOrientation orientation}} ===
  +
  +
=== {{method|deprecated|void|name=SetCells|Region3int16 region|CellMaterial material|CellBlock block|CellOrientation orientation}} ===
  +
  +
=== {{method|deprecated|void|name=SetWaterCell|int x|int y|int z|WaterForce force|WaterDirection direction}} ===
  +
  +
  +
  +
=== {{method|Vector3|name=WorldToCell|Vector3 position}} ===
  +
  +
=== {{method|Vector3|name=WorldToCellPreferEmpty|Vector3 position}} ===
  +
  +
=== {{method|Vector3|name=WorldToCellPreferSolid|Vector3 position}} ===
  +
  +
=== {{method|void|name=WriteVoxels|Region3 region|float resolution|Array materials|Array occupancy}} ===

Revision as of 08:56, February 24, 2017

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

Properties

This class has seven properties.

Pubfield bool IsSmooth [readonly]

Pubfield Region3int16 MaxExtents [readonly]

Pubfield Color3 WaterColor

Pubfield float WaterReflectance

Pubfield float WaterTransparency

Pubfield float WaterWaveSize

Pubfield float WaterWaveSpeed

Methods

This class has twenty-two methods.

Pubmethod bool AutowedgeCell(int x, int y, int z) [deprecated]

Pubmethod void AutowedgeCells(Region3int16 region) [deprecated]

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

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

Pubmethod void Clear()

Protmethod void ConvertToSmooth() [PluginSecurity]

Pubmethod Instance CopyRegion(Region3int16 region)

Pubmethod int CountCells()

Pubmethod void FillBall(Vector3 center, float radius, Material material)

Pubmethod void FillBlock(CoordinateFrame cframe, Vector3 size, Material material)

Pubmethod void FillRegion(Region3 region, float resolution, Material material)

Pubmethod Tuple GetCell(int x, int y, int z) [deprecated]

Returns CellMaterial, CellBlock, CellOrientation

Pubmethod Tuple GetWaterCell(int x, int y, int z) [deprecated]

Returns hasAnyWater, WaterForce, WaterDirection

Pubmethod void PasteRegion(Instance region, Vector3int16 corner, bool pasteEmptyCells)

Pubmethod Tuple ReadVoxels(Region3 region, float resolution)

Pubmethod void SetCell(int x, int y, int z, CellMaterial material, CellBlock block, CellOrientation orientation) [deprecated]

Pubmethod void SetCells(Region3int16 region, CellMaterial material, CellBlock block, CellOrientation orientation) [deprecated]

Pubmethod void SetWaterCell(int x, int y, int z, WaterForce force, WaterDirection direction) [deprecated]

Pubmethod Vector3 WorldToCell(Vector3 position)

Pubmethod Vector3 WorldToCellPreferEmpty(Vector3 position)

Pubmethod Vector3 WorldToCellPreferSolid(Vector3 position)

Pubmethod void WriteVoxels(Region3 region, float resolution, Array materials, Array occupancy)

Community content is available under CC-BY-SA unless otherwise noted.