In recent years,virtual reality technology has developed rapidly,it will be used in more and more fields especially with the official commercialization of 5G.As an important application of virtual reality technology in the military field,the virtual battlefield can make full use of combat data such as battlefield terrain,building construction and other information by using computer modeling technology,and it will replace traditional training methods and become an important platform.On the one hand,military training can be conducted using virtual battlefields,which guarantees the safety of trainers and is not restricted by regions and climate.On the other hand,the virtual battlefield can be used to do experimental research on new battle plans and combat weapons,and to continuously improve tactics and weapons by simulating all possible situations.Nowadays,the war situation is becoming more and more diversified,which puts forward higher requirements for simulation accuracy and real-time performance of the battlefield environment.Therefore,the virtual battlefield environment based on Unity 3D engine is studied in this thesis.To create a realistic battlefield atmosphere,the details of the battlefield are described by dividing into the natural environments and combat entities.To improve the frame rate of the scene operation,some optimization algorithms are also used.The main research contents and research results of this thesis are as follows:The terrain visualization technology is studied.Aiming at the lack of reality and accuracy of 3D reconstruction technology and procedural generation technology,the method of virtual battlefield terrain based on real data and the terrain texture mapping technology are mainly studied in this theis.Due to the textures of the engine’s terrain system are stored into Splat Alpha,by the method of drawing Splat Alpha through the operations of satellite image classification,color merging and channel processing,and then replacing with high resolution textures can improve the authenticity of the terrain.The number of faces and vertices are optimized and the frame rate is improved by using light baking,occlusion culling,batch processing and GPU instantiation.The rain and snow weather system is also studied as the natural environment.Based on the mesh rendering,the model of rain and snow particles is simplified,and the state of the shader is updated every frame to draw the particle’s motion trajectory in the rain and snow scene.The snow accumulation effect is achieved by mixing with the original texture and the snow texture through shader.The rain ripples are simulated based on the particle system,which both enhances the realistic feeling of the rain and snow environment to a certain extent.In addition,the particle system is optimized to reduce the proformance comsumption.In the aspect of combat entities,the movement of tank is realized in this thesis.The wheel movement and track winding effects of tank are simulated successfully based on the ray detection and skeletal skinning technology.At the same time,the control module of the perspective switch and the launch module with special particle effects in the tank are also achieved.In addition,based on the finite state machine and pathfinding algorithm,a intelligent soldier battle system is realized.It gives soldiers certain visual and auditory perception capabilities through ray detection,so that soldiers can make autonomous decisions based on surrounding information.Finally,the scene made by this thesis is debugged through the Samsung Odyssey+ wearable device and the combat entities are tested in rain and snow scene.On the interface of testing scene,the real time running frame rate is displayed.The movement of the camera is controlled through key input.It shows that all parts of the scene are quite normal,and the frame rate is within a reasonable range,which strongly proves that the battlefield environment constructed is significant in some ways. |