Ray Tracing Intro Steve Marschner CS 4620 Cornell University - - PowerPoint PPT Presentation

ray tracing intro
SMART_READER_LITE
LIVE PREVIEW

Ray Tracing Intro Steve Marschner CS 4620 Cornell University - - PowerPoint PPT Presentation

Ray Tracing Intro Steve Marschner CS 4620 Cornell University Cornell CS4620 Fall 2020 Steve Marschner 1 Projection To render an image of a 3D scene, we project it onto a plane Most common projection type is perspective projection


slide-1
SLIDE 1

Steve Marschner CS 4620 Cornell University

Steve Marschner • Cornell CS4620 Fall 2020

Ray Tracing Intro

1

slide-2
SLIDE 2
  • To render an image of a 3D scene, we project it onto a plane
  • Most common projection type is perspective projection

Steve Marschner • Cornell CS4620 Fall 2020

Projection

2

slide-3
SLIDE 3

Steve Marschner • Cornell CS4620 Fall 2020

Two approaches to rendering

3

slide-4
SLIDE 4

Steve Marschner • Cornell CS4620 Fall 2020

Two approaches to rendering

3

for each object in the scene { for each pixel in the image { if (object affects pixel) { do something } } }

  • bject order
  • r

rasterization

slide-5
SLIDE 5

Steve Marschner • Cornell CS4620 Fall 2020

Two approaches to rendering

3

for each object in the scene { for each pixel in the image { if (object affects pixel) { do something } } }

  • bject order
  • r

rasterization image order

  • r

ray tracing for each pixel in the image { for each object in the scene { if (object affects pixel) { do something } } }

slide-6
SLIDE 6

Steve Marschner • Cornell CS4620 Fall 2020

Two approaches to rendering

3

for each object in the scene { for each pixel in the image { if (object affects pixel) { do something } } }

  • bject order
  • r

rasterization image order

  • r

ray tracing for each pixel in the image { for each object in the scene { if (object affects pixel) { do something } } } We will do this first

slide-7
SLIDE 7
  • Start with a pixel—what belongs at that pixel?
  • Set of points that project to a point in the image: a ray

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

4

slide-8
SLIDE 8
  • Start with a pixel—what belongs at that pixel?
  • Set of points that project to a point in the image: a ray

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

4

slide-9
SLIDE 9

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

5

slide-10
SLIDE 10

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

5

slide-11
SLIDE 11

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

5

slide-12
SLIDE 12

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing idea

5

slide-13
SLIDE 13

Steve Marschner • Cornell CS4620 Fall 2020

Ray tracing algorithm

for each pixel { compute viewing ray intersect ray with scene compute illumination at visible point put result into image }

6

slide-14
SLIDE 14
  • inputs:

– camera parameters – a point in the image

  • outputs:

– a viewing ray

Steve Marschner • Cornell CS4620 Fall 2020

Eye ray generation

7

viewing ray pixel position viewing window viewpoint

slide-15
SLIDE 15
  • inputs:

– list of objects in the scene – a ray

  • outputs:

– whether ray intersects anything – parameter of first intersection – information about surface

t

Steve Marschner • Cornell CS4620 Fall 2020

Ray intersection

8

slide-16
SLIDE 16
  • inputs:

– eye direction – light direction (for each of many lights) – surface normal – surface parameters (color, roughness, …)

  • outputs:

– light reflected towards eye

Steve Marschner • Cornell CS4620 Fall 2020

Shading

9

v l n