15
1

Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

1

Page 2: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

2

Page 3: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

3

Mirror is XY plane at some Mirror is XY plane at some ––z point?z point?

Page 4: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

4

Page 5: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

5

Planar Reflections

Dinosaur is reflected by the planar floor.Dinosaur is reflected by the planar floor.Easy hack, draw Easy hack, draw dinodino twice, second time hastwice, second time hasglScalef(1,glScalef(1,--1,1) to reflect through the floor1,1) to reflect through the floor

But what if itBut what if it’’s not the XY plane?s not the XY plane?

Page 6: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

6

Just like shadows…..

Good BadGood Bad

Page 7: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

7

Page 8: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

8

Page 9: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

9

Page 10: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

10

Page 11: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

11

Page 12: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

12

Page 13: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

13

Page 14: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

14

Recursive Planar Mirrors

Basic idea of planar reflections can be appliedBasic idea of planar reflections can be appliedrecursively. Requires more stencil bits.recursively. Requires more stencil bits.

The Trick (bird’s eye view)

Page 15: Mirror is XY plane at some –z point?cs5610/lectures/Planar reflections 2009.pdfCould draw mirror into stencil up front, but: Stencil enabled during entire reflected scene Could just

15

Demo