Image Formation. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Similar documents
Computer Graphics. Computer graphics deals with all aspects of creating images with a computer

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

CS130 - Intro to computer graphics. Dr. Victor B. Zordan vbz@cs.ucr.edu Objectives

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Lecture Notes, CEng 477

Graphical displays are generally of two types: vector displays and raster displays. Vector displays

INTRODUCTION TO RENDERING TECHNIQUES

Over the past decade, computer and communication technologies have become

Gursharan Singh Tatla Page No. 1 COMPUTER GRAPHICS (Short Answer type Questions)

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

A Short Introduction to Computer Graphics

1. INTRODUCTION Graphics 2

Important Question with Answer

Introduction to Computer Graphics

1. Application of Computer Graphics

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Overview. Raster Graphics and Color. Overview. Display Hardware. Liquid Crystal Display (LCD) Cathode Ray Tube (CRT)

Fundamentals of Computer Graphics

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Prof. Dr. M. H. Assal

Displays. Cathode Ray Tube. Semiconductor Elements. Basic applications. Oscilloscope TV Old monitors. 2009, Associate Professor PhD. T.

Computer Graphics Hardware An Overview

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Computer Graphics. Anders Hast

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

PRODUCT LIFECYCLE MANAGEMENT COMPETENCY CENTRE RENDERING. PLMCC, JSS Academy of Technical Education, Noida Rendering 1 of 16

TH2. Input devices, processing and output devices

The Keyboard One of the first peripherals to be used with a computer and is still the primary input device for text and numbers.

CRT and LCD monitors properties and problems. Maarten Demeyer October

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Lezione 4: Grafica 3D*(II)

Input and Interaction

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Pages Figure 6-1. Page 305

1. Three-Color Light. Introduction to Three-Color Light. Chapter 1. Adding Color Pigments. Difference Between Pigments and Light. Adding Color Light

1 Laboratory #5: Grating Spectrometer

COMPUTER GRAPHICS Computer Graphics

Introduction to Computers, Anatomy of Computers, Input and Output Devices

CS 325 Computer Graphics

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Graphics Input Primitives. 5. Input Devices Introduction to OpenGL. String Choice/Selection Valuator

USING PROFESSIONAL PLASMA DISPLAYS AS EVALUATION GRADE VIDEO MONITORS. Peter H. Putman, CTS ROAM Consulting L.L.C. Doylestown, PA

C O M P U T E R G R A P H I C S. Computer Graphics. Introduction I. Guoying Zhao 1 / 58

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

Lesson 10: Video-Out Interface

How To Use 3D On A Computer Or Tv

Adding Animation With Cinema 4D XL

Computer Peripherals

Alternative Methods Of Input. Kafui A. Prebbie 82

Chapter 9 Input/Output Devices

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Computer Peripherals

RADEON 9700 SERIES. User s Guide. Copyright 2002, ATI Technologies Inc. All rights reserved.

Beyond 2D Monitor NVIDIA 3D Stereo

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

A System for Capturing High Resolution Images

A technical overview of the Fuel3D system.

Digital Versus Analog Lesson 2 of 2

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

A comparison between a CRT and a LCD monitors colors rendering

Kapitel 12. 3D Television Based on a Stereoscopic View Synthesis Approach

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Introduction Week 1, Lecture 1

GRAFICA - A COMPUTER GRAPHICS TEACHING ASSISTANT. Andreas Savva, George Ioannou, Vasso Stylianou, and George Portides, University of Nicosia Cyprus

Optimized Design for MEMS Based Automotive Laser Pico Projectors

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

Introduction To Computers: Hardware and Software

Plasma Display Panel (PDP) vs. Liquid Crystal Display (LCD) Technology: An Overview of Consumer Benefits for Home Theater Applications

ELECTRONIC DOCUMENT IMAGING

Understanding Megapixel Camera Technology for Network Video Surveillance Systems. Glenn Adair

Image Synthesis. Transparency. computer graphics & visualization

COMPUTER SCIENCE AND ENGINEERING - Basic Functions and Operational Units - Kevin Skadron, BASIC FUNCTIONS AND OPERATIONAL UNITS

Introduction to Computer Graphics

Scanners and How to Use Them

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Hardware for Multimedia. Input and Output Devices. Most important components of a multimedia system. Devices classified as per their use

Digital Video-Editing Programs

OpenGL Performance Tuning

Prepared by: Paul Lee ON Semiconductor

Teaching Introductory Computer Graphics Via Ray Tracing

Real-Time Graphics Architecture

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Interaction. Triangles (Clarification) Choice of Programming Language. Display Lists. The CPU-GPU bus. CSCI 480 Computer Graphics Lecture 3

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

Data Storage 3.1. Foundations of Computer Science Cengage Learning

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

Geant4 Visualization. Andrea Dotti April 19th, 2015 Geant4 M&C+SNA+MC 2015

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

PDF Created with deskpdf PDF Writer - Trial ::

Examples. Pac-Man, Frogger, Tempest, Joust,

Touchstone -A Fresh Approach to Multimedia for the PC

Quick start guide! Terri Meyer Boake

Computer Hardware HARDWARE. Computer Hardware. Mainboard (Motherboard) Instructor Özgür ZEYDAN

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Lawrence Township Cable and Telecommunication Advisory Committee FAQs

Graphic Communication

Digital Image Basics. Introduction. Pixels and Bitmaps. Written by Jonathan Sachs Copyright Digital Light & Color

Transcription:

Image Formation CMPT 361 Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller

Today Input and displays of a graphics system Raster display basics: pixels, the frame buffer, raster scan, LCD displays Historical perspective Image formation The ray tracing algorithm The z-buffer algorithm Readings: Sections 1.2-1.5, 11.2 (Ray tracing), 6.11.5 (z-buffering) Machiraju/Zhang/Möller 2

Overview of a graphics system Output device Input devices Image formed and stored in frame buffer Machiraju/Zhang/Möller 3

Input devices Pointing/locator devices: indicate location on screen Mouse/trackball/spaceball Data tablet Joystick Touch pad and touch screen Keyboard device: send character input Choice devices: mouse buttons, function keys Machiraju/Zhang/Möller 4

More sophisticated interaction Machiraju/Zhang/Möller 5

Input devices for CMPT 361 CMPT 361 Use simple keyboard and mouse commands to interact with your OpenGL program Machiraju/Zhang/Möller 6

Output: cathode-ray tube (CRT) Machiraju/Zhang/Möller 7

CRT basics The screen output is stored in the frame buffer and is converted into voltages across the reflection plates via a digital-to-analog converter (DAG) Light is emitted when electrons hit phosphor But light output from the phosphor decays exponentially with time, typically in 10 60 microseconds Thus the screen needs to be redrawn or refreshed Refresh rate is typically 60 Hz to avoid flicker ( twinkling ) Flicker: when the eye can no longer integrate individual light pulses from a point on screen, e.g., due to low refresh rate Machiraju/Zhang/Möller 8

Shadow-mask color CRTs Three different colored phosphors (R, G, B) dots are arranged in very small groups (triads) on coating We see a mixture of three colors Three electron guns (R, G, B) emit electron beams in a controlled fashion so that only phosphors of the proper colors are excited Shadow-mask CRT Machiraju/Zhang/Möller 9

Flat-panel displays CRTs are no longer the most widely used display devices nowadays Flat-panel displays, e.g., LCDs or liquid-crystal displays and plasma displays dominate Flat-panel displays can be emissive (plasma) or nonemissive (LCD) allowing for light to pass through Colors can be produced in using triads (sub-pixels) Screen refresh no longer necessary See pp. 8 of text or Chapter 4 of Foley et al. for more on flat-panel technologies (or check out the wikipedia) Machiraju/Zhang/Möller 10

A generic flat-panel display Machiraju/Zhang/Möller 11

High Dynamic Range Displays High resolution colour LCD Courtesy: High Dynamic Range Display Low resolution Individually Modulated LED array Machiraju/Zhang/Möller 12

Raster display basics The screen is a rectangular array of picture elements, or pixels Resolution: determines the details you can see number of pixels in an image, e.g., 1024 768, 1280x1024, 1366 x 768, etc. also in ppi or dpi pixel or dot per inch Machiraju/Zhang/Möller 13

Raster scan pattern Horizontal scan rate: # scan lines per second Interlaced (TV) vs. non-interlaced displays Scan line Vertical retrace Horizontal retrace Machiraju/Zhang/Möller 14

Video display standards NTSC (National Television System Committee): 525 lines, 30 frames/sec interlaced (visual system tricked into thinking that the refresh rate is 60 f/s) 480 lines visible North America, South America, Japan PAL/SECAM: 625 lines, 25 frames/sec interlaced Europe, Russian, Africa, etc. HDTV: 1,080 lines Machiraju/Zhang/Möller 15

The frame buffer Stores per-pixel information Depth of a frame buffer: number of bits per pixel E.g. for color representation, 1 bit => 2 colors, 8 bits => 256 colors, 24 bits => true color (16 million colors) Color buffer is only one of many buffers, other information, e.g., depth, can also be used Implemented with special type of memory in standard PCs or on a graphics card for fast redisplay Part of standard memory in earlier systems Machiraju/Zhang/Möller 16

Comp Graphics: 1950-1960 Computer graphics goes back to the earliest days of computing Strip charts Pen plotters Simple displays using A/D converters to go from computer to calligraphic CRT Cost of refresh for CRT too high Computers slow, expensive, unreliable Machiraju/Zhang/Möller 17 adapted from Angel and Shreiner

Comp Graphics: 1960-1970 Wireframe graphics Draw only lines Sketchpad Display Processors Storage tube wireframe representation of sun object Machiraju/Zhang/Möller adapted from Angel and Shreiner 18

Sketchpad Ivan Sutherland s PhD thesis at MIT Recognized the potential of man-machine interaction Loop Display something User moves light pen Computer generates new display Sutherland also created many of the now common algorithms for computer graphics Machiraju/Zhang/Möller adapted from Angel and Shreiner 19

Comp Graphics: 1970-1980 Raster Graphics Beginning of graphics standards IFIPS GKS: European effort Becomes ISO 2D standard Core: North American effort 3D but fails to become ISO standard Workstations and PCs Machiraju/Zhang/Möller adapted from Angel and Shreiner 20

Raster Graphics Allows us to go from lines and wire frame images to filled polygons Machiraju/Zhang/Möller adapted from Angel and Shreiner 21

Comp Graphics: 1980-1990 Realism comes to computer graphics smooth shading environment mapping bump mapping Machiraju/Zhang/Möller adapted from Angel and Shreiner 22

Comp Graphics: 1980-1990 Special purpose hardware Silicon Graphics geometry engine VLSI implementation of graphics pipeline Industry-based standards PHIGS RenderMan Networked graphics: X Window System Human-Computer Interface (HCI) Machiraju/Zhang/Möller adapted from Angel and Shreiner 23

Comp Graphics: 1990-2000 OpenGL API Completely computer-generated featurelength movies (Toy Story) are successful New hardware capabilities Texture mapping Blending Accumulation, stencil buffers Machiraju/Zhang/Möller adapted from Angel and Shreiner 24

Computer Graphics: 2000- Photorealism Graphics cards for PCs dominate market Nvidia, ATI Game boxes and game players determine direction of market Computer graphics routine in movie industry: Maya, Lightwave Programmable pipelines Machiraju/Zhang/Möller adapted from Angel and Shreiner 25

Today Input and displays of a graphics system Raster display basics: pixels, the frame buffer, raster scan, LCD displays Historical perspective Image formation The ray tracing algorithm The z-buffer algorithm Readings: Sections 1.2-1.5, 11.2 (Ray tracing), 6.11.5 (z-buffering) Machiraju/Zhang/Möller 26

Image formation (aside) In computer graphics, we form 2D images via a process analogous to how images are formed by physical imaging systems Cameras Microscopes Human visual system Machiraju/Zhang/Möller 27

Elements of image formation Object: Exists independent of image formation and viewer defined in its own object space Formed by geometric primitives, e.g., polygons Viewer: Forms the image of the objects via projection onto an image plane Image is produced in 2D, e.g., on retina, film, etc. Objects need to be transformed into the image space Machiraju/Zhang/Möller 28

Also, light and color No light => nothing is visible How do we, or the camera, see? Light reflected off objects in the scene, or Light transmitted directly into our eyes, e.g., from light source What is reflected color? Light and object have color When colored light reaches a colored object, some colors are reflected and some absorbed Machiraju/Zhang/Möller 29

Light Light is the (visible) part of the electromagnetic spectrum that causes a reaction in our visual systems Generally these are wavelengths in the range of about 350-750 nm (nanometers) Long wavelengths appear as reds and short wavelengths as blues The electromagnetic spectrum Machiraju/Zhang/Möller 30

Simplistic color representation RGB-color system (R: red, G: green, B: blue) Each displayed color has 3 components: R, G, B 8 bits per component in 24-bit true-color display; component value: 0 255 (R,G,B) = (255,255,255) (0,0,0) (255,0,0) (255,255,0) (0,255,255) In OpenGL, RGB values are in [0,1] More details on lights and colors later in course Machiraju/Zhang/Möller 31

Imaging system: pinhole camera Use trigonometry to find projection of point at (x,y,z) x p = dx/z y p = dy/z z p = d Machiraju/Zhang/Möller 32

Synthetic camera model projector image plane center of projection Imaging model adopted by 3D computer graphics Machiraju/Zhang/Möller 33

First imaging algorithm Directly derived from the synthetic camera model Follow rays of light from a point light source Determine which rays enter the lens of the camera through the imaging window Compute color of projection Why is this not a good idea? Machiraju/Zhang/Möller 34

Ray tracing When following light from a light source, many (reflected) rays do not intersect the image window and do not contribute to the scene eye reflected ray pixel Image plane shadow ray refracted ray rays Reverse the process Cast one ray per pixel from the eye and shoot it into the scene Machiraju/Zhang/Möller 35

Ray tracing: the basics A point on an object may be illuminated by Light source directly through shadow ray Light reflected off an object through reflected ray Light transmitted through a transparent object through refracted ray eye reflected ray pixel Image plane shadow ray refracted ray Machiraju/Zhang/Möller 36

Ray tracing: the algorithm for each pixel on screen determine ray from eye through pixel if ray shoots into infinity, return a background color if ray shoots into light source, return light color appropriately find closest intersection of ray with an object cast off shadow ray (towards light sources) if shadow ray hits a light source, compute light contribution according to some illumination model cast reflected and refracted ray, recursively calculate pixel color contribution return pixel color after some absorption Most expensive Machiraju/Zhang/Möller 37

Machiraju/Zhang/Möller The WingsPov Civilisation Museum by Eric Ouvrard 38

Ray tracing: pros and cons Pros: Follows (approximately) the physics of optical flow High level of visual realism can model both lightobject interactions and inter-surface reflections and refractions Cons expensive: intersection tests and the levels of recursion (rays generated) Inadequate for modeling non-reflective (dull-looking) objects (why is that?) Machiraju/Zhang/Möller 39

Which is the most important ray? eye reflected ray pixel Image plane shadow ray refracted ray Machiraju/Zhang/Möller 40

The z-buffer algorithm Per-polygon operations vs. per-pixel for ray tracing Simple and often accelerated with hardware Works regardless of the order in which the polygons are processed no need to sort them back to front A visibility algorithm and not designed to compute colors OpenGL implements this fundamental algorithm glutinitdisplaymode(glut_single GLUT_RGB GLUT_DEPTH); glenable(gl_depth_test); glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT); Machiraju/Zhang/Möller 41

The algorithm for each polygon in the scene project its vertices onto viewing (image) plane end if for each pixel inside the polygon formed on viewing plane determine point on polygon corresponding to this pixel get pixel color according to some illumination model get depth value for this pixel (distance from point to plane) if depth value < stored depth value for the pixel end if update pixel color in frame buffer update depth value in depth buffer (z-buffer) Question: What does the depth buffer store after running the z-buffer algorithm for the scene? Does polygon order change depth? Image? Machiraju/Zhang/Möller 42

Machiraju/Zhang/Möller 43