1 / 29

Interactive Computer Graphics Introduction

Interactive Computer Graphics Introduction. James Gain and Edwin Blake Department of Computer Science University of Cape Town July 2002 jgain@cs.uct.ac.za. Map of the Lecture. Applications of Computer Graphics Graphics Systems Evolution of Computer Imagery Course Information Topics

boyds
Télécharger la présentation

Interactive Computer Graphics Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interactive Computer GraphicsIntroduction James Gain and Edwin Blake Department of Computer ScienceUniversity of Cape Town July 2002jgain@cs.uct.ac.za Collaborative Visual Computing Laboratory

  2. Map of the Lecture • Applications of Computer Graphics • Graphics Systems • Evolution of Computer Imagery • Course Information • Topics • Practicals • Background Reading • Marks Interactive Computer Graphics Contents

  3. Applications of ComputerGraphicsI • A driving force behind CG innovation • Display of Information • Floor plans in Architecture • Maps in GIS • Imaging in Medicine • Scientific and Financial Visualization • Digital Publishing • Design • Architecture • Mechanical Parts • VLSI Circuits Interactive Computer Graphics Contents

  4. Applications of Computer Graphics II • Simulation • Virtual Reality Training (flight, surgery, etc.) • Robotics Research • Games • Special Effects and Animation for Film • User Interfaces • WIMP • Internet Browsers • Innovative Interfaces Interactive Computer Graphics Contents

  5. A Graphics System • Elements of a CG System: • Processor, Memory, Frame Buffer • Input Devices, Output Devices Interactive Computer Graphics Contents

  6. Pixels and the Frame Buffer • Raster (as opposed to vector) Display • Picture swept out in horizontal rows • Pixels (picture elements) • Squares of a uniform colour on a grid • Frame buffer • Memory store of pixels • Depth • Number of bits used for a pixel • True colour has >= 24 bits • Often use RGB, a combination of red, green, blue primaries • Rasterization (scan conversion) • converting geometric primitives (lines, polygons) to pixels Interactive Computer Graphics Contents

  7. Output Devices • Cathode-Ray Tube (CRT) • Electron beam steered by deflection plates to strike and activate phosphors • Only emits for milliseconds and needs to be refreshed • Refresh Rate • Sufficlently high redisplay to avoid flicker • Interlacing displays odd and even rows alternately • Colour Displays • a triad of coloured phosphors • A shadow mask ensures only the correct phosphors are excited Interactive Computer Graphics Contents

  8. Input Devices • Keyboard • Input characters • “QWERTY” originally designed to slow typists down • 2-D Locators: • Mouse, light pen, data tablet • 3-D Locators • Trackers, 3-D Mouse • Haptics (Force Feedback) • Phantom • Data can also be input from dials, switches, digital camera Interactive Computer Graphics Contents

  9. A Sequence of Images I Wireframe Flat Shaded Interactive Computer Graphics Contents

  10. A Sequence of Images II Textured Smooth Shaded Interactive Computer Graphics Contents

  11. A Sequence of Images III Modelling: Set Operations Interactive Computer Graphics Contents

  12. Final Image Interactive Computer Graphics Contents

  13. Exercise: Realism • Question: Consider some recent computer animated films (Shrek, Toy Story 2, Final Fantasy, Ice Age). Which aspects do you feel where particularly realistic and which unrealistic? Try to name particular scenes. • Answer: Interactive Computer Graphics Contents

  14. Image Formation • Combining objects and viewers to produce an image • Objects: • Exist independently of image formation • Constructed from geometric primitives (vertices) • Viewers: • Form the 2-D image of the objects from a particular perspective Interactive Computer Graphics Contents

  15. Light and Images • Light interacts with objects and a portion enters the camera lense or eye • Visible light has wavelengths in the range 350-780 nm • CG often assumes point light sources that emit constant intensity light from a single location • CG often ignores the wave nature of light Interactive Computer Graphics Contents

  16. Ray Tracing • Rays (semi-infinite lines) are traced from the light source. Some of them eventually strike the image plane • Light may be reflected, scattered or refracted as it strikes objects • Ray tracing is based on this principle but is (arguably) too computationally costly in many cases • A simple approximation is to assume uniform ambient light levels Interactive Computer Graphics Contents

  17. Human Visual System • Cones: • Central high resolution colour • Three types, roughly r, g, b • Rods: • peripheral low resolution monochromatic • Visual acuity measures how closely two point can be placed and still distinguished • Respond differently to different wavelengths according to the CIE standard observer curve • Signal sent along optic nerves to visual cortex for very sophisticated high-level processing Interactive Computer Graphics Contents

  18. The Synthetic Camera Model • Computer generated and optical (camera) image formation are equated • Image of a point is found by drawing a line from the point through the centre of projection of the lense onto the projection plane • CG moves the projection plane in front of the camera and uses a clipping window to limit the size of the image • Together the centre of projection, projection plane and clipping window define the image Interactive Computer Graphics Contents

  19. Application Programmer’s Interface • Shield a programmer from the underlying hardware and software • Provide a system metaphor (the synthetic camera model) • Examples: OpenGL, PHIGS, Direct3D, Java-3D • API needs to allow specification of: • Objects • Viewer • Light Sources • Material Properties • OpenGL code for a triangle • glBegin(GL_POLYGON); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd(); Interactive Computer Graphics Contents

  20. The Modelling-Rendering Paradigm • Modelling of the scene can be separated from production of the image • Different requirements (modelling - interactive, rendering - high quality) • Objects are viewer independent • Leads to specialisation (e.g. RenderMan renderer and FreeForm modeller) • Dominant in CAD and SFX • Approach adopted in this course (rendering first half, modelling second half) Interactive Computer Graphics Contents

  21. Graphics Architectures • For efficiency implement much of the graphics API in hardware • Display processors: • Unburden the host processor • Compile primitives as a display list rendered by the display processor • Pipeline Architectures: • Increases throughput where a sequence of identical operations are applied to a stream of data • Geometry has this property Interactive Computer Graphics Contents

  22. Geometric Pipeline • Transformations: • Need to transform from object to camera to screen coordinates • Encoded as a 4x4 matrix • Clipping: • Limited field of view so cut geometry against the clipping rectangle • Projection: • Flatten objects from 3-D to 2-D • Rasterization: • Convert objects to pixels in the frame buffer • But need to balance latency (time for a single datum to pass) against throughput (rate at which datum are output) Interactive Computer Graphics Contents

  23. Course Information • Interdisciplinary (little bits of physics, maths, psychology, engineering) • Sufficient to be an independent practitioner • 3rd period, Room 302 (alternates with CPL/PLT) • 30 lectures • Course information on the WWW: • www.cs.uct.ac.za/Courses/CS300W/IG • www.people.cs.uct.ac.za/~jgain/courses • Lecturers: • Dr James Gain (jgain@cs.uct.ac.za) • Prof Edwin Blake (edwin@cs.uct.ac.za) • Textbook: • “Interactive Computer Graphics: A Top-Down Approach with OpenGL” (2nd ed.), E. Angel, Addison-Wesley, 2000 Interactive Computer Graphics Contents

  24. Topics • Introduction - ch. 1 • Graphics Programming (Basic OpenGL) - ch. 2 • Geometric Objects and Transformations - ch. 4 • Viewing - ch. 5 • Shading - ch. 6 • Implementation of a Renderer - ch. 7 • Hierarchical and Object-Oriented Graphics - ch. 8 • Input and Interaction - ch. 3 • Discrete Techniques - ch. 9 • Curves and Surfaces - ch. 10 • Procedural Methods - ch. 11 • Modelling - additional topic • Special Effects - additional topic Interactive Computer Graphics Contents

  25. A Guide to Surviving the Mathematics • Contrary to expectations CG does not require advanced maths • Master the mathematics before the course (do exercise 0) • Mostly Linear Algebra • Vectors • addition • dot product, cross product • Line equations, plane equations, normals • Matrices, transformations • Curves and approximations • polynomials • circles, ellipses, parabolas • parameters, functions Interactive Computer Graphics Contents

  26. Further Reading • The Graphics Bible: • “Computer Graphics: Principles and Practice” (2nd ed), J.D.Foley, S.K. Feiner, A. van Dam, J.F. Hughes, Addison-Wesley, 1996 • ACM Digital Library http://www.acm.org • Computer Bibliography Database • SIGGRAPH Conference Proceedings • Journals (Transactions on Graphics, etc) • IEEE Computer Society: http://www.computer.org • Computer Graphics and Applications Magazine • Transactions on Computer Graphics and Visualization • Eurographics: http://www.eg.org • Computer Graphics Forum Interactive Computer Graphics Contents

  27. Practicals • Available on the WWW: www.cs.uct.ac.za/Courses/CS300W/IG/Assignments • 3 Practicals: • Shading: Glut, Phong & Gouraud Shading (3 weeks) • Scene Graph: OpenGL, CoordinateTransformations, Perspective (4 weeks) • Animation (3 weeks) • Time estimate depends on your knowing the material! • Tutor: • Matthew Hampton (mhampton@cs.uct.ac.za) • Copying: • All practicals must be entirely your own work • You may not copy from previous years Interactive Computer Graphics Contents

  28. Mark Breakdown • 3 practicals, 1 test, 1 final exam • Practical work 35% • Class test 15% • Examination 50% • Final exam: • One and a half hours • Open Book • 1 compulsory question • choice of 2 out of 3 remaining Interactive Computer Graphics Contents

  29. Hey, I want to do more Computer Graphics! Honours Visualization Advanced Graphics Useability Virtual Reality Image Processing Outside Small firms (WEB !) Further study overseas Masters — Collaborative Visual Computing Lab: Collaborative Virtual Environments; Computer Graphics; Cooperative Visualization; Usability and Human Computer Interaction Web-based applications; Medical Imaging Life After the Exam Interactive Computer Graphics Contents

More Related