(Undo revision 225977 by GOLDENUSER (talk))
Tags: rollback, rte-wysiwyg
m (Added external links)
(32 intermediate revisions by 15 users not shown)
Line 1: Line 1:
  +
{{Infobox class
βˆ’
[[File:Terrain.jpg|400px|thumb|The Old Terrain.]]
 
  +
| explorer order = 0
βˆ’
''As of late May 2015, a '''[[Smooth Terrain|new]]''' type of terrain was published replacing this one. To convert to the new terrain simply press the Terrain tab in studio, and press "Convert To Smooth".''
 
  +
| tags = notCreatable}}
   
  +
Object representing a high performance bounded grid of static 4x4 parts. This class cannot be [[instantiated]].
βˆ’
==Terrain==
 
βˆ’
Voxel Terrain, Or known as Terrain, was the terrain before the smooth terrain.The Terrain object allows for a player to use more blocks per game. The Terrain is made up of many individual BaseParts acting as a single BasePart, unlike most complex shapes which are usually made of [[Mesh]]es. The blocks are anchored when you step on them, but an explosion dettaches the bricks and renders them unanchored. This provides a simple way to create craters ingame. 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.]
 
   
βˆ’
==Features==
+
== Properties ==
βˆ’
*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
 
   
  +
=== {{property|readonly|name=IsSmooth|type=bool|deprecated}} ===
βˆ’
==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 ruined because of the terrain that was not supposed to be in the level. The place could even be [[Water|flooded]]. However, now there are some scripts that prevent terrain hacks from occuring. However, not all hacks are yet resolved.
 
   
  +
Returns whether or not this game has smooth terrain. Flat terrain was removed in January 2017, so this is always true.
βˆ’
The hacks were done by replacing all voxel values (including the empty ones) to any other values that weren't empty.
 
   
  +
=== {{property|readonly|name=MaxExtents|type=Region3int16}} ===
βˆ’
==Criticism==
 
βˆ’
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.
 
   
  +
=== {{property|name=WaterColor|type=Color3}} ===
βˆ’
==History==
 
βˆ’
In an update, more Terrain Voxel textures were introduced, bringing the number up to sixteen.
 
   
  +
The color of the [[Water]] material.
βˆ’
[[File:Imagewater.jpg|thumb|[[Water]] was added to Terrain.]]
 
   
  +
=== {{property|name=WaterReflectance|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.
 
   
  +
The reflectance of the [[Water]] material.
βˆ’
On May 31, 2015, a feature 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=WaterTransparency|type=float}} ===
βˆ’
==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>
 
   
  +
The transparency of the [[Water]] material.
βˆ’
[[Category:Terrain]]
 
  +
  +
=== {{property|name=WaterWaveSize|type=float}} ===
  +
  +
The maximum size [[Water]] waves can be.
  +
  +
=== {{property|name=WaterWaveSpeed|type=float}} ===
  +
  +
The speed of the [[Water]] material.
  +
  +
== Methods ==
  +
  +
  +
  +
=== {{method|deprecated|bool|name=AutowedgeCell|int x|int y|int z}} ===
  +
  +
=== {{method|deprecated|void|name=AutowedgeCells|Region3int16 region}} ===
  +
  +
=== {{method|Vector3|name=CellCenterToWorld|int x|int y|int z}} ===
  +
  +
=== {{method|Vector3|name=CellCornerToWorld|int x|int y|int z}} ===
  +
  +
=== {{method|void|name=Clear}} ===
  +
  +
Removes all smooth terrain from the game.
  +
  +
=== {{method|PluginSecurity|void|name=ConvertToSmooth|deprecated}} ===
  +
  +
Converts the game from flat to smooth terrain.
  +
  +
=== {{method|Instance|name=CopyRegion|Region3int16 region}} ===
  +
  +
Copies the given region and returns a {{Class link|TerrainRegion}}.
  +
  +
=== {{method|int|name=CountCells}} ===
  +
  +
Counts the amount of terrain cells.
  +
  +
=== {{method|void|name=FillBall|Vector3 center|float radius|Material material}} ===
  +
  +
Creates a ball of terrain that reaches out from the given center point.
  +
  +
=== {{method|void|name=FillBlock|CoordinateFrame cframe|Vector3 size|Material material}} ===
  +
  +
Creates a block of terrain from the given CoordinateFrame and goes out by size.
  +
  +
=== {{method|void|name=FillRegion|Region3 region|float resolution|Material material}} ===
  +
  +
Fills a region with the given 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|Color3|name=GetMaterialColor|Material material}} ===
  +
Retrives the color of a material previously set with [[#SetMaterialColor|SetMaterialColor]]
  +
  +
=== {{method|void|name=PasteRegion|Instance region|Vector3int16 corner|bool pasteEmptyCells}} ===
  +
  +
Pastes the given {{Class link|TerrainRegion}}, with the corner being a corner.
  +
  +
=== {{method|Tuple|name=ReadVoxels|Region3 region|float resolution}} ===
  +
  +
=== {{method|void|name=SetMaterialColor|Material material|Color3 value}} ===
  +
  +
=== {{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}} ===
  +
  +
== External links ==
  +
  +
* {{DevHub class link}}
  +
* {{Roblox API Reference class link}}

Revision as of 03:09, 3 March 2019

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

Contents

Properties

Pubfield.gif bool IsSmooth [readonly] [deprecated]

Returns whether or not this game has smooth terrain. Flat terrain was removed in January 2017, so this is always true.

Pubfield.gif Region3int16 MaxExtents [readonly]

Pubfield.gif Color3 WaterColor

The color of the Water material.

Pubfield.gif float WaterReflectance

The reflectance of the Water material.

Pubfield.gif float WaterTransparency

The transparency of the Water material.

Pubfield.gif float WaterWaveSize

The maximum size Water waves can be.

Pubfield.gif float WaterWaveSpeed

The speed of the Water material.

Methods

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

Pubmethod.gif void AutowedgeCells(Region3int16 region) [deprecated]

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

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

Pubmethod.gif void Clear()

Removes all smooth terrain from the game.

Protmethod.gif void ConvertToSmooth() [deprecated] [PluginSecurity]

Converts the game from flat to smooth terrain.

Pubmethod.gif Instance CopyRegion(Region3int16 region)

Copies the given region and returns a ExplorerImageIndex 65.pngTerrainRegion.

Pubmethod.gif int CountCells()

Counts the amount of terrain cells.

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

Creates a ball of terrain that reaches out from the given center point.

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

Creates a block of terrain from the given CoordinateFrame and goes out by size.

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

Fills a region with the given material.

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

Returns CellMaterial, CellBlock, CellOrientation

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

Returns hasAnyWater, WaterForce, WaterDirection

Pubmethod.gif Color3 GetMaterialColor(Material material)

Retrives the color of a material previously set with SetMaterialColor

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

Pastes the given ExplorerImageIndex 65.pngTerrainRegion, with the corner being a corner.

Pubmethod.gif Tuple ReadVoxels(Region3 region, float resolution)

Pubmethod.gif void SetMaterialColor(Material material, Color3 value)

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

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

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

Pubmethod.gif Vector3 WorldToCell(Vector3 position)

Pubmethod.gif Vector3 WorldToCellPreferEmpty(Vector3 position)

Pubmethod.gif Vector3 WorldToCellPreferSolid(Vector3 position)

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

External links

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