0

Two questions:

  1. How do modern games set up their terrain vertices? Do they attach a height map image to a texture and then use it to set each vertex position, or do they just use a 3D software (like Blender) to create a file that contains these vertices and then read it to a VBO? Please correct me if my grasp is incorrect.

  2. How important are tessellation shaders to this process? Do they just save performance or do they also change the viewer's scene?

McLovin
  • 3,295
  • 7
  • 32
  • 67
  • Most open world games use a heightmap for the base terrain. (For e xample Battlefield) – dari Jan 06 '15 at 21:30
  • So they export a height map image using a 3D software, then read it in the application and bind it to a 2D texture, then use texture() in the vertex shader to determine each vertex position. Am I right? – McLovin Jan 06 '15 at 21:34
  • I don't know how they render the heightmaps, but accessing it in the vertex shader is an easy way to implement it. – dari Jan 06 '15 at 22:11
  • How do you know that Battlefield uses heightmaps? Also what's the recommended way to render heightmaps? – McLovin Jan 09 '15 at 18:37
  • A tessellation shader will allow for easier, dynamic levels of detail. – Dan Watkins Mar 03 '15 at 21:40

2 Answers2

0

The two most common I have seen are heightmaps, in which the RGB value is used for surface normal and the alpha value is used for heights, and procedural terrain generation using a method such as Perlin Noise, that use a random function and sample their surrounding vertices to even out the height.

Tesselation shaders are used primarily in decreasing workload by simplifying far away meshes in which you would not notice the extra detail. They do change the viewers scene, but in a way that is attempting to not be noticed.

0

Generally height are generated procedurally in shaders for vertices. By procedurally in computer graphics it means by some mathematics algorithm. Perlin noise is one of the methods for this procedural generation. There are several strategies keep the height map of small size and produce different heights using procedural method this is done as height map is texture and that uses bandwidth.

Tessellation shaders are used along for adaptive tessellation. You can think of it as some kind of level of detail mechanism. Smoothness of terrain depends upon how many triangles are used to represent patch on terrain. Depending on the distance of pixel from camera developers can decide what should be tessellation level on the fly and generate more triangles for patches close to user. This is way to improve details on the terrain. Everything here is happening on the GPU so its extremely efficient.

Previous to tessellation shaders were accessibe there were algorithms like ROAR which used to do adaptive tessellation on the CPU.

Please follow http://vterrain.org/ this project. You will see all state of the terrain techniques implemented here.