Willrarcher (talk | contribs) No edit summary Tags: Visual edit apiedit |
Mark's bot (talk | contribs) m (Added external links) |
||
(37 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Infobox class |
||
− | [[File:Terrain.jpg|400px|thumb|The '''Terrain''' object.]] |
||
+ | | explorer order = 0 |
||
− | The '''Terrain''' object is an object that is customizable using functions and the [[Terrain plugin]]. [[Smooth Terrain|New]] Terrain! |
||
+ | | tags = notCreatable}} |
||
+ | Object representing a high performance bounded grid of static 4x4 parts. This class cannot be [[instantiated]]. |
||
− | ==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.] |
||
− | == |
+ | == 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. |
||
− | ==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> |
||
+ | === {{property|name=WaterTransparency|type=float}} === |
||
− | [[Category:Terrain]] |
||
+ | |||
+ | The transparency of the [[Water]] material. |
||
+ | |||
+ | === {{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.
Properties
IsSmooth: bool
Returns whether or not this game has smooth terrain. Flat terrain was removed in January 2017, so this is always true.
MaxExtents: Region3int16
WaterColor: Color3
The color of the Water material.
WaterReflectance: float
The reflectance of the Water material.
WaterTransparency: float
The transparency of the Water material.
WaterWaveSize: float
The maximum size Water waves can be.
WaterWaveSpeed: float
The speed of the Water material.
Methods
AutowedgeCell(x: int, y: int, z: int): bool
AutowedgeCells(region: Region3int16): void
CellCenterToWorld(x: int, y: int, z: int): Vector3
CellCornerToWorld(x: int, y: int, z: int): Vector3
Clear(): void
Removes all smooth terrain from the game.
ConvertToSmooth(): void
Converts the game from flat to smooth terrain.
CopyRegion(region: Region3int16): Instance
Copies the given region and returns a TerrainRegion.
CountCells(): int
Counts the amount of terrain cells.
FillBall(center: Vector3, radius: float, material: Material): void
Creates a ball of terrain that reaches out from the given center point.
FillBlock(cframe: CoordinateFrame, size: Vector3, material: Material): void
Creates a block of terrain from the given CoordinateFrame and goes out by size.
FillRegion(region: Region3, resolution: float, material: Material): void
Fills a region with the given material.
GetCell(x: int, y: int, z: int): Tuple
Returns CellMaterial, CellBlock, CellOrientation
GetWaterCell(x: int, y: int, z: int): Tuple
Returns hasAnyWater, WaterForce, WaterDirection
GetMaterialColor(material: Material): Color3
Retrives the color of a material previously set with SetMaterialColor
PasteRegion(region: Instance, corner: Vector3int16, pasteEmptyCells: bool): void
Pastes the given TerrainRegion, with the corner being a corner.
ReadVoxels(region: Region3, resolution: float): Tuple
SetMaterialColor(material: Material, value: Color3): void
SetCell(x: int, y: int, z: int, material: CellMaterial, block: CellBlock, orientation: CellOrientation): void
SetCells(region: Region3int16, material: CellMaterial, block: CellBlock, orientation: CellOrientation): void
SetWaterCell(x: int, y: int, z: int, force: WaterForce, direction: WaterDirection): void
WorldToCell(position: Vector3): Vector3
WorldToCellPreferEmpty(position: Vector3): Vector3
WorldToCellPreferSolid(position: Vector3): Vector3
WriteVoxels(region: Region3, resolution: float, materials: Array, occupancy: Array): void
External links
- Terrain in the Roblox Creator Documentation
- Terrain in the Roblox API Reference