Lecture 1:Slides

Real-Time Rendering (2nd Edition)

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Today ECE 595 / CS 491 / CS 591 Welcome! About me... About the Advanced Graphics Lab (AGL) What are your backgrounds? Real-Time Rendering & Graphics Hardware Welcome and introduction of the class A brief history of real-time rendering Introduction to the rendering pipeline Application and vertex transform stages Pradeep Sen Advanced Graphics Lab Class 1 January 17, 2007 Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 What is real-time rendering? First we must ask what is rendering... What is real-time rendering? Real-time is typically defined > 30fps (although 60fps is better) Interactive rendering: a few fps Loose definitions... rendered image Demos Let's see some modern, real-world examples Try to think: how do they generate those images from a description of the scene? scene description Animation is achieved by moving the objects slightly each frame and re-rendering... Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Gears of War Test Drive Unlimited NBA2k Gears of War Epic Games (2006) Xbox 360 Test Drive Unlimited Eden Studios (2006) XBOX 360 NBA 2k7 2k Sports (2006) Xbox 360 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 1 Resistance: Fall of Man About this class... This class is about: Learning how to write a bleeding-edge, real-time rendering engine Learning the inner workings of current graphics hardware Learning about real-time algorithms for global illumination, geometry, etc. Learn to apply these principles for medical visualization, image processing, computer vision, and GPGPU You will be able to generate these kind of graphics after this class Resistance: Fall of Man SCEA, Insomniac Games (2006) Playstation 3 This class is not about: Other issues that come up in games: AI, networking, game play, artwork, design process, etc. Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Course objectives If you do well in this class, you should be able to: Get a job working on game engines at one of the GPU manufacturers such as NVIDIA or ATI Take advantage of the GPU to accelerate your work for other applications Do research in real-time rendering and graphics hardware Class nuts and bolts Instructor: Pradeep Sen psen@ece.unm.edu http://www.ece.unm.edu/~psen ECE Room 225C Office hours: Tuesday 2:00 4:00pm Location: ECE Room 210 M, W 4:00 5:15pm Course webpage: http://www.ece.unm.edu/ECE595 Doom 3 id (2004) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Class nuts and bolts Textbook: Tomas Akenine-Moller & Eric Haines. Real-Time Rendering, 2nd Edition, AK Peters Ltd, 2002 Available at the UNM Bookstore Readings will be assigned from book and from other sources Class nuts and bolts Grading: Intro project Final project 10 homework assignments Mid-term exam Final exam Pop quizzes 18.75% 18.75% 25% 12.5% 18.75% 6.25% Class nuts and bolts Let me go over the syllabus... Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 2 Class nuts and bolts Class is informal. Feel free to interrupt and ask questions I use all kinds of media in my lectures: from Powerpoint slides to blackboard for derivations. Take notes from all of them. This class is a lot of work... It is a graduatelevel class in computer graphics It might be the most rewarding class you have ever taken! Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1961 Sketchpad (Sutherland) History of real-time graphics 1961 Sketchpad (Sutherland) Early 1960's Wireframe rendering (vector graphics) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1961 Sketchpad (Sutherland) Early 1960's Wireframe rendering (vector graphics) Mid 1960's Hidden-line algorithms (Roberts, Appel) History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) 1971 Gouraud Shading (Gouraud) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) 1971 Gouraud Shading (Gouraud) 1972 Pong arcade game by Atari History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) 1971 Gouraud Shading (Gouraud) 1972 Pong arcade game by Atari 1973 - Phong Shading (Phong) History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) 1971 Gouraud Shading (Gouraud) 1972 Pong arcade game by Atari 1973 - Phong Shading (Phong) 1974 Z-buffer hidden-surface algorithm (Catmull) 1974 Texture mapping (Catmull) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 3 History of real-time graphics Early 1970's Flat shaded, hidden-surface algorithms (Warnock, Watkins) 1971 Gouraud Shading (Gouraud) 1972 Pong arcade game by Atari 1973 - Phong Shading (Phong) 1974 Z-buffer hidden-surface algorithm (Catmull) 1974 Texture mapping (Catmull) 1974 Hardware Framebuffer (Evans and Sutherland) History of real-time graphics 1976 Signal processing first applied to CG for antialiasing (Crow) 1976 Reflection mapping History of real-time graphics 1976 Signal processing first applied to CG for antialiasing (Crow) 1976 Reflection mapping 1978 Bump mapping (Blinn) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1976 Signal processing first applied to CG for antialiasing (Crow) 1976 Reflection mapping 1978 Bump mapping (Blinn) 1978 Subdivision surfaces (Catmull and Clark) Late 1970's Hard Shadow Algorithms (Crow, Williams) History of real-time graphics 1976 Signal processing first applied to CG for antialiasing (Crow) 1976 Reflection mapping 1978 Bump mapping (Blinn) 1978 Subdivision surfaces (Catmull and Clark) Late 1970's Hard Shadow Algorithms (Crow, Williams) 1978 Space Invaders by Atari (2D) History of real-time graphics 1976 Signal processing first applied to CG for antialiasing (Crow) 1976 Reflection mapping 1978 Bump mapping (Blinn) 1978 Subdivision surfaces (Catmull and Clark) Late 1970's Hard Shadow Algorithms (Crow, Williams) 1978 Space Invaders by Atari (2D) 1980 Battlezone by Atari (vector-based 3D arcade) Real-time Rendering & Graphics Hardware Pradeep Sen [Williams 78] Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1982 Silicon Graphics founded (SGI) History of real-time graphics 1982 Silicon Graphics founded (SGI) 1983 Mipmapping for antialiasing of textures(Williams) History of real-time graphics 1982 Silicon Graphics founded (SGI) 1983 Mipmapping for antialiasing of textures(Williams) 1983 Nintendo Entertainment System (NES) (2D) [Williams 83] Real-time Rendering & Graphics Hardware Pradeep Sen Real-time Rendering & Graphics Hardware Pradeep Sen Super Mario Bros. Nintendo (1984) Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Class 1 January 17, 2007 4 History of real-time graphics 1984 Illumination maps (Miller and Hoffman) History of real-time graphics 1984 Illumination maps (Miller and Hoffman) 1985 Shading Languages (Perlin) History of real-time graphics 1984 Illumination maps (Miller and Hoffman) 1985 Shading Languages (Perlin) 1988 Volume Rendering (Drebin et al., Levoy) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1990 Renderman Interface and Shading Language (Hanrahan) History of real-time graphics 1990 Renderman Interface and Shading Language (Hanrahan) Early 1990's Non-photorealistic rendering (NPR) History of real-time graphics 1990 Renderman Interface and Shading Language (Hanrahan) Early 1990's Non-photorealistic rendering (NPR) 1992 Wolfenstein 3D by id Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 1990 Renderman Interface and Shading Language (Hanrahan) Early 1990's Non-photorealistic rendering (NPR) 1992 Wolfenstein 3D 1993 NVIDIA founded History of real-time graphics 1990 Renderman Interface and Shading Language (Hanrahan) Early 1990's Non-photorealistic rendering (NPR) 1992 Wolfenstein 3D 1993 NVIDIA founded 1994 Sony Playstation History of real-time graphics 1997 NVIDIA's Riva 128 (First generation commercial 3D GPU) 2000 Sony Playstation 2 SSX Electronic Arts (2000) Tekken3 Namco (1998) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 5 History of real-time graphics 1997 NVIDIA's Riva 128 (First generation commercial 3D GPU) 2000 Sony Playstation 2 2001 NVIDIA NV20, first programmable GPU 2001 Real-time Shading Languages (Proudfoot et al.) History of real-time graphics 1997 NVIDIA's Riva 128 (First generation commercial 3D GPU) 2000 Sony Playstation 2 2001 NVIDIA NV20, first programmable GPU 2001 Real-time Shading Languages (Proudfoot et al.) 2001 Microsoft Xbox History of real-time graphics 2003 Embedding discontinuities in textures (Sen) Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of real-time graphics 2003 Embedding discontinuities in textures (Sen) 2005 Microsoft Xbox 360 History of real-time graphics 2003 Embedding discontinuities in textures (Sen) 2005 Microsoft Xbox 360 2006 Sony Playstation 3 Why 3-D Graphics? 3-D graphics allow for changing viewpoints arbitrarily, because the resulting image is computed on the fly. Forza Motorsport 2 Microsoft (2006) Dark Kingdom Sony (2006) Real-time Rendering & Graphics Hardware Pradeep Sen Real-time Rendering & Graphics Hardware Pradeep Sen Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Class 1 January 17, 2007 Class 1 January 17, 2007 Examples of 2-D graphics Examples of 2-D graphics Comparison PacMan Namco (1979) Legend of Zelda Nintendo (1986) Outrun SEGA (1986) Arcade game Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 6 Comparison Why 3-D Graphics? 3-D graphics allow for changing viewpoints arbitrarily, because the 2-D images are computed on the fly. We can think of 2-D graphics as having a precomputed viewpoint. They are more limited in what you can do. Graphics Hardware When we say "graphics hardware" in this class, we are talking about 3-D graphics hardware, not 2-D hardware, video processing hardware, etc. Major vendors: NVIDIA or ATI However, 3-D applications existed in software before consumer hardware existed GTR2 Viva Media (2006) PC game Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Wolfenstein3D Developed by id in 1992 One of the first 3-D games with textured surfaces Demo This application launched the drive to develop consumer-level graphics hardware History of Graphics Hardware First generation Workstations (< 1987) Wireframe rendering History of Graphics Hardware Second generation workstations (1987 92) Triangle rendering Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 History of Graphics Hardware Third generation workstations (1992 2000) Textured triangle rendering What happened? Performance has skyrocketed NVIDIA graphics card From Owens et al. "A Survey of General-Purpose Computation on Graphics Hardware" Silicon Graphics workstation Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 7 What enabled this evolution? The implementation of the entire rendering pipeline on a single chip! The real-time rendering pipeline Application Command Inside the GPU Geometry Rasterization Texture Fragment Display Triangles are king In real-time graphics, geometry is typically represented by triangles The application: Runs the game (keeps the state) Controls the enemy AI Handles user input Determines where the user is and what they are looking at Sets the state of the graphics hardware before drawing Once it is ready to draw, it sends the triangles to the graphics card for rendering The GPU must draw these triangles to the screen Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen View Transform world space y y Command processing: Parses the input from the CPU Sets up the hardware for rendering Geometry stage: Vertices are transformed Lighting can be computed Transformed vertices are projected to the screen Triangles are clipped Transformed to screen coordinates in preparation for rasterization x x x z eye space Class 1 January 17, 2007 Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Kinds of projection Perspective projection Geometry stage: Vertices are transformed Lighting can be computed Transformed vertices are projected to the screen Triangles are clipped Transformed to screen coordinates in preparation for rasterization perspective projection x -1 1 x Orthographic projection Perspective projection z z eye space Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 8 The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Triangle Clipping The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Geometry stage: Vertices are transformed Lighting can be computed Transformed vertices are projected to the screen Triangles are clipped Transformed to screen coordinates in preparation for rasterization Geometry stage: Vertices are transformed Lighting can be computed Transformed vertices are projected to the screen Triangles are clipped Transformed to screen coordinates in preparation for rasterization Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Rasterization The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Rasterization: Geometrical triangles are converted into pixels Also called "scan conversion" Texture: Allows modulation of the surface color (or other properties by a bitmap Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Texturing The real-time rendering pipeline Application Command Geometry standard geometry The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Rasterization Texture Fragment Display Fragment processing: Traditionally this was only simple blending Now GPUs allow for programmability Also includes framebuffer ops such as depth test Display: D/A converters scan out the framebuffer to the display texture-mapped geometry Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Class 1 January 17, 2007 9 The real-time rendering pipeline Application Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen The real-time rendering pipeline Application The Application As I said earlier, we won't talk about AI, networking, game play, etc. We will study how the application deals with rendering related issues. Update user's position and scene content based on game state The trick is how to manage all the content efficiently, you can't throw everything into the hardware and expect it to draw it fast Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 As it appears in Moller & Haines Command Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Application Geometry Rasterizer Class 1 January 17, 2007 The Application Acceleration involves: Culling geometry that is not visible to the user Level of detail reduction for geometry that is far away from the user Caching geometry/textures for current level so that only those are sent to the hardware We will discuss application-side optimizations in more detail later on, when we discuss rendering engines For now, let's see what the hardware is doing... Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 The real-time rendering pipeline Application Command Inside the GPU Geometry Rasterization Texture Fragment Display Real-time Rendering & Graphics Hardware Pradeep Sen Vertex Transformations We want to apply the vertex transformations as a linear operation of a matrix: v' = Mv The trick is determining what the matrix should be for the specific transformation Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Basic Transformations Rotation Scaling Shear What about translation? Homogeneous coordinates Add an extra component "w": (x, y, z, w) = (ax, ay, az, aw) For next time... Reading: Through Sec 3.1.5 in Moller & Haines Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 1 January 17, 2007 10 ...
View Full Document

Ask a homework question - tutors are online