• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2011, Vol. 33 ›› Issue (8): 102-105.

• 论文 • 上一篇    下一篇

基于Irrlicht引擎的实时浅水效果模拟

李一兵,张力学,孟霆   

  1. (哈尔滨工程大学信息与通信工程学院,黑龙江 哈尔滨 150001)
  • 收稿日期:2010-11-01 修回日期:2011-01-18 出版日期:2011-08-25 发布日期:2011-08-25
  • 作者简介:李一兵(1967),男,北京人,博士,教授,研究方向为计算机图形学、数字图像处理和信息融合技术。张力学(1985),男,黑龙江绥化人,硕士生,研究方向为计算机图形学和数字图像处理。孟霆(1973),女,黑龙江哈尔滨人,硕士,副教授,研究方向为计算机图形学和数字图像处理。
  • 基金资助:

    船舶工业国防科技预研项目 (10J3.1.6);哈尔滨市科技创新人才研究专项基金资助项目(2008RFQXG025)

船舶工业国防科技预研项目 (10J3.1.6);哈尔滨市科技创新人才研究专项基金资助项目(2008RFQXG025)

LI Yibing,ZHANG Lixue,MENG Ting   

  1. (School of Information Technology,Harbin Engineering University,Harbin 150001,China)
  • Received:2010-11-01 Revised:2011-01-18 Online:2011-08-25 Published:2011-08-25

摘要:

本文在Irrlicht引擎的基础上结合GLSL语言,对浅水的水面波动、反射与折射特性及菲涅尔现象进行了实时模拟。将基于Gestner波的水面波动与基于纹理波的动态法线贴图相结合,真实地模拟了水面的波动与波纹效果。同时,采用渲染到纹理技术实时生成反射贴图,准确地模拟了水面的反射效果,解决了采用环境贴图渲染时的反射失真问题。在不考虑水深的情况下,本文将菲涅尔权值与材质的alpha通道相结合,去掉了实时渲染中折射贴图的生成,在满足实时浅水效果渲染的视觉需求条件下,减小了CPU与GPU的计算量。

关键词: 浅水模拟, 法线贴图, 菲涅尔现象

Abstract:

This paper presents new algorithms on shallow water rendering based on the Irrlicht engine and the GLSL language. Combining the Gestner waves with the dynamic normal mapping based on texture waves,we get realistic water rendering including geometric undulation and ripples of the surface. At the same time, accurate reflection mapping can be obtained by rendering mirror reflection to texture on a per frame basis,compared with environment mapping the distortion resulted by view points is eliminated. Finally, by assigning the Fresnel weights to the material’s alpha channel, we can reduce the CPU and GPU computation load with the use of the refraction texture,and still it produces convincing effects.

Key words: shallow water rendering;normal mapping;Fresnel effect