摘要
摘要
随着信息时代的发展,虚拟仿真技术取得了长足的进步,人们可以沉浸在通过虚拟仿真技术构建的三维世界当中,可以直接与虚拟世界中的对象进行交互,通过虚拟仿真获得需要的数据和资料。战场场景仿真是虚拟仿真技术在军事上一个非常重要的应用,常规的军事训练和军事演习往往耗费巨大且流程复杂,费效比较高。而通过虚拟仿真技术对战场场景进行模拟,并以可视化的、生动逼真的三维场景显示出来,实验人员可以方便、快捷、直观的对作战过程和细节进行观察,同时可以计算和获取到相应的实验数据,大大节省了时间和成本,具有非常重大的应用意义。
Unity是由英国Unity Technologies公司开发的一个集游戏开发、实时三维动画创建、建筑可视化等功能的跨平台的开发工具。Unity以其酷炫的3D渲染效果和强大的跨平台性闻名,它可以轻松的开发出绚丽逼真的3D内容,然后一键发布到多种平台上。本文主要利用Unity3D结合虚拟仿真技术开发了一个虚拟仿真可视化实验平台,对战场场景和导弹武器的作战过程进行模拟和可视化显示,并进行相应科研数据的计算。
本文对Unity软件的基本模块、主要特性和开发框架进行了详细的介绍,系统阐述了虚拟仿真可视化实验平台的系统需求和难点,包括数学模型的选择、对系统数据计算能力的要求、实时数据更新、场景可视
化等。介绍了系统模块化、层次化、跨平台的设计思想,对系统各个层次包括基础层、管理层、功能层的功能进行了详细的介绍。并对系统的主要开发工具、开发语言、注意事项进行了说明,着重介绍了可视化部分的模块设计,并对模型的创建和导入过程,包括模型格式、坐标系以及尺寸的转换进行了详细的介绍。对可视化场景中相机视角、动态信号、碰撞检测、特效模拟等功能模块的实现方法和实现过程进行了阐述,并对场景控制模块,包括视角变换、帧控制和实时截图等功能进行了说明。
文章最后对系统基于TCP的网络通信模块进行了介绍,阐述了授权服务器和非授权服务器的概念,对两种服务器模式的优缺点进行了比较。对客户端和服务器的底层通信方式远程过程调用和状态同步进行了说明,详细介绍了客户端与服务器的建立和通信过程,包括客户端与服务器的主要函数以及服务器端多线程技术的应用。
关键词:虚拟仿真,可视化,Unity3D,战场场景,TCP
ABSTRACT
ABSTRACT
With the development of the information age, virtual simulation technology has made great progress, people can immerse in the virtual world through the virtual simulation technology, which can directly i
nteract with the objects in the virtual world, through the virtual simulation to obtain the necessary data .The battlefield scene simulation is a very important application of the virtual simulation technology in the military. Conventional military training and military exercises are costly and complicated. To simulate the battlefield scene by the virtual simulation technology and display the three-dimensional scene vividly and realistically. The experimenter can observe the combat process and details conveniently, quickly and intuitively. At the same time the experimenter can calculate and obtain the corresponding experimental data. It can significantly save time and cost, has a very significant application significance.
The Unity is a cross-platform development tool developed by Unity Technologies, which integrates game development, real-time 3D animation creation, and building visualization. Unity is known for its cool 3D rendering and powerful cross-platform, it can easily develop a brilliant and realistic 3D content, and then a key release to a variety of platforms. In this paper, a virtual simulation visualization platform is developed by using Unity3D and virtual simulation technology. The combat process of battlefield scene and missile weapon is simulated and visualized, and the corresponding scientific data are calculated.
In this paper, the basic modules, main features and development framework of Unity software are int
roduced in detail. And this paper systematically describes the system requirements and difficulties of virtual simulation visualization platform, including the selection of mathematical model, the requirement of system data computing ability, real - time data update and scene visualization. This paper introduces the design idea of modularization, hierarchy and cross platform of the system, and introduces the functions of each layer of the system, including the basic layer, management layer and function layer. And the main development tools of the system, the development language, notes were described. The module design of visualization part is introduced. And the creation
of the model and the introduction process, including the model format, coordinate system and the size of the conversion are introduced in detail. In this paper, the realization method and the realization process of the camera visual angle, dynamic signal, collision detection and special effect simulation are discussed. And the scene control module, including the perspective transformation, frame control and real-time screenshots and other functions are described.
At the end of this paper, the network communication module of the system is introduced, the concept of authorization server and unauthorized server is expounded, and the advantages and disadvantag
es of the two server modes are compared. This paper describes the remote process call and state synchronization of the underlying communication mode between client and server, and introduces the establishment and communication process of client and server in detail, including the main function of client and server and the application of server-side multi-threading technology.
Keywords:virtual simulation,visualization, Unity3D,Battlefield scene,TCP
插图索引
插图索引
图2.1 Unity组成模块 (8)
图2.2 Unity支持的21种平台 (10)
图2.3 Unity框架结构图 (11)
图3.1 可视化虚拟仿真实验平台模块设计 (18)
图4.1模型格式转换流程 (22)
图4.2右手坐标系 (22)
图4.3左手坐标系 (22)
图4. 2 Scale Factor (23)
图4. 3 显示单位 (24)
图4. 4 系统单位 (24)
图4.5添加光源前的场景俯视图 (25)
图4.6添加光源后场景俯视图 (25)
图4.9添加天空盒前的场景 (26)
图4.7添加天空盒后的场景 (26)
图4.11 Smooth Follow脚本 (28)
图4.8信号模型 (28)
图4. 13动态信号效果图 (29)
图4. 14 导航地图相机参数 (30)
图4.15 导航地图效果图 (31)
图4.16 导弹添加胶囊碰撞体后效果图 (31)
图4.17 飞机添加胶囊碰撞体后效果图 (31)
unity3d animation图4.18 导弹尾焰 (33)
图4.19 飞机尾焰 (33)
图4.20 导弹引爆 (33)
图4.21 飞机爆炸起火 (33)
图4.22 粒子发射器 (34)
图4.23 粒子动画器 (34)
图4.24 粒子渲染器 (34)
图4.25 视角拉远 (35)
图4.26 视角拉近 (35)
图4.27 前视效果 (35)
图4.28 后视效果 (35)
图4. 29 GUI界面 (37)
图4. 30 Unity程序发布界面 (38)
图5.1 授权服务器 (42)
图5.2 非授权服务器 (43)
图5.3 客户端建立流程图 (44)
图5.4 TCP连接成功后的消息窗口 (45)
图5.5 多线程服务器建立流程图 (46)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论