Graphical Terrain Creation
Terrain objects are used to create the environment in which the simulated objects (vehicles, props, etc.) will interact. The following describes some techniques and best practices to create terrain files that function with optimal performance.
It is important to have a terrain that is stable and realistic to provide a simulated environment that reacts in a predictable way. The environment is typically divided so that the simulation physics runs efficiently. The main ground surface is the terrain; this limits the amount of physics being calculated.
Creation Guidelines
When creating a terrain, follow these guidelines:
- The surface must be polygonal.
- The surface should be flat or undulated to simulate a natural terrain.
- A terrain 3D model should be divided in tiles:
- Each tile should be no larger than 50x50 meters.
- The vertices of each tile should be placed uniformly and the triangles should not be thin.
- A thin triangle is defined as having a corner angle smaller than 3 degrees.
- No more than 64,000 vertices per drawable.
- Each tile should cover a small square area to optimize occlusion culling.
- Each tile should have one Albedo or Diffuse texture and may include Normal, Specular or Gloss maps.
- Terrain tiles on which the user cannot ride should be created as detail meshes.
- To build small outcroppings, river beds, cliffs or caverns, we recommend using detail meshes or static cultural objects instead of terrain tiles.
- Ideally, a scene should not contain more than eight physically-simulated terrain tiles.
- Each physically-simulated terrain tile should contain only one drawable.
- Eliminate t-vertices and remove any non-planar polygons (thin faces).
- These types of defects in the terrain interfere with the ray casting of the dynamic soil.
- This can cause the vehicle to fall through the ground or cause graphical flickers through these small gaps.
Cultural Objects
Cultural objects with collision geometries should be added to interact with the mechanisms and provide a barrier to encapsulate the main ground area. Ideally, the terrain should be designed so that it's a fully closed area, but it doesn't feel "forced." For example, blocking a road with cardboard box models set to "static" will look wrong in a tank simulation (in the real world, a tank would easily drive through or over), whereas a collapsed building makes more sense.
Add cultural objects, like distant houses, trees, or a horizon, at the perimeter of the scene. These do not have physics associated, nor do they interact with the mechanisms. These props are for visual realism and immersion only, to hint at a greater world beyond the simulated area.