针对已有光影技术在海洋虚拟现实场景领域应用不足,文中从海洋虚拟场景构造及海面光影动态渲染两部分,实现了海面及其周边环境不同时刻的光线明暗模拟。利用GPU的可编程绘制流水线,采用CG编程语言,将OpenGL光照模型计算、ShadowMap算法及PCF算法应用到场景中,实现多类型光源下的全天候24小时海面场景光影动态渲染。实验结果表明,该研究适用于动态海面的真实感绘制,海面光影渲染效果真实且具有良好的交互性、动态性,可广泛应用于海洋虚拟现实领域。
Aiming at the shortage of virtual reality lighting and shadow rendering effect of ocean scene,realize the multi-time dynamic lighting simulation of ocean scene including the virtual ocean scene building and dynamic sea surface lighting-shadow rendering. Using the GPU programmable rendering pipeline and CG programming language,the research applies OpenGL illumination model,ShadowMap algorithm and PCF algorithm to the scene for simulating the lighting-shadow scene under multi-lights in 24 hours. The experimental re-sults show that,the rendering of the sea shadow effect is real,interactive and dynamic,so it can be widely used in the field of ocean virtu-al reality.