Learning Resour ces CS131 Notesclux.x-pec.com/files/mathstuff/4thyear/CS324 Computer...
Transcript of Learning Resour ces CS131 Notesclux.x-pec.com/files/mathstuff/4thyear/CS324 Computer...
Computer GraphicsCS324
Dr Abhir Bhalerao
Department of Computer ScienceUniversity of Warwick
Coventry CV4 7AL
TJA 1999-2003, AHB 2004+
Overview• 30 Lectures
• 3hr Exam
• Recommended books:
• Hearn and Baker, Computer Graphics with Open GL, 3rd Edition.
• Advanced Animation and Rendering Techniques, Watt and Watt, 1996.
• Numerous others, see course web pagehttp://www2.warwick.ac.uk/fac/sci/dcs/
teaching/material/cs324
Monday 10am - L5
Wednesday 9am - F107
Thursday 9pm - CS104
Books
Hearn &Baker£50
Watt£51
Foley et al(White Book)
£46
Watt & Watt£44
(out of print?)
OpenGL
The Red Book£41
Rani RostThe 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
CS131 Notes
• Note 3: Vectors
• 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 1973Jack Burness, DEC
The ‘Utah’ Teapot
‘Wireframe’ modelTexture Mapping/Environment Mapping
Avro’s Backward Ray Tracking
Shadows, Diffuse light effects: Radiosity
Gaming: Halo Screen ShotGaming: Halo II Screen Shot
Cranio-facial surgery planning from SPL, HarvardInterventional 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
A Short HistoryEarly Years: 1960’s
1961Computer animations for physical simulation.Zajac displays satellite research using CG
1963Sutherland at MIT invents Sketchpad (CAD)Vector displays, interaction. Englebart invents mouse.
1968 Evans and Sutherland founded.
1969 First SIGGRAPH
Sketch PadIvan Sutherland - MIT
The Utah Dynasty:1970-1975
1970 Bezier develops his curves.
1971 Gouraud shading.
1972 Ping-pong game developed.
1973Westworld film first to use computer animation.
1974Catmul develops z-buffer.First computer animated short. Keyframe animation and morphing.
1975Phong shading.Newell models Utah teapot with Bezier patches.
Pierre Bezier(Automobile Eng. Renault 1962)
Raster Graphics and Ray Tracing:1975-1980
1976 Blinn develops texture and bump mapping.
1977 Star Wars: CG used for Death Star ‘plans’
1979 Whitted develops ray tracing.
Quest for Realism:1975-1990
1982Largely animated feature: Tron. Wrath of Kahn.Particle systems.
1984The 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!
1995Toy Story: fully animated CG. TV shows using CGI routinely: STNG, Babylon 5 etc.
1990s-Present-Future?
• Interactive environments realised
• Scientific and medical visualisation
• Artistic rendering
• 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
Display
Pointer
Keyboard
ApplicationModel
Graphics System
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 non-graphical 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
OpenGL Graphics System
DisplayList
Evaluator Per-Vertex
Raster-ization
Per-Fragment
FrameBuffer
PixelOperations
TextureMemory
OpenGL Graphics System
• 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
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