摘要
为实现虚拟交通场景中的降雨实时仿真,设计出一种基于OpenGL的降雨仿真模型。现有雨的仿真模型主要关注降雨过程,而在虚拟交通环境中,通常还需要对雨滴在挡风玻璃上的运动进行仿真。利用OpenGL将场景渲染到纹理,运用几何方法计算雨滴粒子并将其映射到网格化的虚拟挡风玻璃平面,采用贴纹理的方法将纹理映射到虚拟挡风玻璃平面,建立了雨滴在挡风玻璃平面的仿真模型。实践表明,该方法的时间开销与场景、光照等因素无关,仅与车辆挡风玻璃上的雨滴数量相关。该方法在普通PC实验平台上渲染场景的帧速率超过25帧/秒,能够成功实现雨滴的实时仿真。
In order to realize real-time rainfall simulation in virtual traffic scene, this paper designed a rainfall simulation model based on OpenGL.Existing rain simulation methods mainly focused on rainfall process, but in virtual traffic environment, simulation movement of raindrops on windshield is needed.This paper rendered the scene to texture by OpenGL, computed raindrop particles through geometric methods and mapped them to meshes which generated by gridding virtual windshield plane, and adopted texture paste method to mapped texture to virtual windshield plane ,established a simulation model of raindrops which glued on windshield plane. Practice shows that the overhead time of this method is only related to the number of raindrops on the windshield, it is irrelevant to the scene, light and other factors.This method simulates raindrops in real-time successfully,it has more than 25 F/s frame rate when rendering the scene in the general PC platform.
出处
《电子设计工程》
2010年第3期68-70,共3页
Electronic Design Engineering
关键词
实时仿真
虚拟交通环境
降雨仿真
real-time simulation
virtual traffic environment
raindrops simulation