terrain_lod
Determines the levels of detail (LOD) and cache behavior
of chunked
terrain.
The terrain cache swaps terrain to and from video memory
and reduces the memory requirement for huge terrains. LOD levels render
terrain chunks in reduced resolution dependent on their distances to the
camera, and thus can increase the frame rate for huge terrains.
Range:
0 = Disable terrain cache and LOD (default).
1 =
Enable terrain cache, disable LOD.
2..4 = Enable terrain cache with 2..4 LOD levels.
Type:
var
Remarks:
-
This variable must be set before loading the terrain, and affects
chunked terrain only.
- Only OBB collision detection works with the terrain cache. AABB collision
detection requires uncached terrain.
- When LOD is activated, chunk sizes are automatically set to a multiple
of 8.
- LOD levels are automatically generated when loading the terrain; every
level has half the resolution of the previous level. The seams between chunks
of different resolution are patched with connecting polygons. LOD levels
can be observed by pressing [F11]
twice.
Edition
A7.05
P
Example:
terrain_lod = 4; // enable terrain LOD
terrain_chunk = 40;
level_load("myterrain.hmp");
See also:
Terrain, terrain_chunk, detail_size