PRT和SH(转自http://blog.csdn.net/flying5/article/details/5048477)

来源:互联网 发布:淘宝出版物许可证 编辑:程序博客网 时间:2024/05/04 04:31
 最近因为开始做PRT(Precomputed Radiance Transfer),看了一些资料。wikipedia上的解释:
      Precomputed Radiance Transfer (PRT) is a computer graphics technique used to render a scene in real time with complex light interactions being precomputed to save time. Radiosity methods can be used to determine the diffuse lighting of the scene, however PRT offers a method to dynamically change the lighting environment.In essence, PRT computes the illumination of a point as a linear combination of incident irradiance. An efficient method must be used to encode this data, such as Spherical harmonics.
      When spherical harmonics is used to approximate the light transport function, only low frequency effect can be handled with a reasonable number of parameters. Ren Ng extended this work to handle higher frequency shadows by replacing spherical harmonics with non-linear wavelets.
 
      那么,PRT技术到底是什么呢?PRT技术能够实时重现面积光源下3D模型的全局光照效果。它通过对复杂的光线相互作用进行预计算来节省时间,提供了一种动态改变光照环境的方法。PRT本质上是通过入射光的线性组合来计算每个点的光照,用球面调和函数可以编码这些数据。
      PRT算法是采用球面光辐射传输映射方法在物体表面创建函数,把任意低频入射光的传输表示成辐射度传输, 其中包括阴影和交互反射。对光辐射传输单独进行预处理,在运行阶段, 这些转移函数应用到实际入射光中。光源和光辐射传输函数都用低频球谐波函数描述。在绘制过程中, 由于全局光照计算所需的光辐射传输函数信息都已经在预处理中获得, 而且该函数和光源分布函数都已经分解为正交函数序列, 因此最后的出射光强计算简化为两者的系数向量的点积, 这种方法绘制漫反射静态场景速度较快, 同时绘制了阴影, 相互反射等全局光照效果。

 

    有很多的paper,主要参考的是siggraph2005的course《Precomputed Radiance Transfer:Theory and Practice》。
 
    比较经典的一篇paper:《Spherical Harmonic Lighting》见:http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.html
   
    Effulgent的公开笔记:[高级光照]球谐光照(上),是对上面文章的前半部分的翻译,是国内能找到的很有限的资料http://www.paulsprojects.net/opengl/sh/sh.html (Spherical Harmonic Lighting Demo及openGL源代码)
   
    Spherical Harmonic Lighting Program (有openGL的完整源代码,实现的效果也不错,很有参考价值)
http://www.yasrt.org/shlighting/(Demo)
 
    一个日本人的网站,有对《Spherical Harmonic Lighting》这篇论文的实现代码:http://www.mokehehe.com/assari/index.php?Spherical%20Harmonic%20Lighting%3BThe%20Gritty%20Details

原创粉丝点击