研究生: |
莊沁傑 Chin Chieh Chuang |
---|---|
論文名稱: |
使用圖形處理器模擬光線追蹤與光柵化成像畫面差異及速度之比較 Image Quality and Performance Comparison between GPU Ray Tracing and Rasterization |
指導教授: |
張鈞法
Chang, Chun-Fa |
學位類別: |
碩士 Master |
系所名稱: |
資訊教育研究所 Graduate Institute of Information and Computer Education |
論文出版年: | 2014 |
畢業學年度: | 102 |
語文別: | 中文 |
論文頁數: | 46 |
中文關鍵詞: | 圖形處理器 、光線追蹤 、光柵化 、Phong效果 、環境貼圖 |
英文關鍵詞: | GPU, Ray Tracing, Rasterization, Phong lighting, Environment Mapping |
論文種類: | 學術論文 |
相關次數: | 點閱:164 下載:15 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
隨著快速的圖形處理器的問世,以及GPGPU語言的誕生,我們可以在圖形處理器上做更複雜的計算。然而現階段卻少與有人願意使用圖形處理器模擬光線追蹤這種高度模擬畫面的技術。我們推究原因是因為大部分的開發者認為使用光線追蹤生成一張畫面的成本太高;此外因為Shader已經有許多強大且方便開發的引擎,所以他們認為不需要再多學新的像OpenCL和CUDA的這類GPGPU語言。
為了達到我們的目的,我們提出兩種將光線追蹤實行在Shader上的方法: One Pass Rendering Algorithm和Hybrid Rendering Algorithm,也實作了Phong Lighting效果以及Environment Mapping效果,並且針對不同類型的場景與Shader上的光柵化技術做畫面品質以及效能上的比較並且量化其結果。
我們展示兩個技術的差異以及解釋其優劣比較。雖然光柵化技術會比光線追蹤技術來的快,但我們也無須擔心這樣的結果。因為增加的效果並不會造成兩個技術的效能差距擴大。相反地,我們可以利用光線追蹤技術得到較好的畫面品質。我們藉由這次實驗我們成功地將在圖形處理器上實行光線追蹤的可行性。
With faster graphics processors and GPGPU languages, we have the ability to compute more complex data. However, we found few people want to simulate ray tracing on the graphics processor which can render high quality pictures. The developers think the cost of generating one frame is expensive by tracing rays. Besides, they are not willing to learn new GPGPU languages such as OpenCL and CUDA, because of the lack of powerful and convenient engines.
In order to achieve that purpose, we offer two methods: One Pass Rendering Algorithm and Hybrid Rendering Algorithm to implement ray tracing on Shader and also implement the Phong lighting effect and the environment reflection effect. We compare the image quality and performance between rasterization and our Shader based ray tracing by different kinds of scenes and we also quantify the results of this comparison.
We show the difference between GPU ray tracing and rasterization and we explain the pros and cons of them. The performance of rasterization is better than ray tracing, but we do not need to be worry about it. Because we do not get the larger performance gaps between GPU ray tracing and rasterization by increasing effects. On the contrary, we can gain higher image quality by using ray tracing technology.
According to this experiment, we successfully prove the possibility of ray tracing simulation technology on GPU.
相關研究論文
[CHR 05] Christen, M. (2005). Ray Tracing on GPU. Master's thesis, Univ. Applied Sciences Basel(FHBB).
[FER 03] Fernando, R., & Kilgard, M. J. (2003). The Cg Tutorial: The definitive guide to programmable real-time graphics. Addison-Wesley Longman Publishing Co., Inc.
[GRE 86] Greene, N.(1986)Environment mapping and other applications of world projections.
[KEP 08] KEPLER, J. (2008)Real–time Ray Tracing of Dynamic Scenes.
[MIC 07] Michael, B. (2007). Shadow Map Antialiasing. GPU Gems.
[MOL 05] Möller, T., & Trumbore, B. (2005, July). Fast, minimum storage ray/triangle intersection. In ACM SIGGRAPH 2005 Courses (p. 7). ACM.
[PHO 75] Phong, B. T. (1975). Illumination for computer generated pictures. Communications of the ACM, 18(6), 311-317.
[PUR 02] Purcell, T. J., Buck, I., Mark, W. R., & Hanrahan, P. (2002, July). Ray tracing on programmable graphics hardware. In ACM Transactions on Graphics (TOG) (Vol. 21, No. 3, pp. 703-712). ACM.
[PUR 04] Purcell, T. J. (2004). Ray tracing on a stream processor (Doctoral dissertation, stanford university).
[SAN 10] Sanders, J., & Kandrot, E. (2010). CUDA by example: an introduction to general-purpose GPU programming. Addison-Wesley Professional.
[WHI 79] Whitted, T. (1979). An improved illumination model for shaded display. Proceedings of the 6th annual conference on Computer graphics and interactive techniques.
相關研究網頁文獻
[1] Evan Wallace(2010),WebGL Path Tracing, Retrieved from : http://madebyevan.com/webgl-path-tracing/
[2] Emmanuel Agu.(2013). Lecture 9(Part1): Environment Mapping(Reflections and Refractions),Retrieved from WPI Computer Graphics(CS 543) Courses: http://web.cs.wpi.edu/~emmanuel/courses/cs543/f13/slides/lecture09_p1.pdf
[3] Friendrich A. Lohmuller(2013). Cubic Environment Mapping A Skybox with cube mapping. Retrieved from POV-Ray Tutorial: http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
[4] Favien Sanglard(2009) Soft shadow with GLUT, GLSL and VSM. Retrieved from Favien Sanglard’s website: http://fabiensanglard.net/shadowmappingVSM/index.php
[5] GLSL Tutorial(n.d.), Retrieved from lighthouse3D: http://www.lighthouse3d.com/tutorials/
[6] GPU Ray Tracing(n.d.), (2013) Retrieved from : http://micah-d-lamb.com/blog/opengl-tutorials/gpu-ray-tracing-2/
[7] Jerome Guinot.(2006).Environment Mapping, The Art of Texturing Using The OpenGL Shading Language, Retrieved from oZone3D.Net: http://www.ozone3d.net/tutorials/glsl_texturing_p04.php
[8] Khrons group(2013)OpenGL 4 Reference API Card, Retrieved from http://www.khronos.org/files/opengl44-quick-reference-card.pdf.
[9] Resle(2010)Shadow mapping on GLSL 1.5 avoid deprecation. Retrieved from gamedev.net: http://www.gamedev.net/topic/573885-shadowmapping-on-glsl-15-avoiding-deprecation/
[10] NVIDIA Corporation. (1999). OpenGL Cube Map Texturing. Retrieved from NVIDIA: http://www.nvidia.com/object/cube_map_ogl_tutorial.html
相關圖片來源
(1) 圖2.1圖片來源:"Figure2 A streaming ray tracer" Licensed under Creative Commons Attribution-Share Alike 3.0 viaPurcell, T. J., Buck, I., Mark, W. R., & Hanrahan, P. (2002, July). Ray tracing on programmable graphics hardware. In ACM Transactions on Graphics (TOG)(Vol. 21, No. 3, pp. 703-712). ACM.
(2) 圖2.2圖片來源:"Figure 4: The grid and triangle data structures stored in texture
memory." Licensed under Creative Commons Attribution-Share Alike 3.0 viaPurcell, T. J., Buck, I., Mark, W. R., & Hanrahan, P. (2002, July). Ray tracing on programmable graphics hardware. In ACM Transactions on Graphics (TOG)(Vol. 21, No. 3, pp. 703-712). ACM.
(3) 圖4.3的圖片來源:"Phong components version 4". Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons -http://commons.wikimedia.org/wiki/File:Phong_components_version_4.png#mediaviewer/File:Phong_components_version_4.png
(4) 圖5.8以及圖5.12的圖片來源:"Långholmen ". Licensed under a Creative Commons Attribution 3.0 Unported License via Emil Persson, aka Humus -http://www.humus.name/index.php?page=Textures&ID=48.