Towards a Filmic Look and Feel in Real Time Computer Graphics Sherief Farouk
Total Page:16
File Type:pdf, Size:1020Kb
The University of Maine DigitalCommons@UMaine Electronic Theses and Dissertations Fogler Library 5-2013 Towards a filmic look and feel in real time computer graphics Sherief Farouk Follow this and additional works at: http://digitalcommons.library.umaine.edu/etd Part of the Computer and Systems Architecture Commons, Hardware Systems Commons, and the Other Film and Media Studies Commons Recommended Citation Farouk, Sherief, "Towards a filmic look and feel in real time computer graphics" (2013). Electronic Theses and Dissertations. 1898. http://digitalcommons.library.umaine.edu/etd/1898 This Open-Access Thesis is brought to you for free and open access by DigitalCommons@UMaine. It has been accepted for inclusion in Electronic Theses and Dissertations by an authorized administrator of DigitalCommons@UMaine. TOWARDS A FILMIC LOOK AND FEEL IN REAL TIME COMPUTER GRAPHICS By Sherief Farouk B.S. Arab Academy for Science and Technology, 2009 A THESIS Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science (in Computer Science) The Graduate School The University of Maine May 2013 Advisory Committee: James Fastook, Professor of Computer Science, Advisor Phillip Dickens, Associate Professor of Computer Science Larry Latour, Associate Professor of Computer Science TOWARDS A FILMIC LOOK AND FEEL IN REAL TIME COMPUTER GRAPHICS By Sherief Farouk Thesis Advisor: Dr. James Fastook An Abstract of the Thesis Presented in Partial Fulfillment of the Requirements for the Degree of Master of Science (in Computer Science) May 2013 Film footage has a distinct look and feel that audience can instantly recognize, making its replication desirable for computer generated graphics. This thesis pre sents methods capable of replicating significant portions of the film look and feel while being able to fit within the constraints imposed by real-time computer gen erated graphics on consumer hardware. TABLE OF CONTENTS LIST OF FIGURES....................................................................................... vi LIST OF EQUATIONS..................................................................................xi CHAPTER ONE: INTRODUCTION.............................................................. 1 Problem Statement...................................................................................1 Objectives.................................................................................................2 Review of Previous Work........................................................................ 4 CHAPTER TWO: RENDERING OVERVIEW ............................................ 6 High Dynamic Range.............................................................................. 7 Conservation of Energy.......................................................................... 8 The Graphics Pipeline............................................................................ 11 Anti-Aliasing........................................................................................... 25 Pixels versus fragments........................................................................30 CHAPTER THREE: DEPTH OF FIELD..................................................... 31 Introduction.............................................................................................31 Previous Work........................................................................................37 Proposed Technique............................................................................. 44 Algorithm................................................................................................ 49 Results....................................................................................................50 CHAPTER FOUR: LENS FLARE...............................................................52 Introduction............................................................................................ 52 Previous Work........................................................................................ 54 Breakdown..............................................................................................55 Bright Region Detection...................................................................55 Bloom ................................................................................................56 Light Streaks..................................................................................... 57 Ghosting............................................................................................59 Proposed Technique..............................................................................63 Algorithm.................................................................................................66 Results....................................................................................................67 CHAPTER FIVE: TONEMAPPING........................................................... 70 Introduction............................................................................................ 70 Previous Work........................................................................................ 77 Proposed Approach.............................................................................. 82 Results....................................................................................................85 CHAPTER SIX: FRAME RATE..................................................................88 CHAPTER SEVEN: MOTION BLUR......................................................... 92 Introduction............................................................................................ 92 Used Technique.....................................................................................95 CHAPTER EIGHT: PROJECTOR COLOR CONVERGENCE................97 Introduction.............................................................................................97 Previous Work...................................................................................... 100 Proposed Technique............................................................................ 101 Algorithm................................... ...........................................................104 Results.................................................................................................. 105 CONCLUSIONS........................................................................................ 109 BIBLIOGRAPHY........................................................................................ 110 APPENDIX A: BRANCH-FREE ERROR FUNCTION........................... 114 BIOGRAPHY OF THE AUTHOR..............................................................115 v LIST OF FIGURES Figure 1. IEEE 16-bit Floating Point Binary Layout................................. 7 Figure 2. High Dynamic Range Blur......................................................... 10 Figure 3. The Hardware Graphics Pipeline..............................................11 Figure 4. Rasterization Rendering Vertices............................................ 13 Figure 5. Rasterization Rendering Polygon............................................ 14 Figure 6. Texture and Associated Mipmap Chain...................................15 Figure 7. Trilinear and Anisotropic Texture Filtering............................... 17 Figure 8. Cubemap Texture Composition............................................... 18 Figure 9. Cubemap Texture Addressing..................................................19 Figure 10. Texture and Rasterized Polygon.............................................. 20 Figure 11. Scene Rendered Using Render To Texture.............................21 Figure 12. Complex Render To Texture Pipeline......................................22 Figure 13. Texture and Screen Aligned Polygon.......................................23 Figure 14. Texture and Post Processed Polygon..................................... 24 Figure 15. Computer Generated Scene with Aliasing.............................. 25 Figure 16. Computer Generated Scene with Anti-Aliasing......................26 Figure 17. Anti-Aliased Pixel Sample Layout............................................27 vi Figure 18. Subsampled Pixel Color Values............................................... 28 Figure 19. Subsampled Pixel Color Resolution.........................................28 Figure 20. High Frequency Polygon with Anti-Aliasing............................ 29 Figure 21. Lens Imaging Model.................................................................. 32 Figure 22. Chromatic Aberration Lens Model............................................ 33 Figure 23. Chromatic Aberration Photograph............................................34 Figure 24. Purple Fringing..........................................................................35 Figure 25. Depth of Field in Film................................................................ 36 Figure 26. Depth of Field Sampling Pattern.............................................. 38 Figure 27. Depth of Field in Uncharted 2 .................................................. 39 Figure 28. Depth of Field in Good Samaritan.............................................41 Figure 29. Depth of Field Layers in Good Samaritan................................41 Figure 30. Depth of Field Aperture Sampling Patterns............................ 45 Figure 31. Scene and Depth of Field Rejected Samples.........................47 Figure 32. Chromatic Aberration in Mythbusters....................................