Generation method of hand-drawn feature sketch virtual terrain based on improved generative adversarial network
The 3D virtual terrain generation is currently used in geography teaching and setting up relevant virtual scenes according to the teaching content,which can visually display the verification experimental conditions and results and enhance the universality of virtual geography experiments.In the field of digital twin smart city,traffic,and water simulation,constructing virtual terrain according to the real terrain can provide the basic environment for subsequent development and experiments.In military simulation,it can quickly build beyond the real scenes of extreme training environment,which has a key role in improving military training and enhancing combat capabilities.Hand-drawn feature sketches can express 3D virtual terrain under human subjective perception.Therefore,how to use hand-drawn feature sketches to build 3D terrain environment quickly and generate realistic virtual geographic environment is a hot spot and difficult point for the creation and development of geographic metaverse with virtual geographic environment as the core in the future.Although the traditional method of generating 3D virtual terrain provides an important reference for image cross-domain generation from hand-drawn feature sketch to virtual terrain,problems such as insufficient realism of the generated terrain remain.Especially when the terrain feature outline is too sparse,the generated terrain will have duplicate terrain blocks and grid artifacts.On this basis,a hand-drawn feature sketch virtual terrain generation method with improved generative adversarial network is proposed.The model is based on extracted data samples and hand-drawn sketch characteristics,and the input terrain feature information is involved in the sampling of each layer by improving the generator U-Net network,which enhances the control role of terrain features in the invisible space,reduces the possibility of model collapse,increases the random noise input,and improves the realism of the generated terrain,especially the detail when the terrain feature elements in the sketch are sparse.L1 loss(mean absolute value error function)and L2 loss(mean variance error function)are combined to form smooth L1 loss,and then optimized with CGAN loss function to form a new generator loss function to improve the stability and efficiency of model training.The Digital Elevation Model(DEM)data of some areas of the Loess Plateau with high accuracy is selected to produce data.The DEM data with high accuracy are selected and used for model training to compare and evaluate the terrain generation enhancement effect quantitatively before and after model improvement.Finally,the model inference process from hand-drawn feature sketch to virtual terrain is completely constructed.The experimental results show the improved virtual terrain generation model with the Loess Plateau terrain data can represent the hand-drawn feature sketch well,and the generated terrain conforms to the distribution and orientation of the terrain features described in the sketch,especially in the case of sparse sketch,and the generated terrain has high realistic surface details.This model is applied to the real natural landscape display and terrain evolution,and it can meet the user's needs to obtain the virtual terrain with high realistic feeling after inputting the hand-drawn terrain feature sketch.This improved model proposed in this paper has good prospects for 3D terrain modeling and editing.