PRT(Precomputed Radiance Transfer)球谐光照(Spherical Harmonic Lighting)
??最近因?yàn)殚_始做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技術(shù)到底是什么呢?PRT技術(shù)能夠?qū)崟r(shí)重現(xiàn)面積光源下3D模型的全局光照效果。它通過對復(fù)雜的光線相互作用進(jìn)行預(yù)計(jì)算來節(jié)省時(shí)間,提供了一種動(dòng)態(tài)改變光照環(huán)境的方法。PRT本質(zhì)上是通過入射光的線性組合來計(jì)算每個(gè)點(diǎn)的光照,用球面調(diào)和函數(shù)可以編碼這些數(shù)據(jù)。
??????PRT算法是采用球面光輻射傳輸映射方法在物體表面創(chuàng)建函數(shù),把任意低頻入射光的傳輸表示成輻射度傳輸, 其中包括陰影和交互反射。對光輻射傳輸單獨(dú)進(jìn)行預(yù)處理,在運(yùn)行階段, 這些轉(zhuǎn)移函數(shù)應(yīng)用到實(shí)際入射光中。光源和光輻射傳輸函數(shù)都用低頻球諧波函數(shù)描述。在繪制過程中, 由于全局光照計(jì)算所需的光輻射傳輸函數(shù)信息都已經(jīng)在預(yù)處理中獲得, 而且該函數(shù)和光源分布函數(shù)都已經(jīng)分解為正交函數(shù)序列, 因此最后的出射光強(qiáng)計(jì)算簡化為兩者的系數(shù)向量的點(diǎn)積, 這種方法繪制漫反射靜態(tài)場景速度較快, 同時(shí)繪制了陰影, 相互反射等全局光照效果。
????有很多的paper,主要參考的是siggraph2005的course《Precomputed Radiance Transfer:Theory and Practice》。
????比較經(jīng)典的一篇paper:《Spherical Harmonic Lighting》見:http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.html
????Effulgent的公開筆記:[高級光照]球諧光照(上),是對上面文章的前半部分的翻譯,是國內(nèi)能找到的很有限的資料http://www.paulsprojects.net/opengl/sh/sh.html (Spherical Harmonic Lighting Demo及openGL源代碼)
????
????Spherical Harmonic Lighting Program (有openGL的完整源代碼,實(shí)現(xiàn)的效果也不錯(cuò),很有參考價(jià)值)
http://www.yasrt.org/shlighting/(Demo)
?
????一個(gè)日本人的網(wǎng)站,有對《Spherical Harmonic Lighting》這篇論文的實(shí)現(xiàn)代碼:http://www.mokehehe.com/assari/index.php?Spherical%20Harmonic%20Lighting%3BThe%20Gritty%20Details
總結(jié)
以上是生活随笔為你收集整理的PRT(Precomputed Radiance Transfer)球谐光照(Spherical Harmonic Lighting)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 遗传算法与C++实现
- 下一篇: 直接线性变换(DLT)求解单应性矩阵