Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 9: Raster Graphics and Pipeline

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Texture and Colour in Virtual Worlds Programming for 3D Applications.
Fundamentals of Digital Imaging
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
1 Lecture 2 Main components of graphical systems Graphical devices.
CS248 Midterm Review. CS248 Midterm Mon, November 4, 7-9 pm, Terman Aud Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
CS248 Midterm Review Szymon Rusinkiewicz. CS248 Midterm Monday, November 1, 7-9 pm Gates B01 and B03 Designed to be 1-hour exam Mostly “short answer”
(conventional Cartesian reference system)
CS248 Midterm Review. CS248 Midterm Mon, November 3, 7-9 pm, Gates B01 Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
CS248 Midterm Review Michael Green and Sean Walker (based on the work of previous TAs)
Sep 21, Fall 2006IAT 4101 Computer Graphics Overview Color Displays Drawing Pipeline.
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
CSc 461/561 CSc 461/561 Multimedia Systems Part A: 2. Image.
CS248 Midterm Review. CS248 Midterm Mon, November 5, 7-9 pm, Terman Aud Mon, November 5, 3-5 pm, Gates 392 Mostly “short answer” questions Covers through.
Illumination Behaviour of light. Shading Overview Classical real-time shading: – vertices projected to screen – lighting calculation done at each vertex.
Vector vs. Bitmap SciVis V
V Obtained from a summer workshop in Guildford County July, 2014
1 Internet Graphics. 2 Representing Images  Raster Image: Images consist of “dots” of color, not lines  Pixel: Picture element-tiny rectangle  Resolution:
Digital Images The digital representation of visual information.
Fundamentals of Photoshop
Computer Graphics Using “ Adobe Photoshop ” Introduction to E-Learning Center, DAD presents Workshop on Instructor: Mazhar.
1 CPE 333 : Computer Graphics มหาวิทยาลัยเทคโนโลยีพระจอม เกล้าธนบุรี Dr. Natasha Dejdumrong.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
Digital Terminology. Bitmap A representation consisting of rows and columns of dots of a graphic image stored in computer memory. To display a bitmap.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Vector vs. Bitmap
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CS 480/680 Computer Graphics Image Formation Dr. Frederick C Harris, Jr.
Digital Cameras And Digital Information. How a Camera works Light passes through the lens Shutter opens for an instant Film is exposed to light Film is.
Color and Resolution Introduction to Digital Imaging.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
ADOBE PHOTOSHOP VECTOR VS RASTER. Pixel A pixel is the fundamental unit of an image in Photoshop. It is a small square block of color. An image often.
Which is the Pink Pen? Here is the Pink Pen (Example taken from
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Computer Graphics An Introduction Jimmy Lam The Hong Kong Polytechnic University.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
David Luebke 1 2/5/2016 Color CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
David Luebke2/23/2016 CS 551 / 645: Introductory Computer Graphics Color Continued Clipping in 3D.
Chapter 3 Color Objectives Identify the color systems and resolution Clarify category of colors.
Guilford County SciVis V104.03
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Vector vs. Bitmap. Vector Images Vector images (also called outline images) are images made with lines, text, and shapes. Test type is considered to be.
DIGITAL MEDIA FOUNDATIONS
Computer Graphics Overview
Images Data Representation.
CS 551 / 645: Introductory Computer Graphics
Data Representation Images.
CSE 167 [Win 17], Lecture 13: Raster Graphics, Color Ravi Ramamoorthi
- Introduction - Graphics Pipeline
Vector vs. Bitmap.
CS451Real-time Rendering Pipeline
Chapter 12 COLOR THEORY.
Computer Graphics Using “Adobe Photoshop”
Presentation transcript:

Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 9: Raster Graphics and Pipeline

To Do  Continue working on HW 2. Can be difficult  Get help if you are stuck  Think about HW 3

Lecture Overview  Many basic things tying together course  Raster graphics  Gamma Correction  Color  Hardware pipeline and rasterization  Displaying Images: Ray Tracing and Rasterization  Essentially what this course is about (HW 2 and HW 5)  Introduced now so could cover basics for HW 1,2,3  Course will now “breathe” to review some topics Some images from wikipedia

Images and Raster Graphics  Real world is continuous (almost)  How to represent images on a display?  Raster graphics: use a bitmap with discrete pixels  Raster scan CRT (paints image line by line)  Cannot be resized without loss  Compare to vector graphics  Resized arbitrarily. For drawings  But how to represent photos, CG?

Displays and Raster Devices  CRT, flat panel, television (rect array of pixels)  Printers (scanning: no physical grid but print ink)  Digital cameras (grid light-sensitive pixels)  Scanner (linear array of pixels swept across)  Store image as 2D array (of RGB [sub-pixel] values)  In practice, there may be resolution mismatch, resize  Resize across platforms (phone, screen, large TV)  Vector image: description of shapes (line, circle, …)  E.g., line art such as in Adobe Illustrator  Resolution-Independent but must rasterize to display  Doesn’t work well for photographs, complex images

Resolutions  Size of grid (1920x1200 = 2,304,000 pixels)  32 bit of memory for RGBA framebuffer 8+ MB  For printers, pixel density (300 dpi or ppi)  Printers often binary or CMYK, require finer grid  iPhone “retina display” > 300 dpi. At 12 inches, pixels closer than retina’s ability to distinguish angles  Digital cameras in Mega-Pixels (often > 10 MP)  Color filter array (Bayer Mosaic)  Pixels really small (micron)

Monitor Intensities  Intensity usually stored with 8 bits [0…255]  HDR can be 16 bits or more [0…65535]  Resolution-independent use [0…1] intermediate  Monitor takes input value [0…1] outputs intensity  Non-zero intensity for 0, black level even when off  1.0 is maximum intensity (output 1.0/0.0 is contrast)  Non-linear response (as is human perception)  0.5 may map to 0.25 times the response of 1.0  Gamma characterization and gamma correction  Some history from CRT physics and exponential forms

Lecture Overview  Many basic things tying together course  Raster graphics  Gamma Correction  Color  Hardware pipeline and rasterization  Displaying Images: Ray Tracing and Rasterization  Essentially what this course is about (HW 2 and HW 5) Some images from wikipedia

Nonlinearity and Gamma  Exponential function  I is displayed intensity, a is pixel value  For many monitors γ is between 1.8 and 2.2  In computer graphics, most images are linear  Lighting and material interact linearly  Gamma correction  Examples with γ = 2  Input a = 0 leads to final intensity I = 0, no correction  Input a = 1 leads to final intensity I = 1, no correction  Input a = 0.5 final intensity Correct to  Makes image “brighter” [brightens mid-tones]

Gamma Correction  Can be messy for images. Usually gamma on one monitor, but viewed on others…  For television, encode with gamma (often 0.45, decode with gamma 2.2)  CG, encode gamma is usually 1, correct uploads/2010/12/graph_gamcor.png

Finding Monitor Gamma  Adjust grey until match 0-1 checkerboard to find mid-point a value i.e., a for I = 0.5

Human Perception  Why not just make everything linear, avoid gamma  Ideally, 256 intensity values look linear  But human perception itself non-linear  Gamma between 1.5 and 3 depending on conditions  Gamma is (sometimes) a feature  Equally spaced input values are perceived roughly equal

Lecture Overview  Many basic things tying together course  Raster graphics  Gamma Correction  Color  Hardware pipeline and rasterization  Displaying Images: Ray Tracing and Rasterization  Essentially what this course is about (HW 2 and HW 5) Some images from wikipedia

Color  Huge topic (can read textbooks)  Schrodinger much more work on this than quantum  For this course, RGB (red green blue), 3 primaries  Additive (not subtractive) mixing for arbitrary colors  Grayscale: 0.3 R G B  Secondary Colors (additive, not paints etc.)  Red + Green = Yellow, Red + Blue = Magenta, Blue + Green = Cyan, R+G+B = White  Many other color spaces  HSV, CIE etc.

RGB Color  Venn, color cube  Not all colors possible Images from wikipedia

Eyes as Sensors Slides courtesy Prof. O’Brien

Cones (Trichromatic)

Cone Response

Color Matching Functions

CIE XYZ

Alpha Compositing  RGBA (32 bits including alpha transparency)  You mostly use 1 (opaque)  Can simulate sub-pixel coverage and effects  Compositing algebra

Lecture Overview  Many basic things tying together course  Raster graphics  Gamma Correction  Color  Hardware pipeline and rasterization  Displaying Images: Ray Tracing and Rasterization  Essentially what this course is about (HW 2 and HW 5) Read chapter 8 more details

Hardware Pipeline  Application generates stream of vertices  Vertex shader called for each vertex  Output is transformed geometry  OpenGL rasterizes transformed vertices  Output are fragments  Fragment shader for each fragment  Output is Framebuffer image

Rasterization  In modern OpenGL, really only OpenGL function  Almost everything is user-specified, programmable  Interesting early topic, read chapter 8  Basically, how to draw (2D) primitive on screen  Long history  Bresenham line drawing  Polygon clipping  Antialiasing  What we care about  OpenGL generates a fragment for each pixel in triangle  Colors, values interpolated from vertices (Gouraud)

Z-Buffer  Sort fragments by depth (only draw closest one)  New fragment replaces old if depth test works  OpenGL does this auto can override if you want  Must store z memory  Simple, easy to use

Lecture Overview  Many basic things tying together course  Raster graphics  Gamma Correction  Color  Hardware pipeline and rasterization  Displaying Images: Ray Tracing and Rasterization  Essentially what this course is about (HW 2 and HW 5)

What is the core of 3D pipeline?  For each object (triangle), for each pixel, compute shading (do fragment program)  Rasterization (OpenGL) in HW 2  For each object (triangle)  For each pixel spanned by that triangle  Call fragment program  Ray Tracing in HW 5: flip loops  For each pixel  For each triangle  Compute shading (rough equivalent of fragment program)  HW 2, 5 take almost same input. Core of class

Ray Tracing vs Rasterization  Rasterization complexity is N * d  (N = objs, p = pix, d = pix/object)  Must touch each object (but culling possible)  Ray tracing naïve complexity is p * N  Much higher since p >> d  But acceleration structures allow p * log (N)  Must touch each pixel  Ray tracing can win if geometry very complex  Historically, OpenGL real-time, ray tracing slow  Now, real-time ray tracers, OpenRT, NVIDIA Optix  Ray tracing has advantage for shadows, interreflections  Hybrid solutions now common

Course Goals and Overview  Generate images from 3D graphics  Using both rasterization (OpenGL) and Raytracing  HW 2 (OpenGL), HW 5 (Ray Tracing)  Both require knowledge of transforms, viewing  HW 1  Need geometric model for rendering  Splines for modeling (HW 4)  Having fun and writing “real” 3D graphics programs  HW 3 (real-time scene in OpenGL)  HW 6 (final project)