1 / 61

Interactive Computer Graphics

Interactive Computer Graphics Instructor: Amin Hammad E-mail: hammad@cmu.edu URL: hammad.ce.cmu.edu Office Hours: Room 747 Monday 9:00-11:00 (or by appointment) Administrivia of Course Website (hammad.ce.cmu.edu) TA: Cholyeun Hongpisanwiwat cholyeun@sis.pitt.edu

albert
Download Presentation

Interactive Computer Graphics

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 Graphics Instructor: Amin Hammad E-mail: hammad@cmu.edu URL: hammad.ce.cmu.edu Office Hours: Room 747 Monday 9:00-11:00 (or by appointment)

  2. Administrivia of Course • Website (hammad.ce.cmu.edu) • TA: Cholyeun Hongpisanwiwat cholyeun@sis.pitt.edu • Office Hours: Monday 9:00-11:00 (or by appointment) • Book: Interactive Computer Graphics (Edward Angel) • Collaboration Policy • Grading: Assignments (45%) + Tests (40%) + Quizzes (15%) • Difficulty/Time required • Programming environment (mainly Visual C++) • Questions?

  3. What is Computer Graphics? • Anything to do with visual representations on a computer, including • Text (e.g. Japanese characters 大学) • GUIs • Computer Images • 3D Graphics: CG special effects, games, animations • Scientific Visualization • Algorithms, theory (physics, math, computation) • Display devices, hardware (graphics cards, monitors)

  4. Course Outline • Graphics Systems and Models • Graphics Programming • Input and Interaction • Geometric Objects and Transformation • Viewing • Shading • Advanced Topics (Object-oriented graphics, texture mapping, curves, etc.)

  5. Contents • General Overview: History and applications of CG • Graphics Systems • Colors Perception • Computer Colors: RGB and HSL • OpenGL Introduction • Some CG demos. Reading: Angel 1, 2.4

  6. Historical Background: Sketchpad • Ivan Sutherland, 1963, MIT: “Sketchpad: A man machine Graphical communications system” (first interactive graphics thesis, included many GUI concepts) Inspired many early graphics researchers • Sutherland also pioneered VR and hidden surface problems • 1988 Turing award “for his pioneering and visionary contributions to computer graphics, starting with sketchpad…”

  7. From Text to GUIs • Xerox Star: First workstation with GUI • Invented at PARC in 1975. Used in the Apple Macintosh, and now MS Windows. Xerox Star Windows 1.0

  8. Graphical applications • Presentations (bar charts, graphs, Powerpoint) • Scientific Visualization Compressible flow around Space shuttle science.gmu.edu

  9. 3D Graphics • Maybe what we generally consider CG • Currently important in • Design (CAD) • Education, Simulators, VR • Games • Entertainment (Movies), Art

  10. Landscape simulation of Los Angeles (UCLA)

  11. Effects needed for Realism • Shadows • Reflections (Mirrors) • Transparency • Detail (Textures etc.) • Complex Illumination • Realistic Materials The light of Mies van der Rohe Modeling: Stephen Duck Rendering: Henrik Wann Jensen

  12. Geometry 70s, 80s: Splines 90s: Range Data Rendering Algorithm 80s,90s: Physically-based Materials/Lighting (Texture, reflectance, Lighting) Realistic Input Models Required Arnold Renderer: Marcos Fajardo Photorealistic Rendering

  13. Output Devices Processor Frame Buffer Memory Interactive CG Systems Input Devices Cathode Ray Tube (CRT) Liquid Crystal Display (LCD)

  14. Cathode Ray Tube (CRT) Electron Gun Phosphor Field

  15. Cathode Ray Tube (CRT) Electron Gun Phosphor Field Deflectors

  16. Phosphors Decay • Light coming from a single phosphor does not last long. • Human eye can detect a difference within 20 milliseconds • To appear without flicker, the entire screen should be redrawn (Refreshed) at least 50 times per second (50 Hz)

  17. The Frame Buffer • Phosphors are logically arranged into a 2D array of pixture elements (pixels) • The Frame Buffer stores the array of pixels that are to be activated when the display is refreshed • Resolution of Frame Buffer denotes the size of the array: e.g. 1280 x 1024

  18. Frame Buffer Monochrome System Display 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 000011000011000000000000 000011000011000000000000 000000000000000000000000 000000000000000000000000 001000000000001000000000 000100000000010000000000 000010000000100000000000 000001111111000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000

  19. Interlacing • Because phosphors are small, it is difficult for the eye to distinguish from one phosphor to the next. • Interlacing– To refresh every other row of the display within 50Hz.

  20. Colors in the Frame Buffer • Depth: refers to how many bits represent each pixel. • Adding bits allows the frame buffer to store not only if a pixel is active, but also what color it should be • 8 bits = 256 colors

  21. Triad Color CRT Deflectors Phosphor Field

  22. Color Displays • Color code is stored in the frame buffer • Display translates color code into intensities for three electron guns. • Each gun fires into an appropriately colored phosphor in a group of three (known as a triad). • Triad = Pixel

  23. Color Spectrum Our sense of color is derived from a physiological response to lightwaves in the visible electromagnetic spectrum

  24. C(λ) 400 700 λ Color Blending • Light that we see is made up of photons moving at varying wavelengths • A Color is actually defined by continuous function C(λ) across all wavelengths of the visible spectrum

  25. Human Visual System • Retina is comprised of Rod cells and 3 types of Cone cells Iris • Rods sense dark/light • Each type of the Cones responds best to a particular wavelength.

  26. Sensitivity of Cones

  27. Tri-color Model • The eye breaks down incoming light into a triplet of values (RGB). • The brain converts that triplet back into a single (perceived) color • Instead of representing color as a continuous function, we can simplify our representation to a triplet of Red, Green & Blue intensities.

  28. G (0,1,0) (1,1,0) (0,1,1) (1,1,1) (1,0,0) (0,0,0) R (0,0,1) (1,0,1) B RGB Color Cube

  29. RGB Color Cube

  30. G (0,1,0) (1,1,0) (0,1,1) (1,1,1) (1,0,0) (0,0,0) R (0,0,1) (1,0,1) B RGB Color Cube What does this line represent?

  31. Alternative Color Model: HSL • Hue: A specific color (usually selected on a continuum) • Saturation: How much is the dominant wavelength distinguished from the other colors (How much “white” has been added) • Lightness: How bright does the color appear.

  32. Understanding HSL What is the darkest color possible? Black What is the lightest color possible? White What is the color if Saturation = 0? Gray What is the color if Saturation = 1? “Pure” Color

  33. HSL Cones White Black

  34. HSL Cones White Grayscale Black

  35. HSL Cones Pure Color

  36. Color Coding • Full spectrum can be specified using 3 numbers. (RGB or HSL) • These values can be coded into a single number and stored in the frame buffer

  37. The Pinhole Camera and Synthetic Camera Models Image plane Pinhole • An ideal pinhole camera has an infinite depth of field (all points are in focus) • The angle of view : the angle made by the largest object that the camera can image on its film plane. Illustration courtesy Greg Humphries

  38. Ray Tracing • Arbitrary paths: realism • Trace from light • Most light rays don’t hit eye • Eye Ray tracing • Primary Rays • Shadow Rays • Reflected/Transmitted Rays Appel 68

  39. Pipeline Architecture for Graphics APIs (Application Programmer’s Interface) Frame Buffer Numeric Data Clipper Projector Rasterizer Transformer Graphics Renderer Numeric Data: Mathematical Representations of graphical shapes. Often in terms of vertices and lines.

  40. Pipeline Architecture for Graphics APIs Frame Buffer NumericData Clipper Projector Rasterizer Transformer Transformer: Mathematical operations are performed on the data to handle movement and positioning of the graphical representation

  41. Pipeline Architecture for Graphics APIs Frame Buffer Numeric Data Clipper Projector Rasterizer Transformer Clipper: Limits the size of the dataset to contain only information that should be displayed for a given point-of-view

  42. Pipeline Architecture for Graphics APIs Frame Buffer Numeric Data Clipper Projector Rasterizer Transformer Projector: Until this stage, our numeric representation has been dealing with a 3D model. This stage reduces the dataset to 2D

  43. Pipeline Architecture for Graphics APIs Frame Buffer Numeric Data Clipper Projector Rasterizer Transformer Rasterizer: The processed numeric information is finally converted into individual pixels

  44. Pipeline Architecture for Graphics APIs Frame Buffer Numeric Data Clipper Projector Rasterizer Transformer Frame Buffer: Pixels are sent to the Frame Buffer to be displayed at the next refresh.

  45. OpenGL • OpenGL is a graphics API • Software interface to graphics hardware • Hardware independent • No windowing or high-level tasks • Higher level API utilities available (GLU) • Application -> Higher level -> OpenGL -> Hardware • Window system separate (GLUT, Motif, etc.) • Benefits: • Fast, standard, portable, window-systemindependent • Other APIs GKS(Graphical Kernel System) PHIGS (Programmer’s Hierarchical Interactive Graphics System)

  46. GL Related APIs GL: implements the Graphics Renderer using pipeline architecture GLU: (Utilities) provides some higher level interfaces for projections and viewing GLUT: (Utility toolkit) provides window management and event handling

  47. 10 minutes break

  48. Y Line Polygon Point x4,y4 x6,y6 x7,y7 x3,y3 x1,y1 x4,y4 x5,y5 x2,y2 x3,y3 x8,y8 x1,y1 x1,y1 x2,y2 X + Geographic Information System • A system for processing digital thematic maps • representing geographic features and their attributes.

  49. Proposed Designs for a New Park

  50. Case Study Area

More Related