# What is “terrain mesh generation” exactly?

I'm new to computer graphics and need to know and understand what the "terrain mesh generation" is? I read about "terrain", "mesh", "terrain generation" but can't find an article named "terrain mesh generation". So is there anyone can explain "terrain mesh generation" ?

• it´s only a system for generating the terrain mesh. In other words: Mesh = a collection of vertices and polygons. Terrain = a collection of meshes for a terrain. So in this case it only generates a lot of meshes that builds up the terrain. – Tordin Sep 16 '13 at 11:07

Terrain mesh generation is a general term for the process of... generating a mesh for the terrain.

Ok, let me elaborate.

A mesh is a generic term for a 3D model. It usually consists of vertex positions (set up as triangles), normals, texture coordinates and other information required to render the model properly. If you don't know how meshes work, you need to look into this first - this is part of the very basics of 3D rendering.

So, if a mesh is just a 3D model, why are terrains so special? For several reasons.

Terrains are usually not edited entirely by hand. Even if you want to design a specific part of your terrain by hand, most of it will be procedural (computer generated based on certain inputs). This is also important because terrains can be very large (pseudo-infinite), so creating it by hand is even less feasible. Proceduralism is a great form of compression: even infinite (or really large) terrains can be compressed down to a few integers.

Terrains also have another important property: most of the time you cannot go under them, so they can be described as a surface instead of a volume. The most common representation of this is the height-map: for each coordinate, you define the height of the terrain. This heigh-map can be procedurally generated, manually edited, infinite or finite. The heightmap also implicitly holds the surface normals.

So the process of terrain mesh generation most often refers to the process of taking the "compressed", procedural, perhaps height-mapped representation of the terrain and turning it into a 3d mesh. Of course the exact procedure depends on the system: you can generate only a few chunks of the terrain that is visible to the camera, you can have a dynamic LOD/tessellation system that makes the most visible parts more detailed than the rest, etc. So it really is just a generic term.

A mesh is a collection of points, usually connected into triangles, that form a shape in a (typically) 3-dimensional space.

A terrain mesh is a shape that is formed to resemble some terrain a video game or simulation; it can represent a landscape or even a whole planet.

So, generation of such mech involves creation of such vertices. There's a number of techniques used, such as Simplex/Perlin noise functions, that can be used to produce nicely-looking "Earth-like" terrain with minimal seed data. The term grabs all these methods and the result representation.