how to create a thousand lights stephen smithbower computer science undergraduate

29
How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Upload: matilda-ferguson

Post on 19-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

How to Create a Thousand Lights

Stephen Smithbower Computer Science Undergraduate

Page 2: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Lighting is an Artistic Tool

- Creates mood and atmosphere

- Colours can be calming

- Useful for both realism and surrealism

or abrasive

Page 3: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Author: Brooks Elliot @ 3drender.com

Page 4: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Author: Dan Konieczka @ 3drender.com

Page 5: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Author: Hans Tetzloff @ 3drender.com

Page 6: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Author: Michal Kotek @ 3drender.com

Page 7: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Lighting is Complex

And is therefore slow to render..

- Each frame of video = 1/24th of a second

- Each frame takes on average 6 hours to render

Some frames take up to 90 hours!

Pixar

Authorship: Disney Pixar Studios

Page 8: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Real-Time Is a Bit More Restrictive

For smooth movement, the entire framemust be rendered in...

16 milliseconds(1/60th of a second, or 60 frames per second)

Page 9: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Don’t Be Pixar

Aesthetically plausible, not physically accurate

Page 10: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

The Graphics Processing Unit (GPU)

- Excels at parallel tasks

- Much more processing power than the CPU

- Built specifically for real-time graphics

Page 11: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Shading1111

Yellow Light

1111

Blue Light

Page 12: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Shading1111

Yellow Light

Render this, GPU!

1 Draw Call

Page 13: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Shading

1111

Blue Light

Render this, GPU!

2 Draw Calls

Page 14: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Shading1111

Yellow Light

Render this, GPU!

3 Draw Calls

Page 15: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Shading

1111

Blue Light

Render this, GPU!

4 Draw Calls

Page 16: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

So What’s the Problem?

Bottleneck!

Page 17: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

You’ve got a relay team..

GPU

Page 18: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Bottleneck!

CPU

Page 19: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Forward Rendering Scene Complexity

Most Video Games In Here

Page 20: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

New Approach

- Don’t send redundant data

- Don’t worry about what is not in view

- Decouple Light and Geometry data

Current Complexity: # Objects x # Lights

Desired Complexity: # Objects + # Lights

Page 21: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Light Pre-Pass

Step 1: Encode Visible Geometry into a Texture

Depth

Normals

55

Page 22: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Light Pre-Pass

Step 2: Draw Lights as Spheres

Page 23: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Light Pre-Pass

Step 3: Render Scene Again - Modulate Lighting

x =

Page 24: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Comparison of Rendering Scene

Complexity

Page 25: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Comparison of Rendering Scene

Complexity

Page 26: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Comparison of Rendering Scene

Complexity

Page 27: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Comparison of Rendering Scene

Complexity

Page 28: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Rendered on a 2.4ghz dual-core processor, Geforce 8600gts video card

About $500 total, at time of purchase

Questions?

http://www.youtube.com/watch?v=MYMMgI9CDow

Page 29: How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate

Acknowledgements

Dr. Ramon Lawrence

Computer Science Department