摘要
为了解决传统雨天三维场景绘制速度慢、效率低、效果差等实际工程应用问题,基于粒子系统,从雨滴的生成、运动到雨滴落地的整个过程,提出了一种大规模雨天环境的渲染方法。该方法采用Transform Feedback技术对雨滴的运动进行绘制,实现了雨滴着色、飞溅水花、动态涟漪等渲染效果,利用OpenGL的离屏渲染特性,采用程序化的方法,根据一张纹理,持续地生成一张新的、有动画圆圈的、代表涟漪的法向量纹理,实现了动态涟漪的算法流程。通过雨滴的分布状态、雨滴的运动和雨滴的尾迹现象三方面的分析,实现了雨滴在透明玻璃表面的形成效果。最后,使用一张路面纹理mask,高度限制在[0,1],实现了路面积水渲染效果,并给出了着色算法。
In order to solve the practical engineering application problems such as slow rendering speed,low efficiency and poor effect of traditional 3D scene in rainy day,this paper proposes a method of rendering large-scale rainy day environment about the generation and movement of raindrops to simulate the whole process of raindrops landing.Based on the particle system,this paper presents a rendering method of large-scale rainy environment,from the generation and movement of raindrops to the whole process of raindrops landing.This method uses transform feedback technology to draw the movement of raindrops,realizes the rendering effects of raindrop coloring,splashing water,dynamic ripples and so on.Using the off-screen rendering characteristics of OpenGL and the programmed method,according to a texture,continuously generates a new normal vector texture representing ripples with animation circles,and realizes the algorithm flow of dynamic ripples.Through the analysis of the distribution,movement and wake of raindrops,the formation effect of raindrops on the surface of transparent glass is realized.Finally,this paper uses a pavement texture mask,the height is limited to[0,1],and realizes the water rendering effect of the road area,and gives the coloring algorithm.
作者
刘剑超
林亚军
王述运
董斐
LIU Jian-chao;LIN Ya-jun;WANG Shu-yun;DONG Fei(Flight Simulation Training Center of Trainer, Naval Aviation University, Huludao 125001, China)
出处
《指挥控制与仿真》
2020年第5期70-75,共6页
Command Control & Simulation
基金
国家自然基金重点项目(61632003)
国家自然基金与新加坡国家基金会合作项目(61661146002)。
关键词
雨滴
粒子
着色算法
纹理
raindrops
particles
coloring algorithm
texture