In the process of terrain generation, the simplest method is to build a terrain with a number of height charts. This method is also called the brute force method.
Generation Process:
1. Prepare a texture. The data is encoded as the height. You can also encode the coordinates on the ultra-plane of the vertical and height axes. This figure uses a x texture. The format is raw. I only saved the height value in it.
2. Read the texture and set the height value based on the data format.
This method is very simple, that is, to convert a plane to a different surface based on an additional height information ".
However, this method depends on a file that stores height data or a texture that dynamically generates height information. However, in large terrain, this operation is time-consuming. This is also one of the reasons for the time consumption.
Therefore, this method is generally used for entertainment and is not very practical. However, if it is a very tiny thing, it is very simple and fast to use this method, and it is convenient to use ^_^ ~