簡易檢索 / 詳目顯示

研究生: 林哲葳
Lin, Che-Wei
論文名稱: 使用散色光源的光柵演算法的一FPGA實現
A FPGA Implementation of the Rasterization Algorithm with Diffuse Lighting Sources
指導教授: 張名先
Chang, Ming-Xian
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2023
畢業學年度: 111
語文別: 英文
論文頁數: 51
中文關鍵詞: 現場可程式化邏輯閘陣列(FPGA)電腦圖學3D渲染硬體描述語言影像處理控制器影像顯示
外文關鍵詞: Field-Programmable Gate Array (FPGA), computer graphics, 3D rendering, hardware description language (HDL), image processing, controller, image display
相關次數: 點閱:108下載:8
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 電腦圖學發展至今已經有著非常多成熟的技術,此技術已經應用在遊戲、電影、產品設計的建模等,並且隨著技術的發展已經有著更成熟的光追蹤技術,使渲染的圖像更逼真更貼近真實照片,本論文使用基礎電腦圖學做為架構實現一3D圖像渲染系統。

    本論文利用FPGA實現使用散色光源的光柵演算法。在FPGA上建立客製的渲染架構,從3D圖形的最基礎圖形-三角形來構建以及渲染。在著色器上色的基礎上添加了基於散射的光照以及陰影的效果納入了我們的渲染過程中,能夠更準確地呈現光線與物體表面的交互作用,增加物件的的立體感以及距離感。並選用高效率光柵化來實現圖片的渲染。最後透過VGA呈現在螢幕上。

    最後,我們成功在FPGA上實現了一個3D 實時渲染系統。此系統可以將三維圖像的資訊經過投影以及渲染管線做處理,使其圖像具有近大遠小的視覺變化。並且能透過FPGA上的開關控制物件的移動以及旋轉。在物體移動時,隨著與光源距離的靠近與遠離,物體的亮度也會跟著變亮及變暗,物體的陰影也會跟著物理性質而改變。之後再以重心插值的方式進行物體的著色,使物體面表面渲染更柔和以及逼真。並通過pipeline設計實現了即時的物件光影變化。

    The thesis presents an FPGA implementation of the rasterization algorithm with the diffuse lighting sources in computer graphics. A customized rendering architecture is established on the FPGA to construct and render the most fundamental shapes of 3D graphics – triangles. Building upon shader-based coloring, our rendering process incorporates scatter-based lighting and shading effects. This inclusion enables a more precise representation of the interaction between light rays and object surfaces, enhancing the objects' three-dimensionality and depth perception. Finally, the rendered images are displayed on a monitor via VGA.
    In conclusion, we have successfully developed and implemented a real-time 3D rendering system on an FPGA. This system processes the information of a 3D image through projection and rendering pipelines, imparting visual changes like perspective scaling. Moreover, it enables control over object movement and rotation via switches on the FPGA. When objects move, their brightness varies with proximity and distance from the light source, and shadows alter based on physical properties. Subsequently, object coloring is achieved through barycentric interpolation, resulting in smoother and more realistic surface rendering. The design employs a pipeline structure to achieve real-time object shading variations.

    摘要 I Abstract II 致 謝 III Contents IV List of Figures VII Chapter 1 Introduction 1 1.1 Computer Graphics 1 1.2 Lighting Sources in Computer Graphics 1 1.3 Field Program Gate Array 2 1.4 Motivation and Contributions 3 1.5 Thesis Outline 4 Chapter 2 Overview of Computer Graphic 5 2.1 3D Computer Graphic 5 2.1.1 OPENGL 5 2.1.2 3D Computer Graphic Processing 6 2.1.3 Computer Graphics Pipeline 6 2.2 Modeling 7 2.2.1 Triangle Modeling 7 2.2.2 Vertex Information 8 2.3 MVP Matrix 9 2.3.1 Model Matrix 9 2.3.2 View Matrix 11 2.3.3 Projection Matrix 11 2.4 Lighting 14 2.4.1 Types of Lighting 14 2.4.2 Calculation of Brightness 15 2.4.3 Phong Shading Model 15 2.4.4 Flat Shading 16 2.4.5 Gouraud Shading 16 2.5 Shadow Mapping 17 2.6 Rasterization 18 2.6.1 Pixel 18 2.6.2 Triangle Traversal 19 2.6.3 Coloring 19 2.6.4 Z-Buffer 20 Chapter 3 FPGA implementation of the proposed 3D 21 Real-Time Rendering System 21 3.1 FPGA Implementation of the 3D Rendering 21 3.2 Top-Level Module of the Rendering System 21 3.3 Fixed-Point Library Module 23 3.3.1 Euler_angle 23 3.3.2 Matrix Library 23 3.4 Control _Unit Module 24 3.5 Triangle_Model Module 25 3.6 Triangle_list Module 25 3.7 Display 26 3.7.1 Keyboard Module 26 3.7. 2 Display Module 26 3.8 Projection Module 27 3.8.1 MVP Matrix 27 3.8.2 Lighting 31 3.9 Rasterization Module 33 3.9.1 Shader Module 34 3.10 Frame_buffer Module 35 3.11 VGA Controller Module 36 3.12 Clear_Frame Module 36 Chapter 4 Experimental Results 37 4.1 Research Equipment and Environment 37 4.2 Directional Lighting Source with Flat Shading 38 4.3 Diffuse Lighting Source with Gouraud Shading 39 4.4 Comparison of Light Sources 43 4.5 The Resources of FPGA used by the Proposed System 48 Chapter 5 Conclusion and Future Work 49 References 50

    [1] D. G. Bailey, "Design for embedded image processing on FPGAs, " SG:John Wiley & Sons, Singapore, pp. 21-25, 234-248, 352-359, 2011.
    [2] N. Einspruch, "Application specific integrated circuit (ASIC) technology," Academic Press, Cambridge, Massachusetts, USA, 2012.
    [3] U. Farooq, Z. Marrakchi and H. Mehrez, "FPGA architectures: an overview," Tree-based Heterogeneous FPGA Architectures, Springer, New York, NY, USA, pp. 7-48, 2012.
    [4] A. Glassner, "Situation normal [Gourand and Phong shading]," IEEE Computer Graphics and Applications, vol. 17, no. 2, pp. 83-87, March-April 1997, doi: 10.1109/38.574687.
    [5] S. Jiang, "Research on the application of computer graphics and image technology in visual communication," International Conference on Computer Information Science and Artificial Intelligence (CISAI), Kunming, China, pp. 656-660, 2021, doi: 10.1109/CISAI54367.2021.00132.
    [6] J. Liou, "Design, analysis, and implementation of a rasterization engine based on tile-based rendering architecture in 3D graphics, " Master’s Thesis, National Cheng Kung University, Tainan, ROC, Jan. 2009.
    [7] Y. Liu, X. Liu, and Z. Liu, "3D animation face modeling and feature extraction based on computer graphics and image processing technology," International Conference on Computer Graphics, Image and Virtualization (ICCGIV), Chongqing, China, pp. 46-49, 2022. doi: 10.1109/ICCGIV57403.2022.00014.
    [8] T. A. Navarro, "Implementation of a GPU rasterization stage on a FPGA," Universitat Politècnica de Catalunya, Barcelona, Spain, 2015.
    [9] M. Prvulovic, Đ. Đurđević and I. Tartalja, "SeeGL: Software tool for learning the OpenGL graphics library," 20th Telecommunications Forum (TELFOR), Belgrade, Serbia, pp. 1604-1608, 2012. doi: 10.1109/TELFOR.2012.6419530.
    [10] D. Shreiner and E. Angel, "Teaching a shader-based introduction to computer graphics," IEEE Computer Graphics and Applications, vol. 31, no. 2, pp. 9-13, March-April. 2011, doi: 10.1109/MCG.2011.27.
    [11] J. Staudhammer, "Computer graphics hardware," IEEE Computer Graphics and Applications, vol. 11, no. 1, pp. 42-44, Jan. 1991, doi: 10.1109/38.67698.
    [12] M. White, G. Dunnett, R. L. Grimsdale, P. F. Lister, I. McGroarty, M. D. J. McNeill, and A. D. Nimmo, "Workstation graphics-rendering hardware," IEE Colloquium on Computer Graphics Systems, London, UK, pp. 4/1-4/6, 1992.
    [13] W. Xuan, "Verilog-FixedPoint," (Source code), 2021, https://github.com/WangXuan95/Verilog-FixedPoint.
    [14] T. Ze, R. Xianglong, Z. Jun, F. Feihu and C. Yue, "Design of shared register file of GPU unified shader array," IEEE 9th International Conference on Cyber Security and Cloud Computing (CSCloud), Xi'an, China, pp. 123-128, 2022. doi: 10.1109/CSCloud-EdgeCom54986.2022.00030.

    下載圖示 校內:立即公開
    校外:立即公開
    QR CODE