INFOGR Computer Graphics Jacco Bikker & Debabrata Panja - - - PowerPoint PPT Presentation

infogr computer graphics
SMART_READER_LITE
LIVE PREVIEW

INFOGR Computer Graphics Jacco Bikker & Debabrata Panja - - - PowerPoint PPT Presentation

INFOGR Computer Graphics Jacco Bikker & Debabrata Panja - April-July 2017 Lecture 1: Introduction Welcome! Todays Agenda: Graphics Course Introduction Field Study Rasters Colors INFOGR Lecture 1


slide-1
SLIDE 1
slide-2
SLIDE 2

INFOGR – Computer Graphics

Jacco Bikker & Debabrata Panja - April-July 2017

Lecture 1: “Introduction”

Welcome!

slide-3
SLIDE 3

Today’s Agenda:

  • Graphics
  • Course Introduction
  • Field Study
  • Rasters
  • Colors
slide-4
SLIDE 4

Introduction

INFOGR – Lecture 1 – “Introduction” Just Cause 3

slide-5
SLIDE 5

Introduction

INFOGR – Lecture 1 – “Introduction” HALO 5

slide-6
SLIDE 6

Introduction

INFOGR – Lecture 1 – “Introduction” GTA V

slide-7
SLIDE 7

Introduction

INFOGR – Lecture 1 – “Introduction” Homeworld Remastered

slide-8
SLIDE 8

Introduction

INFOGR – Lecture 1 – “Introduction” Crysis

slide-9
SLIDE 9

Introduction

INFOGR – Lecture 1 – “Introduction” Crysis

slide-10
SLIDE 10

Introduction

INFOGR – Lecture 1 – “Introduction” Lord of the Rings

slide-11
SLIDE 11

Introduction

INFOGR – Lecture 1 – “Introduction” Furious 7 (Paul Walker)

slide-12
SLIDE 12

Introduction

INFOGR – Lecture 1 – “Introduction” Star Wars

slide-13
SLIDE 13

Introduction

INFOGR – Lecture 1 – “Introduction” Zootopia

slide-14
SLIDE 14

Introduction

INFOGR – Lecture 1 – “Introduction”

slide-15
SLIDE 15

Introduction

INFOGR – Lecture 1 – “Introduction” Just Cause 3

slide-16
SLIDE 16

Introduction

INFOGR – Lecture 1 – “Introduction”

slide-17
SLIDE 17

Introduction

INFOGR – Lecture 1 – “Introduction”

slide-18
SLIDE 18

Introduction

INFOGR – Lecture 1 – “Introduction”

slide-19
SLIDE 19

Introduction

INFOGR – Lecture 1 – “Introduction”

slide-20
SLIDE 20

Computer Graphics 2017: Looking for realism (in several wrong places):

  • 1. Rasterization
  • Geometry
  • Textures, shaders
  • Clipping, culling
  • Post processing
  • 2. Ray tracing
  • Ray/triangle intersections
  • Bounding volume hierarchy
  • Snell, Fresnel, Beer
  • Whitted, Cook, Kajiya

Introduction

  • 3. Mathematics
  • Vectors
  • Matrices
  • Transformations

INFOGR – Lecture 1 – “Introduction”

slide-21
SLIDE 21

INFOGR – Lecture 1 – “Introduction” Language: English, because of reasons. Prerequisites: C#. Literature: Fundamentals of Computer Graphics (3rd edition), by Peter Shirley and Steve Marschner (or 4th, or 2nd, or 1st). 15 lectures. Supporting math tutorials on Tuesdays (starting week 2). Supporting working lectures on Thursdays (starting week 2). For rooms: see schedule.

Introduction

slide-22
SLIDE 22

INFOGR – Lecture 1 – “Introduction” Exams:

  • Mid-term: May 23th.
  • End of term: June 29th.
  • Retake: July 13th.

Attendance: You are not required to attend any of the lectures / tutorials / practicals (i.e., if you are here, it’s because you want to*).

*Obviously, attendance is highly recommended.

Introduction

slide-23
SLIDE 23

http://www.cs.uu.nl/docs/vakken/gr

slide-24
SLIDE 24

https://infogr2017.slack.com/signup

use uu.nl e-mail address

https://infogr2017.slack.com/signup

slide-25
SLIDE 25

INFOGR – Lecture 1 – “Introduction” Course characteristics: This is a very intensive course. Be sure to keep up, i.e. don’t miss lectures. Be aware that this course will be attended by a diverse student population:

  • Math-savvy students;
  • Programming gurus;
  • Game people;
  • Informatics guys.

Regardless of your skill level and interests, make use of this course to improve.

Introduction

slide-26
SLIDE 26

Team

INFOGR – Lecture 1 – “Introduction” Lecturers: Jacco Bikker bikker.j@gmail.com / j.bikker@uu.nl Office: BBL 424 Debabrata Panja d.panja@uu.nl Office: BBL 511

slide-27
SLIDE 27

Team

INFOGR – Lecture 1 – “Introduction” Student Assistants:

  • 1. Kevin van Mastrigt
  • 2. Sander Vanheste
  • 3. Zino Onomiwo
  • 4. Hugo Hogenbirk
  • 5. Niek Mulleners
slide-28
SLIDE 28

INFOGR – Lecture 1 – “Introduction” Assignment Overview: i. P1: “Tutorial”; ii. P2: Ray Tracing;

  • iii. P3: Rasterization.

Final practicum grade is 0.2 * P1 + 0.4 * P2 + 0.4 * P3. Exam overview: i. T1: Mid-term exam; ii. T2: Final exam. Final exam grade is 0.3 * T1 + 0.7 * T2. Final grade: (T + P) / 2 Passing criteria: Final Grade ≥ 6 (after rounding); both T and P ≥ 5.0 (before rounding).

Practical Details

slide-29
SLIDE 29

INFOGR – Lecture 1 – “Introduction” How to hand in assignments:

  • http://www.cs.uu.nl/docs/submit

First assignment (“Tutorial”) is online now: See website.

Practical Details

slide-30
SLIDE 30

INFOGR – Lecture 1 – “Introduction” Retake: only if you failed the course, and scored at least a 4.0 (before rounding). Retake / Theory:

  • Retake covers all theory and replaces min( T1, T2 ).

Retake / Practical:

  • Retake replaces min( P1, P2, P3 ).

Topic will be assigned individually.

Practical Details

slide-31
SLIDE 31

INFOGR – Lecture 1 – “Introduction” PART 1: Mathematics Tutorial 1 will be available on Thursday, April 28th. PART 2: Programming assignment P1 (OpenTK Tutorial) is now available from the website. Assistance is available on Tuesday, May 3rd in rooms BBG-079, -083, -109 and -112.

Assignments

slide-32
SLIDE 32

Today’s Agenda:

  • Graphics
  • Course Introduction
  • Field Study
  • Rasters
  • Colors
slide-33
SLIDE 33

Field Study

  • A. S. Douglas. Noughts and Crosses. EDSAC, 1952.

INFOGR – Lecture 1 – “Introduction”

slide-34
SLIDE 34

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-35
SLIDE 35

1981 1982 1982

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-36
SLIDE 36

1985 1987 1990

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-37
SLIDE 37

Early graphics: 2D, with limitations

  • Tiles
  • Few colors
  • Sprites

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-38
SLIDE 38

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-39
SLIDE 39

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-40
SLIDE 40

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-41
SLIDE 41

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-42
SLIDE 42

History of Graphics

INFOGR – Lecture 1 – “Introduction”

slide-43
SLIDE 43

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-44
SLIDE 44

History of Graphics

INFOGR – Lecture 1 – “Introduction”

slide-45
SLIDE 45

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-46
SLIDE 46

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-47
SLIDE 47

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-48
SLIDE 48

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-49
SLIDE 49

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-50
SLIDE 50

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-51
SLIDE 51

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-52
SLIDE 52

History of Graphics

INFOGR – Lecture 2 – “Field Study”

slide-53
SLIDE 53

Game production: Code Art Crysis: > 1M lines of code; 85k shaders Unreal 3 engine: 2M lines of code Frostbite: “10x Unreal 3” Minecraft: < 200k lines of code.

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-54
SLIDE 54

History of graphics in games, digest

Initially fast progression:

  • from 2D to 3D,
  • from monochrome to true-color,
  • from wireframe to shaded,
  • from sparse to highly detailed.

But also:

  • from reasonably efficient to produce to extremely labor-intensive.

Field Study

INFOGR – Lecture 1 – “Introduction”

slide-55
SLIDE 55

Today’s Agenda:

  • Graphics
  • Course Introduction
  • Field Study
  • Rasters
  • Colors
slide-56
SLIDE 56

Raster Displays

Discretization

INFOGR – Lecture 2 – “Graphics Fundamentals” 56

slide-57
SLIDE 57

Raster Displays

Discretization

Rasterization: “Converting a vector image into a raster image for output on a video display or printer or storage in a bitmap file format.” (Wikipedia) INFOGR – Lecture 2 – “Graphics Fundamentals” 57

slide-58
SLIDE 58

Raster Displays

Rasterization

Improving rasterization:

  • 1. Increase resolution;

INFOGR – Lecture 2 – “Graphics Fundamentals” 58

slide-59
SLIDE 59

Raster Displays

Rasterization

Improving rasterization:

  • 1. Increase resolution;
  • 2. Anti-aliasing;
  • 3. Animation.

INFOGR – Lecture 2 – “Graphics Fundamentals” 59

slide-60
SLIDE 60
slide-61
SLIDE 61
slide-62
SLIDE 62
slide-63
SLIDE 63

Raster Displays

Discretization

π=4

a2+b2=𝑑2 a1+b1=𝑑1

INFOGR – Lecture 2 – “Graphics Fundamentals” 63

slide-64
SLIDE 64

Raster Displays

CRT – Cathode Ray Tube

Physical implementation – origins Electron beam zig-zagging over a fluorescent screen. INFOGR – Lecture 2 – “Graphics Fundamentals” 64

slide-65
SLIDE 65

Raster Displays

CRT – Cathode Ray Tube

0,0 x y x=1 y=1 0,0 x=-1 y=-1

Physical implementation – consequences

  • Origin in the top-left corner of the screen
  • Axis system directly related to pixel count

Not the coordinate system we expected… INFOGR – Lecture 2 – “Graphics Fundamentals” 65

slide-66
SLIDE 66

Raster Displays

Frame rate

PAL: 25fps NTSC: 30fps (actually: 29.97) Typical laptop screen: 60Hz High-end monitors: 120-240Hz Cartoons: 12-15fps Human eye: ‘Frame-less’ Not a raster. How many fps / megapixels is ‘enough’? INFOGR – Lecture 2 – “Graphics Fundamentals” 66

slide-67
SLIDE 67

Raster Displays

Frame rate

Even 100 frames per second may result in a noticeable delay of 30ms. A very high frame rate minimizes the response time of the simulation. Frame 1 Frame 2 Frame 3 Sim 1 Sim 2 Sim 3 Input 1 Input 2 Input 3

0 ms 20 ms 40 ms 60 ms

INFOGR – Lecture 2 – “Graphics Fundamentals” 67

slide-68
SLIDE 68

Raster Displays

Generating images

Rendering: “The process of generating an image from a 2D or 3D model by means of a computer program.”

(Wikipedia)

Two main methods:

  • 1. Ray tracing: for each pixel: what color do we assign to it?
  • 2. Rasterization: for each triangle, which pixels does it affect?
  • n a raster

INFOGR – Lecture 2 – “Graphics Fundamentals” 68

slide-69
SLIDE 69

Today’s Agenda:

  • Graphics
  • Course Introduction
  • Field Study
  • Rasters
  • Colors
slide-70
SLIDE 70

Colors

Color representation

Computer screens emit light in three colors: red, green and blue. By additively mixing these, we can produce most colors: from black (red, green and blue turned off) to white (red, green and blue at full brightness). In computer graphics, colors are stored in discrete form. This has implications for:

  • Color resolution (i.e., number of unique values per

component);

  • Maximum brightness (i.e., range of component values).

INFOGR – Lecture 2 – “Graphics Fundamentals” 70

slide-71
SLIDE 71

Colors

Color representation

The most common color representation is 32-bit ARGB, which stores red, green and blue as 8 bit values (0..255). Alternatively, we can use 16 bit for one pixel (RGB 565),

  • r a color palette. In that case, one byte is

used per pixel, but only 256 unique colors can be used for the image. INFOGR – Lecture 2 – “Graphics Fundamentals” 71

slide-72
SLIDE 72

Colors

Color representation

INFOGR – Lecture 2 – “Graphics Fundamentals” 72

slide-73
SLIDE 73

Colors

Color representation

INFOGR – Lecture 2 – “Graphics Fundamentals” 73

slide-74
SLIDE 74

Colors

Color representation

INFOGR – Lecture 2 – “Graphics Fundamentals” 74

slide-75
SLIDE 75

Colors

Color representation

Textures can typically safely be stored as palletized images. Using a smaller palette will result in smaller compressed files. INFOGR – Lecture 2 – “Graphics Fundamentals” 75

slide-76
SLIDE 76

Colors

Color representation

Using a fixed range (0:0:0 … 255:255:255) places a cap on the maximum brightness that can be represented:

  • A white sheet of paper: (255,255,255)
  • A bright sky: (255,255,255)

The difference becomes apparent when we look at the sky and the sheet of paper through sunglasses. (or, when the sky is reflected in murky water) INFOGR – Lecture 2 – “Graphics Fundamentals” 76

slide-77
SLIDE 77

Colors

Color representation

For realistic rendering, it is important to use an internal color representation with a much greater range than 0..255 per color component. HDR: High Dynamic Range; We store one float value per color component. Including alpha, this requires 128bit per pixel. INFOGR – Lecture 2 – “Graphics Fundamentals” 77

slide-78
SLIDE 78

Today’s Agenda:

  • Graphics
  • Course Introduction
  • Field Study
  • Rasters
  • Colors
slide-79
SLIDE 79

Next Time:

  • Ray Tracing
  • Primitives
  • Vectors
  • Coordinate systems
  • Projections
slide-80
SLIDE 80

INFOGR – Computer Graphics

Jacco Bikker & Debabrata Panja - April-July 2017

END OF lecture 1: “Introduction”

Next lecture: “Ray Tracing”