Shadow Mapping Outline Quick introduction to computer graphics. - - PowerPoint PPT Presentation

shadow mapping
SMART_READER_LITE
LIVE PREVIEW

Shadow Mapping Outline Quick introduction to computer graphics. - - PowerPoint PPT Presentation

Shadow Mapping Outline Quick introduction to computer graphics. Why Shadows ? The shadow mapping algorithm. Strengths and weaknesses You will ... Get an abstract view of how Computer Graphics works. Be able to outline the


slide-1
SLIDE 1

Shadow Mapping

slide-2
SLIDE 2

Outline

 Quick introduction to computer graphics.  Why Shadows ?  The shadow mapping algorithm.  Strengths and weaknesses

slide-3
SLIDE 3

You will ...

 Get an abstract view of how Computer

Graphics works.

 Be able to outline the the shadow mapping

algorithm.

 Know that this technique is used in current

games.

 Be able to list some weaknesses and strengths

  • f shadow mapping.
slide-4
SLIDE 4

Computer graphics

 A set of data: triangles in 3D space.

 Provided by an artist.

 Methods of “rendering” (Drawing) these

triangles on a computer screen.

 Developed by a programmer.

slide-5
SLIDE 5

Computer Graphics: the artist

1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000

  • 1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
  • 1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000

1.000000 0.999999 1.000000 0.000000 -0.000000 1.000000

  • 1.000000 1.000000 1.000000 0.000000 -0.000000 1.000000
  • 1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000

0.999999 -1.000001 1.000000 0.000000 -0.000000 1.000000 1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.999999 1.000000 1.000000 -0.000000 0.000000 0.999999 -1.000001 1.000000 1.000000 -0.000000 0.000000 1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 0.999999 -1.000001 1.000000 -0.000000 -1.000000 -0.000000

  • 1.000000 -1.000000 1.000000 -0.000000 -1.000000 -0.000000
  • 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000
  • 1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000

1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000

  • 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000
  • 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000
slide-6
SLIDE 6

Computer Graphics: the programmer

1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000

  • 1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
  • 1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000

1.000000 0.999999 1.000000 0.000000 -0.000000 1.000000

  • 1.000000 1.000000 1.000000 0.000000 -0.000000 1.000000
  • 1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000

0.999999 -1.000001 1.000000 0.000000 -0.000000 1.000000 1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.999999 1.000000 1.000000 -0.000000 0.000000 0.999999 -1.000001 1.000000 1.000000 -0.000000 0.000000 1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 0.999999 -1.000001 1.000000 -0.000000 -1.000000 -0.000000

  • 1.000000 -1.000000 1.000000 -0.000000 -1.000000 -0.000000
  • 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000
  • 1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000
  • 1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000

1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000

  • 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000
  • 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000

Read data Material Specification View Position Light Position Graphics Processing Unit

slide-7
SLIDE 7

Computer Graphics: The GPU

Material Specification

View Position Light Position

Graphics Processing Unit Color Buffer Depth buffer

slide-8
SLIDE 8

Why Shadows ?

slide-9
SLIDE 9

Shadow mapping: Step one.

Material Specification View Position Light Position Graphics Processing Unit

View from Light Position

Depth buffer Color Buffer Shadow Map!

slide-10
SLIDE 10

How does it work?

slide-11
SLIDE 11

Shadow mapping: Step two.

Graphics Processing Unit

Depth buffer

Color Buffer Shadow Map!

Material Specification View Position Light Position Graphics Processing Unit Depth buffer

slide-12
SLIDE 12

Strengths

 Price/Performance

ratio.

 Linear cost in number

  • f drawn “triangles”.

 Extensible.  Simple.

slide-13
SLIDE 13

Problems

 Detached shadows.  Incorrectly shadowed

surfaces.

slide-14
SLIDE 14

Causes and possible solutions.

Sampling related problems.

Increase shadowmap resolution.

Add small constant to “distances” in order to avoid self-shadowing.

Very unstable!

slide-15
SLIDE 15

Even in professional products.

slide-16
SLIDE 16

The end!

We have seen...

 Very high level introduction to Computer graphics.  How shadows enhance realism.

 Shadow mapping.

 Currently popular algorithm for generating shadows.  Good performance.  Reasonable results.  But unstable! (small changes to input...)  Research topic: see GPU Gems 3. GPU Pro. (new

articles on the topic still popping up)