CS 445: Introduction to Computer Graphics David Luebke University of Virginia The Rendering Pipeline.

Slides:



Advertisements
Similar presentations
Real-Time Rendering 靜宜大學資工研究所 蔡奇偉副教授 2010©.
Advertisements

Computer Graphics HARDWARE. LCD Displays Thinner and lighter. No tube or electron beams. Blocking/unblocking light through polarized crystals. Crystals.
Graphics Pipeline.
MAE152 Computer Graphicsfor Scientists and Engineers Revision of Matrices Relevance to Graphics.
HCI 530 : Seminar (HCI) Damian Schofield.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Welcome to CSc 830 Advanced Computer Graphics
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.
Scenes, Cameras & Lighting. Outline  Constructing a scene  Using hierarchy  Camera models  Light models.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
1 Hardware Devices Display Hardware Video display devices Hard-copy devices Input devices Locator Devices Keyboard devices Valuator Devices Choice Devices.
HCT.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
David Luebke9/10/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics in Java1 Objects and Viewers Two basic entities (one object seen from two different positions) :
CSE 381 – Advanced Game Programming Basic 3D Graphics
CS 445 / 645 Introduction to Computer Graphics Lecture 3 Mathematical Primitives Introduction to Transformations Lecture 3 Mathematical Primitives Introduction.
Week 2 - Wednesday CS361.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
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.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
CS 445 / 645: Introductory Computer Graphics David Brogan Image from:
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
David Luebke11/14/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
David Luebke12/3/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
David Luebke12/7/2015 CS 551 / 645: Introductory Computer Graphics Review for Midterm.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 5: Viewing
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
MIT EECS 6.837, Durand and Cutler The Graphics Pipeline: Projective Transformations.
David Luebke1/10/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Transformations: Projection CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
2/14/ : Graphics Programming Seree Chinodom
David Luebke2/16/2016 CS 551 / 645: Introductory Computer Graphics Mathematical Foundations The Rendering Pipeline.
Rendering Pipeline and Graphics Hardware Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
2/28/2016 CS 551 / 645: Introductory Computer Graphics Framebuffer Mathematical Foundations The Rendering Pipeline.
CS 445: Introduction to Computer Graphics David Luebke University of Virginia Display Technologies, Mathematical Fundamentals.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Computer Graphics Overview
Rendering Pipeline Fall, 2015.
- Introduction - Graphics Pipeline
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSCE 441 Computer Graphics 3-D Viewing
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
CENG 477 Introduction to Computer Graphics
CS451Real-time Rendering Pipeline
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Projection in 3-D Glenn G. Chappell
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
CS 551 / 645: Introductory Computer Graphics
Presentation transcript:

CS 445: Introduction to Computer Graphics David Luebke University of Virginia The Rendering Pipeline

Admin l Call roll l Forums signup

Demo l Ogre

Recap Display Technology: DMDs l Digital Micromirror Devices (projectors) –Microelectromechanical (MEM) devices, fabricated with VLSI techniques

Recap: Display Technology: DMDs l DMDs are truly digital pixels l Vary grey levels by modulating pulse length l Color: multiple chips, or color-wheel l Great resolution l Very bright l Flicker problems

Display Technologies: Organic LED Arrays l Organic Light-Emitting Diode (OLED) Arrays –The display of the future? Many think so. –OLEDs function like regular semiconductor LEDs –But with thin-film polymer construction: n Thin-film deposition of organic, light-emitting molecules through vapor sublimation in a vacuum. n Dope emissive layers with fluorescent molecules to create color. n Not grown like a crystal, no high-temperature doping n Thus, easier to create large-area OLEDs

Display Technologies: Organic LED Arrays l OLED pros: –Transparent –Flexible –Light-emitting, and quite bright (daylight visible) –Large viewing angle –Fast (< 1 microsecond off-on-off) –Can be made large or small

Display Technologies: Organic LED Arrays l OLED cons: –Not quite there yet (96x64 displays) except niche markets n Cell phones (especially back display) n Car stereos –Not very robust, display lifetime a key issue –Currently only passive matrix displays n Passive matrix: Pixels are illuminated in scanline order (like a raster display), but the lack of phosphorescence causes flicker n Active matrix: A polysilicate layer provides thin film transistors at each pixel, allowing direct pixel access and constant illumination See for more info –Hard to compete with LCDs, a moving target

Display Technologies: Other l Liquid Crystal On Silicon (LCOS) –“Next big thing” for projectors –Don’t know much about this one l E-Ink –Tiny black-and-white spheres embedded in matrix –Slow refresh, very high resolution –Over 200 dpi eBook devices available now in Japan l Others…

Framebuffers l So far we’ve talked about the physical display device l How does the interface between the device and the computer’s notion of an image look? l Framebuffer: A memory array in which the computer stores an image –On most computers, separate memory bank from main memory (why?) –Many different variations, motivated by cost of memory

Framebuffers l So far we’ve talked about the physical display device l How does the interface between the device and the computer’s notion of an image look? l Framebuffer: A memory array in which the computer stores an image –On most computers, separate memory bank from main memory (why?) –Many different variations, motivated by cost of memory

Framebuffers: True-Color l A true-color (aka 24-bit or 32-bit) framebuffer stores one byte each for red, green, and blue l Each pixel can thus be one of 2 24 colors l Pay attention to Endian-ness l How can 24-bit and 32-bit mean the same thing here?

Framebuffers: Indexed- Color l An indexed-color (8-bit or PseudoColor) framebuffer stores one byte per pixel (also: GIF image format) l This byte indexes into a color map: l How many colors can a pixel be? l Still common on low-end displays (cell phones, PDAs, GameBoys) l Cute trick: color-map animation

Framebuffers: Hi-Color l Hi-Color was a popular PC SVGA standard l Packs pixels into 16 bits: –5 Red, 6 Green, 5 Blue (why would green get more?) –Sometimes just 5,5,5 l Each pixel can be one of 2 16 colors l Hi-color images can exhibit worse quantization artifacts than a well-mapped 8-bit image

The Rendering Pipeline: A Whirlwind Tour Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

The Display You Know Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

The Framebuffer You Know Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

The Rendering Pipeline Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

2-D Rendering: Rasterization (Coming Soon) Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

The Rendering Pipeline: 3-D Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

The Rendering Pipeline: 3-D Modeling Transforms Scene graph Object geometry Lighting Calculations Viewing Transform Clipping Projection Transform Result: All vertices of scene in shared 3-D “world” coordinate system All vertices of scene in shared 3-D “world” coordinate system Vertices shaded according to lighting model Vertices shaded according to lighting model Scene vertices in 3-D “view” or “camera” coordinate system Scene vertices in 3-D “view” or “camera” coordinate system Exactly those vertices & portions of polygons in view frustum Exactly those vertices & portions of polygons in view frustum 2-D screen coordinates of clipped vertices 2-D screen coordinates of clipped vertices

The Rendering Pipeline: 3-D Scene graph Object geometry Lighting Calculations Clipping Result: All vertices of scene in shared 3-D “world” coordinate system All vertices of scene in shared 3-D “world” coordinate system Vertices shaded according to lighting model Vertices shaded according to lighting model Scene vertices in 3-D “view” or “camera” coordinate system Scene vertices in 3-D “view” or “camera” coordinate system Exactly those vertices & portions of polygons in view frustum Exactly those vertices & portions of polygons in view frustum 2-D screen coordinates of clipped vertices 2-D screen coordinates of clipped vertices Modeling Transforms Viewing Transform Projection Transform

Rendering: Transformations l So far, discussion has been in screen space l But model is stored in model space (a.k.a. object space or world space) l Three sets of geometric transformations: –Modeling transforms –Viewing transforms –Projection transforms

Rendering: Transformations l Modeling transforms –Size, place, scale, and rotate objects parts of the model w.r.t. each other –Object coordinates  world coordinates Z X Y X Z Y

Rendering: Transformations l Viewing transform –Rotate & translate the world to lie directly in front of the camera n Typically place camera at origin n Typically looking down -Z axis –World coordinates  view coordinates

Rendering: Transformations l Projection transform –Apply perspective foreshortening n Distant = small: the pinhole camera model –View coordinates  screen coordinates

Rendering: Transformations l All these transformations involve shifting coordinate systems (i.e., basis sets) l Oh yeah, that’s what matrices do… l Represent coordinates as vectors, transforms as matrices l Multiply matrices = concatenate transforms!                     Y X Y X   cossin cos

Rendering: Transformations l Homogeneous coordinates: represent coordinates in 3 dimensions with a 4-vector –Denoted [x, y, z, w] T n Note that w = 1 in model coordinates –To get 3-D coordinates, divide by w: [x’, y’, z’] T = [x/w, y/w, z/w] T l Transformations are 4x4 matrices l Why? To handle translation and projection

The Rendering Pipeline: 3-D Modeling Transforms Scene graph Object geometry Lighting Calculations Viewing Transform Clipping Projection Transform Result: All vertices of scene in shared 3-D “world” coordinate system All vertices of scene in shared 3-D “world” coordinate system Vertices shaded according to lighting model Vertices shaded according to lighting model Scene vertices in 3-D “view” or “camera” coordinate system Scene vertices in 3-D “view” or “camera” coordinate system Exactly those vertices & portions of polygons in view frustum Exactly those vertices & portions of polygons in view frustum 2-D screen coordinates of clipped vertices 2-D screen coordinates of clipped vertices

Rendering: Lighting l Illuminating a scene: coloring pixels according to some approximation of lighting –Global illumination: solves for lighting of the whole scene at once –Local illumination: local approximation, typically lighting each polygon separately l Interactive graphics (e.g., hardware) does only local illumination at run time

The Rendering Pipeline: 3-D Modeling Transforms Scene graph Object geometry Lighting Calculations Viewing Transform Clipping Projection Transform Result: All vertices of scene in shared 3-D “world” coordinate system All vertices of scene in shared 3-D “world” coordinate system Vertices shaded according to lighting model Vertices shaded according to lighting model Scene vertices in 3-D “view” or “camera” coordinate system Scene vertices in 3-D “view” or “camera” coordinate system Exactly those vertices & portions of polygons in view frustum Exactly those vertices & portions of polygons in view frustum 2-D screen coordinates of clipped vertices 2-D screen coordinates of clipped vertices

Rendering: Clipping l Clipping a 3-D primitive returns its intersection with the view frustum:

Rendering: Clipping l Clipping is tricky! –We will have a whole assignment on clipping In: 3 vertices Out: 6 vertices Clip In: 1 polygon Out: 2 polygons

The Rendering Pipeline: 3-D Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline FramebufferDisplay

Modeling: The Basics l Common interactive 3-D primitives: points, lines, polygons (i.e., triangles) l Organized into objects –Collection of primitives, other objects –Associated matrix for transformations l Instancing: using same geometry for multiple objects –4 wheels on a car, 2 arms on a robot

Modeling: The Scene Graph l The scene graph captures transformations and object-object relationships in a DAG l Nodes are objects; l Arcs indicate instancing –Each has a matrix Robot BodyHead ArmTrunkLegEyeMouth

Modeling: The Scene Graph l Traverse the scene graph in depth-first order, concatenating transformations l Maintain a matrix stack of transformations ArmTrunk Leg EyeMouth HeadBody Robot Foot Matrix Stack Visited Unvisited Active

Modeling: The Camera l Finally: need a model of the virtual camera –Can be very sophisticated n Field of view, depth of field, distortion, chromatic aberration… –Interactive graphics (OpenGL): n Camera pose: position & orientation n Captured in viewing transform (i.e., modelview matrix) n Pinhole camera model n Field of view n Aspect ratio n Near & far clipping planes

Modeling: The Camera l Camera parameters (FOV, etc) are encapsulated in a projection matrix –Homogeneous coordinates  4x4 matrix! –See OpenGL Appendix F for the matrix l The projection matrix premultiplies the viewing matrix, which premultiplies the modeling matrices –Actually, OpenGL lumps viewing and modeling transforms into modelview matrix