簡易檢索 / 詳目顯示

研究生: 林郁凱
Yu Kai Lin
論文名稱: 使用OpenCL實現互動式光子映射
Interactive Photon Mapping in OpenCL
指導教授: 張鈞法
Chang, Chun-Fa
學位類別: 碩士
Master
系所名稱: 資訊工程學系
Department of Computer Science and Information Engineering
論文出版年: 2014
畢業學年度: 102
語文別: 中文
論文頁數: 29
中文關鍵詞: 光線追蹤光子映射全域照明平行運算OpenCL異質系統架構
英文關鍵詞: Ray Tracing, Photon Mapping, Global Illumination, Parallel Computing, OpenCL, Heterogeneous System Architecture
論文種類: 學術論文
相關次數: 點閱:121下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 近年來圖形處理器運算能力大幅增加,其應用紛紛走向通用圖形處理器的發展模式,藉由圖形處理器多個計算單元平行化計算的能力,可使運算效率顯著的提升,在各家廠商的支持下亦發展了開放式計算語言平台,使得在圖形處理器上設計程式的功能便利許多,並能夠有效率地處理 3D 圖學所需的大量運算。
    為了使 3D 場景的繪製達到更逼真的畫質,至今已經發展了許多不同的演算法以模擬真實環境的光照情形,其中,光線追蹤方法擁有數學運算的正確性並能夠直覺性地計算光照效果,若搭配光子映射所具備的環境照明資訊,則具備繪製出擬真畫質的潛力,但是,由於需要非常龐大的計算量,使用傳統的架構都有速度上的限制,因而必須對畫面品質與渲染速度做出抉擇。幸運地是,光線追蹤演算法具有容易平行化計算的特性,可對所渲染畫面中的每一個像素平行地計算出光照色彩,利用此一特性,配合最近蓬勃發展的通用圖形處理器之能力,可得到大幅度的效能提升。
    本研究渲染的對象為靜態場景,利用 OpenCL 能夠在異質系統架構中平行且良好地運作之特性,我們在現今常用的裝置實現光線追蹤以及光子映射演算法,並將重點著重於可行性的探討與提升程式效能,針對所使用的平台進行實驗結果比較以及影響效能的相關探討,最後,我們將因應平台特性將演算法與之結合,試圖找出在多核心平行化架構下提升各平台程式效能的實驗依據,並且針對光子映射演算法進行改良,使其能更加符合平行化架構特性,快速渲染出具備全域照明品質的畫面。

    In recent years, the computing power of graphics processor has increasedgradually, and the GPGPU application model is more popular now. The ability of parallelcomputing in graphics processors can significantly enhance computing efficiency. Andthe support of various vendors to open computing language (OpenCL) platform, leadsto convenient features and the ability to handle memory using multiple layers withdifferent bandwidth. Also, OpenCL is a good interface for the heterogeneous systemarchitecture (HSA) implementations because it naturally supports cross-platform andparallel programming of modern processors.
    In order to improve the image quality, a number of different algorithms have beendeveloped to simulate real-world ighting situations in 3D rendering, where the math correctness of ray tracing and the ability to calculate various lighting effects have been proved. By using the information of the illumination environment such as photon map, the image quality will get more close to photo-realistic image. However, we must make a choice between render speed and image quality on traditional architecture because the
    huge amount of calculation. Fortunately, the ray tracing algorithms have parallel computing feature, which can render each pixel on the screen in parallel. We take advantage of this feature to obtain a significant performance boost on GPGPU platforms.
    In this research, we render static scene and focus on fast rendering and global illumination effects. We implement ray tracing and photon mapping algorithms on today's commonly used devices in OpenCL and analysis the characteristics of the algorithms to adjust to OpenCL platform. We also focus on the feasibility to enhancing program performance by some experimental results and try different way to make improvements for the photon mapping algorithm.

    摘要 ..................................................... I 關鍵字 ................................................... I Abstract ................................................ II Key Words ............................................... II 目 錄 ................................................... III 附圖目錄 ................................................. V 附表目錄 ................................................. VI 第一章 緒論 .............................................. 1 1.1 背景 ................................................. 1 1.2 研究動機 ............................................. 1 1.3 研究目標 ............................................. 2 1.4 論文架構 ............................................. 2 第二章 文獻探討 .......................................... 3 2.1 Global Illumination .................................. 3 2.1.1 Ray Tracing ........................................ 3 2.2 Photon Mapping on GPGPU .............................. 4 2.2.1 Photon Emission .................................... 4 2.2.2 Final Gathering .................................... 4 2.3 OpenCL Platform ...................................... 5 2.3.1 Execution Model .................................... 5 2.3.2 Memory Model ....................................... 6 第三章 系統實作 .......................................... 7 3.1 Ray Tracer ........................................... 8 3.1.1 Shadow Ray ......................................... 9 3.1.2 Phone Shading ...................................... 9 3.2 K-D Tree ............................................. 9 3.2.1 Construction Method ............................... 10 3.2.2 Traversal Function ................................ 11 3.3 Photon Emission ..................................... 12 3.4 Final Gathering ..................................... 12 3.4.1 Basic Method ...................................... 13 3.4.2 Tile Gathering .................................... 13 第四章 實驗結果分析 ..................................... 15 4.1 K-D Tree ............................................ 15 4.1.1 Thread Divergence ................................. 16 4.2 Cross-Platform ...................................... 17 4.3 Gathering Method .................................... 18 4.3.1 Tiled Method ...................................... 19 4.3.2 Number of Photons ................................. 20 4.4 Global Illumination ................................. 21 4.4.1 Reflection and Refraction ......................... 22 4.4.2 Caustic ........................................... 22 第五章 結論與未來研究 ................................... 24 附錄 .................................................... 26 參考文獻 ................................................ 28 其他參考資料 ............................................ 29

    [Foley 05] FOLEY, T., AND SUGERMAN, J. 2005. Kd-tree acceleration structures fora GPU ray tracer. In Proceedings of Graphics Hardware.
    [Horn 07] HORN, D. R., SUGERMAN, J., HOUSTON, M., AND
    HANRAHAN, P. 2007. Interactive k-d tree GPU ray tracing. In Proceedings of Symposium on Interactive 3D graphics and Games, 167-174.
    [Jensen 96] JENSEN, H. W. 1996. Global illumination using photon maps. In rendering techniques, Springer -Verlag, London, UK, 21-30.
    [Jensen 01] JENSEN, H. W. 2001. Realistic image synthesis using photon mapping. A. K. Peters, Ltd., Natick, MA, USA.
    [McGuire 09] MCGUIRE, M., LUEBKE, D., MARA, M. 2009. Hardware accelerated global illumination by image space photon mapping. In Proc. of HPG, ACM, New York, NY, USA, HPG 09, 77 - 89.
    [Mara 13] MARA, M., LUEBKE, D., AND MCGUIRE, M. 2013. Toward practical real-time photon mapping: efficient GPU density estimation. I3D 2013: 71-78.
    [Whitted 80] WHITTED, T. 1980. An improved illumination model for shaded display. Communications of the ACM 23, 6 (June 1980), 343–349.
    [Zhou 08] ZHOU, K., HOU, Q., WANG, R., AND GUO, B. 2008. Real-time kd-tree construction on graphics hardware. ACM, NY, NY, USA, SIGGRAPH Asia’08, 126:1-126:11
    其他參考資料
    [1] KHRONOS, 2011. Opencl overview. https://www.khronos.org/assets/uploads/developers/library/overview/OpenCL-Overview-Jun10.pdf
    [2] KHRONOS, 2012. Opencl 1.2 reference pages.
    http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/.
    [3] NVIDIA, 2012. Opencl programming guide for the cuda architecture, version 4.2. http://developer.download.nvidia.com/compute/DevZone/docs/html/OpenCL/doc/OpenCL_Programming_Guide.pdf.

    下載圖示
    QR CODE