CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

Similar documents
CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

Rendering Objects. Need to transform all geometry then

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

CSC 8470 Computer Graphics. What is Computer Graphics?

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Rasterization Overview

Spring 2009 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

The Application Stage. The Game Loop, Resource Management and Renderer Design

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Lecture 2. Shaders, GLSL and GPGPU

CS452/552; EE465/505. Clipping & Scan Conversion

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL

2D Drawing Primitives

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Three Main Themes of Computer Graphics

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Pipeline Operations. CS 4620 Lecture 14

1.2.3 The Graphics Hardware Pipeline

CS4620/5620: Lecture 14 Pipeline

CSE 167: Introduction to Computer Graphics Lecture #5: Visibility, OpenGL

Level of Details in Computer Rendering

Introduction to Computer Graphics with WebGL

The Rasterization Pipeline

Graphics Hardware. Instructor Stephen J. Guy

Graphics Hardware and Display Devices

Drawing Fast The Graphics Pipeline

Pipeline Operations. CS 4620 Lecture 10

Computer Graphics (CS 543) Lecture 1 (Part 1): Introduction to Computer Graphics

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

Models and Architectures

Graphics Pipeline & APIs

Chapter 1 Introduction

A SIMD-efficient 14 Instruction Shader Program for High-Throughput Microtriangle Rasterization

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University

Point Sample Rendering

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

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

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 2: First Program

Advanced Rendering Techniques

E.Order of Operations

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Module 13C: Using The 3D Graphics APIs OpenGL ES

Graphics Pipeline & APIs

CSE4030 Introduction to Computer Graphics

CS451Real-time Rendering Pipeline

Introduction to Computer Graphics. Knowledge basic concepts 2D and 3D computer graphics

Drawing Fast The Graphics Pipeline

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics (CS 4731) OpenGL/GLUT(Part 1)

The Rendering Pipeline (1)

CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

CS427 Multicore Architecture and Parallel Computing

CS770/870 Fall 2015 Advanced GLSL

Computer graphic -- Programming with OpenGL I

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

Review of Tuesday. ECS 175 Chapter 3: Object Representation

Mattan Erez. The University of Texas at Austin

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Introduction to OpenGL

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CS 432 Interactive Computer Graphics

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York

CIS 581 Interactive Computer Graphics

Graphics Processing Unit Architecture (GPU Arch)

Graphics Systems and Models

Topics. From vertices to fragments

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

High-Quality Surface Splatting on Today s GPUs

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Exercise 1 Introduction to OpenGL

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

Computer Graphics. Anders Hast. måndag 25 mars 13

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

How shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe

PowerVR Hardware. Architecture Overview for Developers

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Lecture 2: Digital Drawing. Computer Graphics and Imaging UC Berkeley CS184/284

CS 464 Review. Review of Computer Graphics for Final Exam

The Graphics Pipeline

CS 4620 Program 3: Pipeline

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

CS 112 The Rendering Pipeline. Slide 1

Case 1:17-cv SLR Document 1-3 Filed 01/23/17 Page 1 of 33 PageID #: 60 EXHIBIT C

CS770/870 Spring 2017 Open GL Shader Language GLSL

CS770/870 Spring 2017 Open GL Shader Language GLSL

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL

Real-Time Graphics Architecture

Dave Shreiner, ARM March 2009

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Line Drawing. Foundations of Computer Graphics Torsten Möller

2.11 Particle Systems

Transcription:

CS130 : Computer Graphics Tamar Shinar Computer Science & Engineering UC Riverside

Raster Devices and Images

Raster Devices

Hearn, Baker, Carithers Raster Display

Transmissive vs. Emissive Display anode LEDs + _ cathodes ON OFF ON [H&B, Fig. 2-16] LCD LED

Raster Display red, green, blue subpixels

What is an image? Continuous image

Raster Image A raster image is 2D array storing pixel values at each pixel

What is an image? Raster image Each pixel value represents the average color of the image over that pixel s area. = number of columns = number of rows

What is an image? Raster image Each pixel value represents the average color of the image over that pixel s area. = number of columns = number of rows

Color Representation RGB CMYK

Color Representation srgb color triangle comparison of color gamuts [wikipedia]

Alpha Channel

Graphics Pipeline

Modern graphics system [Angel and Shreiner]

Z-buffer Rendering Z-buffering is very common approach, also often accelerated with hardware OpenGL is based on this approach 3D Polygons GRAPHICS PIPELINE Image Pixels 17

Choice of primitives Which primitives should an API contain? small set - supported by hardware, or lots of primitives - convenient for user

Choice of primitives Which primitives should an API contain? small set - supported by hardware lots of primitives - convenient for user

Choice of primitives Which primitives should an API contain? small set - supported by hardware lots of primitives - convenient for user Performance is in 10s millions polygons/sec portability, hardware support key

Choice of primitives Which primitives should an API contain? small set - supported by hardware lots of primitives - convenient for user GPUs are optimized for points, lines, and triangles

Choice of primitives Which primitives should an API contain? small set - supported by hardware lots of primitives - convenient for user GPUs are optimized for points, lines, and triangles Other geometric shapes will be built out of these

Two classes of primitives ff [Angel and Shreiner] Geometric : points, lines, polygons Image : arrays of pixels

Point and line segment types [Angel and Shreiner]

Polygons Multi-sided planar element composed of edges and vertices. Vertices (singular: vertex) are represented by points Edges connect vertices as line segments E1 (x2,y2) (x1,y1) E3 E2 (x3,y3)

Simple Convex Flat Valid polygons

Simple Convex Flat Valid polygons

OpenGL polygons Only triangles are supported (in latest versions) GL_TRIANGLE_STRIP GL_POINTS GL_TRIANGLES GL_TRIANGLE_FAN

Other polygons triangulation

Graphics Pipeline ff [Angel and Shreiner]

Pipelining operations An arithmetic pipeline that computes c+(a*b) a b * + c

3D graphics pipeline Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels Geometry: primitives - made of vertices Vertex processing: coordinate transformations and color Clipping and primitive assembly: output is a set of primitives Rasterization: output is a set of fragments for each primitive Fragment processing: update pixels in the frame buffer

Graphics Pipeline (slides courtesy K. Fatahalian)

Vertex processing Vertices are transformed into screen space v2 v0 v5 v4 v3 v1 Vertices Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Vertex processing Vertices are transformed into screen space v2 v0 v5 EACH VERTEX IS TRANSFORMED v4 INDEPENDENTLY v3 v1 Vertices Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Primitive processing Then organized into primitives that are clipped and culled v2 v0 v5 v2 v0 v5 v4 v4 v3 v1 v3 v1 Vertices Primitives (triangles) Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Rasterization Primitives are rasterized into pixel fragments Fragments Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Rasterization Primitives are rasterized into pixel fragments EACH PRIMITIVE IS RASTERIZED INDEPENDENTLY Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Fragment processing Fragments are shaded to compute a color at each pixel Shaded fragments Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Fragment processing Fragments are shaded to compute a color at each pixel EACH FRAGMENT IS PROCESSED INDEPENDENTLY Vertices Vertex processor Clipper and primitive assembler Rasterizer Fragment processor Pixels

Pixel operations Fragments are blended into the frame buffer at their pixel locations (z-buffer determines visibility) Pixels

Pipeline entities v0 v5 v2 v0 v5 v2 v4 v4 v3 v1 v3 v1 Vertices Primitives Fragments Fragments (shaded) Pixels

Graphics pipeline Vertex Generation Memory Buffers Vertex Data Buffers Fixed-function Vertices Primitives Fragments Pixels Vertex stream Vertex Processing Vertex stream Primitive Generation Primitive stream Primitive Processing Primitive stream Fragment Generation Fragment stream Fragment Processing Fragment stream Pixel Operations Textures Textures Textures Output image (pixels) Programmable