透過您的圖書館登入
IP:3.133.144.197
  • 學位論文

基於GPU實作照片品質之繪圖及動畫演算法

GPU-Based Photo-Realistic Rendering and Animation

指導教授 : 張鈞法 金仲達

摘要


本研究主要是探討如何利用目前最新一代繪圖處理器(GPU)來產生即時高品質畫面及動畫效果,分別以『Hardware Accelerated EWA Surface Splatting』、 『GPU-Based Ocean Rendering』和『Subpixel Reconstruction Antialiasing for Ray Tracing』 為研究題目。針對這些項目的主要原因是在於它們不易在傳統採用fixed function 架構之GPU上加速產生抑或是採用CPU以軟體方式達成。然而,隨著GPU性能的提高以及可程式化能力日益提升,讓這些原屬於非即時(non-real-time)的繪圖效果透過GPU加速而出現在需要及時成像(real-time rendering)的應用中。 傳統GPU以三角形(triangle)為基本繪圖元素,在『Hardware Accelerated Elliptical Weighted Average (EWA) Surface Splatting』研究主題中,由於輸入幾何模型中的三度空間點數(point)遠遠超過輸出畫面pixel 的個數,所以我們改採用點為基本繪圖元素。其中提出LDC normal reduction簡化方式刪除原有輸入幾何模型多餘的三度空間點,透過該簡化方式,其三度空間點數可達到最少而無破圖瑕疵畫面產生,而繪圖所需時間也因點數變少而縮短。另外,由於以點為基礎之繪圖方法需為每一個三度空間中的點計算涵蓋該點在畫面footprint之二維方正區域,我們透過計算橢圓輪廓方式取代傳統採用距離計算方式,使得所求得的方正區域恰好涵蓋該三度空間點在畫面之footprint。接下來我們亦將解決鋸齒(aliasing)問題而採用之low-pass filter納入該點畫面footprint計算。最後我們採用object-space EWA filter 方式取代架構於screen-space EWA filter的作法以正確地計算每一個位於方正區域內之像素(pixel)是否座落於該點之footprint內及其混色比重(color blending weight)。透過上述幾項改進方式,我們提供一正確splat並同時可兼顧繪圖效能之以點為基礎的繪圖方法。 在『GPU-Based Ocean Rendering』研究主題中,我們只對目前可視範圍內之海面利用GPU計算其surface tessellation,該作法可達到最佳之level of detail(LOD)控制。接下來利用上述求得之海面取樣點的水平座標,以作為參數對預先計算之height maps進行取樣以求該點之海浪高度。另外,該架構於object-space 海浪高度計算方式使得我們不僅可正確計算橫跨海面物體之水面折射與反射效果,亦可根據該高度計算海水顏色。由於採用以水平座標計算海浪高度之方式並無法呈現浪花效果,我們結合一利用GPU計算之state-preserving particle system模擬浪花效果。透過以上幾項改進方式,我們提供一個即時又兼具高品質畫面效果之繪製海洋方法。 在『Subpixel Reconstruction Antialiasing for Ray Tracing』研究主題中,我們延伸Subpixel Reconstruction Antialiasing (SRAA)的作法提出一個採用GPU rasterization hybrid方式能夠有效率地解決 ray tracing上幾何鋸齒問題。首先透過GPU 以rasterization方式取得subpixel之除顏色以外的幾何資訊,其中包含深度(depth)與法向量(normal),相較於使用ray traced方式取得subpixel幾何資訊,該部分計算是可被忽略的。接下來結合這些幾何資訊於ray tracing演算法中計算權重值用以混合該subpixel周遭鄰近pixel顏色而求得其顏色值,其中權重值計算公式裡亦將陰影(shadow)邊界納入考慮,最後將隸屬該pixel之所有subpixel顏色依等比例混合為其最終之顏色,藉以達到消除鋸齒的效果。透過以上幾項改進方式,我們提供ray tracing 繪圖方式一個有效率解決幾何鋸齒問題之方法。

並列摘要


In this thesis, we investigate how to utilize the modern Graphics Process Units (GPU) to generate high quality images and animations in real-time rendering speed for the following three applications: “Hardware Accelerated Elliptical Weighted Average (EWA) Surface Splatting”, “GPU-Based Ocean Rendering”, and “Subpixel Reconstruction Antialiasing for Ray Tracing”. Although modern GPUs have great computational power as well as high memory bandwidth, they still require some tweaking to transform the problems into graphics-like shader programs that operate on textures and frame buffers to port the applications on GPUs listed above. In the work of hardware accelerated EWA Surface Splatting, we look into the performance-quality trade-off between previous methods that use a vertex-based rasterization setup and the object-space EWA splatting that uses a quad-based rasterization setup. Our main contributions are the addition of accurate low-pass filtering to the vertex-based method and the modification of the (screen-space) bounding box setup that avoids improper clipping of the splat ellipses. The end result is a vertex-based surface splatting method that produces rendering quality indistinguishable from quad-based object-space EWA splatting, especially in terms of perspective accuracy and anti-aliasing. We achieve better rendering quality than other GPU-accelerated surface splatting methods with little impact to rendering speed, especially in high-resolution display. In the work of real-time ocean rendering, we present an efficient algorithm using the newest features of GPU. It differs from previous works in three aspects: adaptive GPU-based ocean surface tessellation, sophisticated optical effects for shallow water, and effects of spray and spume for oscillating waves. Our tessellation scheme not only offers easier level-of-detail (LOD) control but also avoids the loading of vertex attributes from CPU to GPU at each frame. The object-space wave sampling approach allows us to produce sophisticated optical effects for shallow water and to implement a state-preserving particle system for simulating spray motions interactively. In the work of subpixel reconstruction antialiasing for ray tracing, we introduce a practical antialiasing approach for interactive ray tracing and path tracing. Our method is inspired by the Subpixel Reconstruction Antialiasing (SRAA) method which separates the shading from visibility and geometry sampling to produce antialiased images at reduced cost. While SRAA is designed for GPU-based deferred shading renderer, we extend the concept to ray-tracing based applications. We take a hybrid rendering approach in which we add a GPU rasterization step to produce the depth and normal buffers with subpixel resolution. By utilizing those extra buffers, we are able to produce antialiased ray traced images without incurring performance penalty of tracing additional primary rays. Furthermore, we go beyond the primary rays and achieve antialiasing for shadow rays and reflective rays as well.

參考文獻


[1] Rudolph Balaz and Sam Glassenberg. Direct3D. Microsoft Corp. http://microsoft.sitestream.com/PDC05/PRS/PRS416_files/Botto_files/PRS416_Balaz_Glassenberg.ppt.
[3] M. Botsch, and L. Kobbelt. High-quality point-based rendering on modern GPUs. Proceedings of the 11th Pacific Conference on Computer Graphics and Applications, IEEE Computer Society, 335–346, 2003.
[5] M. Botsch, A. Hornung, M. Zwicker, and L. Kobbelt. High-quality surface splatting on today’s GPUs. Eurgraphics symposium on point-based graphics, 2005.
[6] B. Chen and M. X. Nguyen. POP: a hybrid point and polygon rendering system for large data. In Proc. IEEE Visulization 2001, pages 45.52, 2001.
[8] C.-F. Chang, G. Bishop, and A. Lastra. LDI tree: a hierarchical representation for image-based rendering. Proceedings of the 26th annual conference on Computer graphics and interactive techniques, ACM Press/Addison-Wesley Publishing Co., 291–298, 1999.

延伸閱讀