摘要
为解决现有航海模拟器视景系统中对太阳及镜头光晕的模拟不完善、无法显示太阳、不能控制太阳及镜头光晕效果等问题,提出基于OpenGL和Cg绘制太阳及镜头光晕的方法.讨论光晕分布、纹理及融合等技术,并引入光晕边界的概念,实现光晕的淡入淡出.采用光线投射方法判断太阳与其他物体的遮挡关系,解决了z缓冲区方法无法判断视见体外物体的可见性问题,并利用顶点着色器技术对该方法进行优化.结果显示,该法简单,易于实现,绘制效果真实,满足航海模拟器对视景系统的实时性和逼真度要求.
A new method of rendering the sun and lens flare based on OpenGL and Cg was presented to make up the imperfections which the sun was not rendered and the effect of lens flare could not be controlled in present marine simulator. The techniques were discussed including the flare's distribution, texture and blending. A conception of flare border was applied to achieve the fade-in and fade-out of lens flare. When the sun was between the flare border and the screen border, the flare's intensity was varying. As zbuffer algorithm could not judge the visibility of objects which is outside viewing volume, the ray casting algorithm was adopted to solve the visibility of the sun. The algorithm has been implemented within vertex shader, and can meet the real-time requirements of marine simulator.
出处
《大连海事大学学报》
EI
CAS
CSCD
北大核心
2007年第2期124-128,共5页
Journal of Dalian Maritime University
基金
国家"973"计划基金资助项目(2002CB312103)