Image Based Lighting In UE3

"IBL"全称为"Image-based Lighint",是一种伪装全局光照的方法.使用该方法可以获得较好的视觉效果并且可以达到实时渲染的目的.
实现的方法之一就是首先捕获一张环境贴图,这张图可以是去真实世界中拿相机拍的(为了更好的效果,推荐使用HDR).也可以是游戏内相机实时渲染出来的.关于真实世界中拍环境图,可以参考Debevec的Blog中的信息.这张图拿到后,需要用诸如HDRShop或者其他商业与非商业类似功能软件处理,如果你的场景和光照是相对来说"非常静态地",可以把这个处理好的图,塞进cmftstudio处理成现成的数据贴图方便runtime时候直接使用.

关于算法方面,可以看看GPU Gems的第19章。主要思想就是,我们可以认为在封闭环境下(比如房间),环境贴图中包含了"空间内的GI"信息,所以我们可以很方便的使用cubemap计算出某个像素周边的GI权重并应用于计算结果.

这个是我在UE3中用自定义材质做的demo:

可以看到,用下IBL,随随便便胜过LocalLighting.

参考:

GPU Gems, Chapter19

Schlick, Christophe. 1994. "An Inexpensive BRDF Model for Physically-Based Rendering." Computer Graphics Forum 13(3), pp. 233–246. This article presents the Fresnel equation approximation widely used throughout the graphics industry—so widely used, in fact, that some programmers mistakenly believe the approximation is the Fresnel equation.

Paul Debevec provides a number of useful IBL tools and papers at Paul Debevec Home Page

Ramamoorthi, Ravi, and Pat Hanrahan. 2001. "An Efficient Representation for Irradiance Environment Maps." In Proceedings of SIGGRAPH 2001. This article on diffuse convolution using spherical harmonics is available online atAn Efficient Representation for Irradiance Environment Maps

posted on 2017-04-19 13:14  Meta.Grfx  阅读(777)  评论(0编辑  收藏  举报

导航