球谐光照在高度场渲染中的应用
2016-02-19赵克胜倪桂强罗健欣
赵克胜+倪桂强+罗健欣



DOI:10.16644/j.cnki.cn33-1094/tp.2016.02.010
摘 要: 为提高高度场渲染的真实感,增加视觉观察的准确性,提出了使用球谐光照渲染高度场的方法。使用OpenGL图形接口进行实验程序开发,采用Puget Sound高度图作为原始数据,利用对比实验说明球谐光照在高度场渲染中对渲染效果、渲染效率的提升。对比结果表明,将球谐光照用于高度场渲染可以有效增强高度场真实感。
关键词: 高度场渲染; 球谐光照; 蒙特卡洛积分; 关联勒让德多项式
中图分类号:TP391.41 文献标志码:A 文章编号:1006-8228(2016)02-33-05
Terrains rendering with spherical harmonic lighting
Zhao Kesheng, Ni Guiqiang, Luo Jianxin
(Laboratory of Military Network Technology, PLA University of Science and Technology, Nanjing, Jiangsu 21007, China)
Abstract: In order to improve the sense of reality of terrains rendering and the accuracy of visual observation, a method of rendering terrains with spherical harmonic lighting is proposed. In the experiment, the OpenGL graphics interface is used as the development environment and the Puget Sound terrains as the raw data. The advantage of terrains rendering with spherical harmonic lighting in rendering quality and efficiency is described by the comparative experiment. The result shows that spherical harmonic lighting can improve the rendering quality of terrains rendering.
Key words: terrains rendering; spherical harmonic lighting; Monte-Carlo integration; associated Legendre polynomials
0 引言
近年来球谐(Spherical Harmonic)在光照、BRDF、形状识别等计算机图形学领域内被广泛使用[1]。球谐光照[2-5]是利用球谐计算3D模型上光照的技术,它可以实时地渲染出全局光照模式的图像[6]。相对于光线追踪[7]、辐射度算法[8]等光照技术,球谐光照具有渲染效果好、实时性强、代码易编写等优点。
高度场渲染在模拟飞行、虚拟战场三维游戏等领域都有着广泛应用[9]。通过对高度场场景模型加入光照效果将会大大增强结果图像的真实感[10],为交互可视化和视觉观察提供很大的便利。由于高度场本质上也是3D模型,所以本文研究了将球谐光照应用于高度场渲染,并对其优缺点进行了分析。
1 球谐光照
1.1 光照计算
图1所示为自然界中的某个光照场景,光线自左侧传播至x处,经物体反射至x'处。此时观察者于x'观察到的x点的颜色由两部分组成:一部分为x点本身发射出的沿xx'方向的光的颜色,另一部分为入射光线于x处经物体反射至x'处的光的颜色。……
