Computer Graphics CS324 Dr Abhir Bhalerao Department of Computer Science University of Warwick Coventry CV4 7AL TJA 1999-2003, AHB 2004+ 30 Lectures 3hr Exam Overview Recommended books: Hearn and Baker, Computer Graphics with Open GL, 3rd Edition. Advanced Animation and Rendering Techniques, Watt and Watt, 1996. Monday 10am - L5 Wednesday 9am - F107 Thursday 9pm - CS104 Numerous others, see course web page http://www2.warwick.ac.uk/fac/sci/dcs/ teaching/material/cs324 Books OpenGL Hearn & Baker 50 Watt 51 Foley et al (White Book) 46 Watt & Watt 44 (out of print?) The Red Book 41 Rani Rost The Orange Book 41 Green Book! 24 Learning Resources Reading background in recommeded books strongly advised OpenGL resources and example programs: learning through doing encouraged Lecture slides in PDF form on course web pages. Look at 1st year maths notes Note 3: Vectors CS131 Notes Note 8: Matrix Algebra Note 10: Determinants and Inverses Note 11: Matrices and Linear independence Note 12: Introduction to Linear Transformations Note 13: Matrices and Linear Transformations Note 14: Eigenvalues, Eigenvectors and Diagonalization
What s the point of these lectures? Introduction to main topic areas Some detail and working through standard and tricky algorithms Ilustrations: example screen shots and demo programs where approriate and relevant Why should you attend? Examples: An illustrated tour. Lets look at some pretty pictures and videos! 2D Vector Graphics Lunar lander 1973 Jack Burness, DEC The Utah Teapot Wireframe model Texture Mapping/Environment Mapping
Avro s Backward Ray Tracking Shadows, Diffuse light effects: Radiosity Gaming: Halo Screen Shot Gaming: Halo II Screen Shot Cranio-facial surgery planning from SPL, Harvard Interventional Surgery Navigation: Slicer, SPL, Harvard
The Digital Michaelangelo Project: Stanford. Mark Levoy Applications Basis of GUIs (2D and now 3D with blending, texture mapping for skins ) Graphs and Charts, Presentation graphics CAD VR Environments Data Visualisation Education and training: Flight simulators Art and Entertainment: games, CGI 1961 1963 A Short History Early Years: 1960 s Computer animations for physical simulation. Zajac displays satellite research using CG Sutherland at MIT invents Sketchpad (CAD) Vector displays, interaction. Englebart invents mouse. Sketch Pad Ivan Sutherland - MIT 1968 Evans and Sutherland founded. 1969 First SIGGRAPH The Utah Dynasty: 1970-1975 Pierre Bezier (Automobile Eng. Renault 1962) 1970 Bezier develops his curves. 1971 Gouraud shading. 1972 Ping-pong game developed. 1973 1974 1975 Westworld film first to use computer animation. Catmul develops z-buffer. First computer animated short. Keyframe animation and morphing. Phong shading. Newell models Utah teapot with Bezier patches.
Raster Graphics and Ray Tracing:1975-1980 1976 Blinn develops texture and bump mapping. 1977 Star Wars: CG used for Death Star plans 1982 1984 Quest for Realism: 1975-1990 Largely animated feature: Tron. Wrath of Kahn. Particle systems. The Last Star Fighter: CG replaces models. Early attempts at realism. 1986 Luxo Jr from Pixar nominated for Oscar. 1989 Tin Toy from Pixar wins Oscar! 1979 Whitted develops ray tracing. 1995 Toy Story: fully animated CG. TV shows using CGI routinely: STNG, Babylon 5 etc. 1990s-Present-Future? Interactive environments realised Artistic rendering Scientific and medical visualisation Image based rendering, path tracing, photon maps etc. Real-time, photorealistic rendering on consumer h/w? Interactive CG movies? Ubiquitous computing, vision + graphics... Overview of Interactive Computer Graphics Application Model Application Graphics System Pointer Display Keyboard Interactive Computer Graphics System Consists of: Software components: Applications program, model and Graphics System Hardware components: Graphics hardware, display devices and input devices Software Components of Interactive Graphics System 1 Application Program: Handles User Input Reads and Writes Application Model Outputs Graphics Primitives to Graphics System to specify what is to be displayed and how.
Software Components of Interactive Graphics System 2 Application Model: Represents objects to be visualised Graphics System: Generates images in a framebuffer from graphics commands Transforms graphics commands Passes User Input to Application Program Hardware Components of Interactive Graphics System Display Device Frame Buffer, etc + physical display device Interaction Devices Keyboard, Mouse, etc Graphics System (usually includes hardware acceleration of some of its operations) Application Modelling Model is application specific Model captures data, objects, relationships relevant to the display, interaction, and nongraphical aspects of the application Painting programs do not have a model Drawing programs do have a model Application Model Models store primitives of 2D or 3D objects (points, lines, polygons, cylinders, spheres, curved surfaces, etc) Model attaches Attributes to primitives (line style, colour, texture, etc) Model provides connectivity and positioning Application program commands to Graphics System 1 Two phases to generating an image: Application program traverses model to extract objects to be viewed, Extracted objects are transformed into function or procedure calls for graphics system Application program commands to Graphics System 2 Data from Model must be geometric or converted to geometric form by application program Geometric primitives not supported by Graphics System are broken down into primitives that the Graphics System can display
Graphics System? Eg OpenGL Renders graphics primitives into display hardware (frame buffer) Primitives are: Points, Lines, Polygons, or pixel rectangles. GL operations described by function or procedure calls on a Client-Server basis Display List OpenGL Graphics System Evaluator Pixel Operations Per- Vertex Texture Memory Rasterization Per- Fragment Frame Buffer OpenGL Graphics System Programmable Shader Pipeline Display List - queue of commands Evaluator - takes curved surfaces and generates polygons Per-vertex - points, lines, polygons (PLT) transformed, lit, and clipped Rasterization - PLT s mapped to frame buffer addresses and values Fragment - conditional updates (eg depth) Programmable Shader Pipeline Course Content 1 Human Visual Perception and Graphics Devices Device independence and Graphics Pipelines Affine Geometries, Projections and Projective transformations Polygons and Hidden Surface Removal
Contents 2 Lighting and Shading Ray Tracing including texture mapping Global Illumination (radiosity) Parametric Representations: Spline curves and surfaces Volume Rendering