| Three-dimensional terrain is an indispensable part of three-dimensional virtual scenes,which is widely used in three-dimensional simulation,virtual reality,simulation training,game engine and other application scenarios.How to generate user-controllable and highly realistic terrain has always been a challenging topic in the field of graphics.In the terrain generation method,the classical method based on fractal theory and physical erosion provides users with few control means,and the user cannot control the overall distribution characteristics of the terrain,and it is difficult to generate the desired terrain.Although the sample-based synthesis method can overcome these shortcomings to a certain extent,it is easy to fail in matching and overlap the details in the process of feature block matching.The method based on antagonistic generation network can obtain terrain with high realistic and free controllability,but it needs a large number of training samples and time-consuming training work,and it is difficult to generate terrain with different styles.The existing terrain generation method based on texture synthesis and transformation uses hand-painted ridge lines to control the terrain features,although its terrain is consistent with the trend of the ridgeline in the global structure,the results in the valley region are not ideal.In response to the above problems,the thesis proposes a terrain generation method based on sample and feature sketches.Users can quickly generate three-dimensional terrain with different styles by providing ridge and valley line sketches and reference terrain maps with different characteristics.The main work done in this paper is summarized as follows:1.The basic principle and generation process of the existing terrain map generation method based on texture synthesis and transformation are analyzed in depth.According to the experimental results,the problems existing in the terrain generation process are analyzed.2.The distance measurement method for the original algorithm can not accurately describe the spatial distribution law of the terrain height field,an adaptive search range distance measurement algorithm is proposed in this paper.Then the objective function involved in the process of terrain map generation is improved,so that the improved method can generate three-dimensional terrain with different regional styles in a shorter time.3.When generating natural terrain,the synthesis process is guided by introducing ridgeline and valley line sketches,which solves the problem of redundant texture in the area near the valley and the problem of incomplete splicing of adjacent areas.4.Using the distance-based result graph synthesis algorithm to synthesize the result map generated based on the ridgeline and the result map generated based on the valley line,so that the resulting terrain map is closer to the original natural terrain.5.The method of this thesis is experimentally demonstrated from five different angles,and some terrains are rendered in three dimensions.Then the time performance of the algorithm before and after the improvement is compared and analyzed,which proves the efficiency of the paper method.Finally,the DEM-based terrain generation method is compared in the synthesis effect,which proves that the terrain generated by this method has no matching failure and too much repetition of details.By comparing the experimental results,it can be found that the method of the thesis can not only generate three-dimensional topography of different regional styles according to the same ridge line or valley line sketch in a short time,but also produce natural terrain better than the existing sample-based method or the method based solely on ridge line or valley line. |