Terrain: Terrain Entity – Arma Reforger
Lou Montana (talk | contribs) m (Some cleanup) |
Lou Montana (talk | contribs) m (Fix Wikipedia link) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
TerrainEntity | TerrainEntity, class {{hl|GenericTerrainEntity}}, is responsible for the entire terrain system; rendering terrain mesh and its textures, collision, etc. | ||
The terrain is split into blocks and tiles; TerrainEntity supports non-square shapes of terrain as well; it is possible to set different grid size for X and Z axes. | |||
A world can have 0 to 1 terrain - multiple terrains (e.g in order to avoid terrain size limitation) is not supported. | A world can have 0 to 1 terrain - multiple terrains (e.g in order to avoid terrain size limitation) is not supported. | ||
{{Feature|informative|Visualization of Blocks & Tiles can be turned on from | {{Feature|informative|Visualization of Blocks & Tiles can be turned on from [[Arma Reforger:Diag Menu|Diag Menu]] (holding {{Controls|Win|Alt}}), Render → Terrain menu → Block's/Tile's bounding boxes.}} | ||
<!-- | <!-- | ||
Line 22: | Line 22: | ||
(Plural: '''vertices''') | (Plural: '''vertices''') | ||
{{Feature|informative|See {{ | {{Feature|informative|See {{Link|https://en.wikipedia.org/wiki/Vertex_(geometry)}}.}} | ||
=== Block === | === Block === | ||
A '''block''' is the smallest part of | A '''block''' is the smallest part of the TerrainEntity which gets LODed, as opposed to the [[Real Virtuality]] engine where terrain LODing was done on tiles level. | ||
1 block = 1 draw call | 1 block = 1 draw call | ||
Line 59: | Line 59: | ||
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. | 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, {{ | This value shows the maximum possible height of terrain, {{hl|0.03125 × 65535}} (the 16 bit value) = ~2048 meters range. | ||
Changing this value affects elevation range (the vertical range of the terrain). | Changing this value affects elevation range (the vertical range of the terrain). |
Latest revision as of 01:08, 24 February 2023
TerrainEntity, class GenericTerrainEntity, is responsible for the entire terrain system; rendering terrain mesh and its textures, collision, etc.
The terrain is split into blocks and tiles; TerrainEntity supports non-square shapes of terrain as well; it is possible to set different grid size for X and Z axes.
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 the TerrainEntity 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).