Game Programming. Bing-Yu Chen National Taiwan University

Similar documents
Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University

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

Introduction to Computer Graphics with WebGL

3D graphics, raster and colors CS312 Fall 2010

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

Survey in Computer Graphics Computer Graphics and Visualization

INTRODUCTION. Slides modified from Angel book 6e

VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

Graphics Systems and Models

CS452/552; EE465/505. Color Display Issues

Reading. 2. Color. Emission spectra. The radiant energy spectrum. Watt, Chapter 15.

Fall 2015 Dr. Michael J. Reale

The Display pipeline. The fast forward version. The Display Pipeline The order may vary somewhat. The Graphics Pipeline. To draw images.

CS452/552; EE465/505. Image Formation

The Viewing Pipeline Coordinate Systems

Computer Graphics and Visualization. Graphics Systems and Models

Lecture 12 Color model and color image processing

Digital Image Processing COSC 6380/4393. Lecture 19 Mar 26 th, 2019 Pranav Mantini

Illumination and Shading

Physical Color. Color Theory - Center for Graphics and Geometric Computing, Technion 2

Computer Graphics - Chapter 1 Graphics Systems and Models

CSE4030 Introduction to Computer Graphics

Visible Color. 700 (red) 580 (yellow) 520 (green)

CS451Real-time Rendering Pipeline

The Elements of Colour

Lecture 1 Image Formation.

CS635 Spring Department of Computer Science Purdue University

CS 464 Review. Review of Computer Graphics for Final Exam

Computer Graphics Lecture 2

Animation & Rendering

Image Formation. Camera trial #1. Pinhole camera. What is an Image? Light and the EM spectrum The H.V.S. and Color Perception

ITP 140 Mobile App Technologies. Colors

Multimedia Technology CHAPTER 4. Video and Animation

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

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

Image Processing. Color

Graphics Hardware and Display Devices

Color. making some recognition problems easy. is 400nm (blue) to 700 nm (red) more; ex. X-rays, infrared, radio waves. n Used heavily in human vision

Texture Mapping. Images from 3D Creative Magazine

Stereoscopic Systems Part 1

Chapter 5 Extraction of color and texture Comunicação Visual Interactiva. image labeled by cluster index

Introduction to Computer Graphics with WebGL

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

Digital Image Processing. Introduction

Models and Architectures

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision.

The Rendering Pipeline

Computer Graphics and Visualization. What is computer graphics?

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

COMP3421. Global Lighting Part 2: Radiosity

ECE-161C Color. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Rasterization Overview

Color to Binary Vision. The assignment Irfanview: A good utility Two parts: More challenging (Extra Credit) Lighting.

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

Color Vision. Spectral Distributions Various Light Sources

Distributed Algorithms. Image and Video Processing

CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

Colour Reading: Chapter 6. Black body radiators

Reading. 4. Color. Outline. The radiant energy spectrum. Suggested: w Watt (2 nd ed.), Chapter 14. Further reading:

Image Formation. Introduction to Computer Graphics. Machiraju/Zhang/Möller/Klaffenböck

Chapter 5. Projections and Rendering

Introduction to Computer Graphics with WebGL

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

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

Introduction to color science

Topics and things to know about them:

Lecture 11. Color. UW CSE vision faculty

Overview CS Plans for this semester. References. CS 4600 Fall Prerequisites

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Chapter 4. Chapter 4. Computer Graphics 2006/2007 Chapter 4. Introduction to 3D 1

Graphics for VEs. Ruth Aylett

Virtual Reality for Human Computer Interaction

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D)

Color quality guide. Quality menu. Color quality guide. Page 1 of 6

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Light Transport Baoquan Chen 2017

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

MET71 COMPUTER AIDED DESIGN

Introduction to Computer Graphics with WebGL

Chapter 4 Color in Image and Video

Image Formation. CS418 Computer Graphics Eric Shaffer.

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

INFOGR Computer Graphics

Image Analysis. 1. A First Look at Image Classification

Visualisatie BMT. Rendering. Arjan Kok

CS 445 HW#6 Solutions

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Visual Design and Imaging Alignment

782 Schedule & Notes

Computer Graphics Fundamentals. Jon Macey

Digital Image Processing

Main topics in the Chapter 2. Chapter 2. Digital Image Representation. Bitmaps digitization. Three Types of Digital Image Creation CS 3570

Spring 2009 Prof. Hyesoon Kim

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

Histogram Difference Methods Using Colour Models

Computer Graphics: Programming, Problem Solving, and Visual Communication

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

Transcription:

Game Programming Bing-Yu Chen National Taiwan University

What is Computer Graphics? Definition the pictorial synthesis of real or imaginary objects from their computer-based models descriptions OUTPUT images descriptions Computer Graphics INPUT images Computer Vision Image Processing Pattern Recognition 1

What is Computer Graphics? modeling rendering animation 2

Applications Movies Interactive entertainment Industrial design Architecture Culture heritage 3

The Graphics Process Lighting Information 3D Geometric Models 3D Animation Definition Rendering Texture Information Image Storage & Display 4

Basic Graphics System Output device Input devices Image formed in FB 5

Synthetic Camera Model view frustrum/view volume objects/models projector lighting p image plane/view plane projection of p camera 6

Elements of Image Formation Objects Viewer Light source(s) Attributes that govern how light interacts with the materials in the scene Note the independence of the objects, viewer, and light source(s) 7

Pinhole Camera Use trigonometry to find projection of a point x p = -x/z/d y p = -y/z/d z p = d These are equations of simple perspective 8

Luminance and Color Images Luminance Monochromatic Values are gray levels Analogous to working with black and white film or television Color Has perceptional attributes of hue, saturation, and lightness Do we have to match every frequency in visible spectrum? No! 9

Three-Color Theory Human visual system has two types of sensors Rods: monochromatic, night vision Cones Color sensitive Three types of cone Only three values (the tristimulus values) are sent to the brain Need only match these three values Need only three primary colors 10

Additive and Subtractive Color Additive color Form a color by adding amounts of three primaries CRTs, projection systems, positive film Primaries are Red (R), Green (G), Blue (B) Subtractive color Form a color by filtering white light with Cyan (C), Magenta (M), and Yellow (Y) filters Light-material interactions Printing Negative film 11

The RGB Color Model for CRT Blue=(0,0,1) Cyan=(0,1,1) Magenta=(1,0,1) White=(1,1,1) Black=(0,0,0) Green=(0,1,0) Red=(1,0,0) Yellow=(1,1,0) 12

Color Depth Can choose number of bits for each of r, g and b More bits per component means more colors can be distinguished, but image files will be larger 8 bits (1 byte) per component: 24-bit color, millions of colors If r = g = b, color is a shade of gray, so grayscale can be represented by a single value 8 bits permits 256 grays 13

The CMY Color Model for hardcopy Yellow=(1,1,0) Red=(1,0,0) Green=(0,1,0) Black=(0,0,0) White=(1,1,1) Magenta=(1,0,1) Cyan=(0,1,1) Blue=(0,0,1) 14

Undercolor Removal: CMYK System Real inks do not correspond to ideal subtractive primaries Combining three inks for black is undesirable Printers use four process colors, cyan, magenta, yellow and black CMYK gamut is not the same as RGB Implications for using images prepared for print (CMYK) on the Web (RGB) 15

The CMYK Color Model for hardcopy C M Y = G+B = W-R = R+B = W-G = R+G = W-B K C M Y = min(c,m,y) C-K M-K Y-K 16

The HSV Color Model for user-oriented Alternative way of specifying color Hue (roughly, dominant wavelength) Saturation (purity) Value (brightness) Model HSV as a cylinder: H angle, S distance from axis, V distance along axis Basis of popular style of color picker 17

The HSV Color Model for user-oriented H : hue S : saturation V : value (or B for blight) Cyan Green V 120 1.0 240 Blue Yellow White 0 Red Magenta 0.0 Black H S 18

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 series of rays are projected thru the view plane and the view plane is colored based on the object that the ray strikes 19

Pipeline Rendering Transform Illuminate Transform Clip Project Rasterize Model & Camera Parameters Rendering Pipeline Framebuffer Display 20

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

The Rendering Pipeline Scene graph Object geometry Modeling Transforms Lighting Calculations Viewing Transform Clipping Projection Transform Rasterization 22