Terrain: Terrain Entity – Arma Reforger
Lou Montana (talk | contribs) m (Lou Montana moved page Arma Reforger:Terrain: Definitions to Arma Reforger:Terrain: Terrain Entity without leaving a redirect: Better name) |
Lou Montana (talk | contribs) m (Some cleanup) |
||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
TerrainEntity (abbreviated as TE in this document), class {{hl|GenericTerrainEntity}}, is responsible for rendering terrain mesh and its textures. | TerrainEntity (abbreviated as TE in this document), class {{hl|GenericTerrainEntity}}, is responsible for the entire terrain system; rendering terrain mesh and its textures, collision, etc. | ||
Internally, TE is split into blocks and tiles and supports TE supports non-rectangular shapes of terrain as well, by clicking on "="(equal sign) user may set different grid size for X and Z axis. | Internally, TE is split into blocks and tiles and supports TE supports non-rectangular shapes of terrain as well, by clicking on "="(equal sign) user may set different grid size for X and Z axis. | ||
Line 7: | Line 7: | ||
{{Feature|informative|Visualization of Blocks & Tiles can be turned on from debug menu (holding {{Controls|Win|Alt}}), Render → Terrain menu → Block's/Tile's bounding boxes.}} | {{Feature|informative|Visualization of Blocks & Tiles can be turned on from debug menu (holding {{Controls|Win|Alt}}), Render → Terrain menu → Block's/Tile's bounding boxes.}} | ||
<!-- | |||
TO BE CONFIRMED | |||
{{Feature|important| | {{Feature|important| | ||
Line 13: | Line 17: | ||
It is recommended (mandatory!) to place it at the 0,0,0 position! | It is recommended (mandatory!) to place it at the 0,0,0 position! | ||
}} | }} | ||
--> | |||
=== Vertex === | === Vertex === | ||
Line 35: | Line 40: | ||
A '''tile''' may consist of 1 up to 32 blocks. | A '''tile''' may consist of 1 up to 32 blocks. | ||
When the camera is close to a tile typically (if provided) | When the camera is close to a tile typically (if provided) super texture ("satellite texture"), normal map and surface mask (detail surfaces) are being drawn. These textures are mapped per tile. | ||
=== Terrain Grid Size === | === Terrain Grid Size === |
Revision as of 17:25, 20 June 2022
TerrainEntity (abbreviated as TE in this document), class GenericTerrainEntity, is responsible for the entire terrain system; rendering terrain mesh and its textures, collision, etc.
Internally, TE is split into blocks and tiles and supports TE supports non-rectangular shapes of terrain as well, by clicking on "="(equal sign) user may set different grid size for X and Z axis.
A world can have 0 to 1 terrain - multiple terrains (e.g in order to avoid terrain size limitation) is not supported.
Vertex
(Plural: vertices)
Block
A block is the smallest part of TE which gets LODed, as opposed to the Real Virtuality engine where terrain LODing was done on tiles level.
1 block = 1 draw call
Even though surface mask (for rendering detail surfaces) is split and mapped per tile, a limit of maximum 5 detail surfaces is being applied to blocks.
Enfusion engine currently supports 5 LODs per block.
Each block consists of 32x32 faces (33x33 vertices) down to 2x2 faces (3x3 vertices)
Tile
A tile may consist of 1 up to 32 blocks.
When the camera is close to a tile typically (if provided) super texture ("satellite texture"), normal map and surface mask (detail surfaces) are being drawn. These textures are mapped per tile.
Terrain Grid Size
Count of terrain faces in rows/columns, remember that 512 faces is 513 vertices, this necessary to keep in mind when importing heightmaps.
Grid Cell Size
Distance between two neighboring terrain vertices. The lower the value, the higher the detail of terrain.
Increasing/decreasing this value affects the final size of terrain.
Terrain Size
The terrain's total size is Terrain Grid Size multiplied by Grid Cell Size.
Heightmap
The terrain's heightmap is internally in 16 bits integer format and the height scale value is the difference between minimum delta, so e.g. difference between 100 and 101 in internal representation is 0.0315 as default.
This value shows the maximum possible height of terrain, 0.03125 × 65535
(the 16 bit value) = ~2048 meters range.
Changing this value affects elevation range (the vertical range of the terrain).
The lower the value, the higher the precision, but smaller vertical range (and vice-versa).