際際滷

際際滷Share a Scribd company logo
@hunterloftis
Painting with Light
Scenic City Summit 2018
@hunterloftis
1940s: The Manhattan Project
@hunterloftis
"Monte Carlo Integration"
@hunterloftis
1986: Kajiya's rendering equation
@hunterloftis
1986: Kajiya's rendering equation
$44,000,000 / GFLOPS
@hunterloftis
1995: Toy Story
@hunterloftis
There are more PhDs working on
this film than any other in movie
history.
- Steve Jobs, Pixar, 1995
@hunterloftis
There are more PhDs working on
this film than any other in movie
history.
- Steve Jobs, Pixar, 1995
$46,000 / GFLOPS
@hunterloftis
-$30,000,000
@hunterloftis
-$30,000,000
+$364,545,516
@hunterloftis
2006: Monster House
@hunterloftis
2006: Monster House
$57 / GFLOPS
@hunterloftis
2014: Big Hero 6
@hunterloftis
2014: Big Hero 6
$0.13 / GFLOPS
@hunterloftis
@hunterloftis
4 render farms
@hunterloftis
4 render farms
4,600 servers
@hunterloftis
4 render farms
4,600 servers
83 hrs / frame
@hunterloftis
2016: Deadpool
@hunterloftis
2016: Deadpool
@hunterloftis
2016: Path-tracing only
@hunterloftis
2016: Path-tracing only
$0.08 / GFLOPS
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
@hunterloftis
v0.0.1
@hunterloftis
@hunterloftis
2 obstacles...
@hunterloftis
@hunterloftis
@hunterloftis
JavaScript!
@hunterloftis
...time to learn Go!
@hunterloftis
$ make moses
(516,526 surfaces!)
@hunterloftis
Building a physically-based
path tracer
@hunterloftis
Building a physically-based
path tracer
In plain English
@hunterloftis
Building a physically-based
path tracer
In plain English
...with as little math as possible
@hunterloftis
Building a physically-based
path tracer
In plain English
...with as little math as possible
...and just a touch of physics.
@hunterloftis
What is light?
@hunterloftis
@hunterloftis
origin
@hunterloftis
origin
direction
@hunterloftis
origin
direction
energy (RGB)
@hunterloftis
Origin + Direction + Energy
@hunterloftis
What happens when light hits a
surface?
@hunterloftis
@hunterloftis
Reflection
@hunterloftis
Reflection
Refraction
@hunterloftis
"conductors"
@hunterloftis
"dielectrics"
@hunterloftis
transmittance diffusion
Once refracted, light is either transmitted or
diffused
@hunterloftis
All incoming light is either...
3. transmitted
1. reflected
2. diffused
@hunterloftis
How can we simulate these
three behaviors?
3. transmitted
1. reflected
2. diffused
@hunterloftis
BRDFs and BTDFs!
"Bidirectional Reflectance Distribution Function"
"Bidirectional Transmittance Distribution Function"
@hunterloftis
BRDFs and BTDFs!
"Bidirectional Reflectance Distribution Function"
"Bidirectional Transmittance Distribution Function"
@hunterloftis
A pure function that describes a material
@hunterloftis
The physics have been done for us!
Metals
microfacet BRDF
Non-metals
microfacet + Oren-Nayar BRDFs
Transparent materials
microfacet BTDF + Beer's law
...car paint, hair, thin films, clouds, skin...
@hunterloftis
But... that's just one random path!
@hunterloftis
But... that's just one random path!
@hunterloftis
Monte Carlo integration
@hunterloftis
Monte Carlo integration
@hunterloftis
Monte Carlo integration
Sample a bunch of values randomly.
@hunterloftis
Monte Carlo integration
Sample a bunch of values randomly.
Add them all up and average them.
@hunterloftis
Monte Carlo integration
Sample a bunch of values randomly.
Add them all up and average them.
Thats probably close to the real answer.
@hunterloftis
Path tracing + Monte Carlo integration
rendered with github.com/hunterloftis/pbr
@hunterloftis
Path tracing + Monte Carlo integration
rendered with github.com/hunterloftis/pbr
@hunterloftis
Path tracing + Monte Carlo integration
rendered with github.com/hunterloftis/pbr
@hunterloftis
15x improvement over JS!
rendered with github.com/hunterloftis/pbr
@hunterloftis
Quick Recap
+
Light Transport
Algorithms
(path tracing, monte carlo
integration)
Physically-Based
Materials
(BRDF, BSDF, etc)
https://github.com/google/filament
+
Light Transport
Algorithms
(path tracing, monte carlo
integration)
Physically-Based
Materials
(BRDF, BSDF, etc)
https://github.com/google/filament https://github.com/fogleman/pt
+
Light Transport
Algorithms
(path tracing, monte carlo
integration)
Physically-Based
Materials
(BRDF, BSDF, etc)
https://github.com/google/filament https://github.com/fogleman/pt
rendered with github.com/hunterloftis/pbr
+
Light Transport
Algorithms
(path tracing, monte carlo
integration)
Physically-Based
Materials
(BRDF, BSDF, etc)
@hunterloftis
How can we make
more interesting images?
@hunterloftis
Complex geometry
rendered with github.com/hunterloftis/pbr
@hunterloftis
Complex geometry
rendered with github.com/hunterloftis/pbr
@hunterloftis
Complex geometry
rendered with github.com/hunterloftis/pbr
@hunterloftis
Real materials
rendered with github.com/hunterloftis/pbr
@hunterloftis
Real materials
rendered with github.com/hunterloftis/pbr
@hunterloftis
Real materials
rendered with github.com/hunterloftis/pbr
@hunterloftis
Real materials
rendered with github.com/hunterloftis/pbr
@hunterloftis
Image-based lighting
rendered with github.com/hunterloftis/pbr
@hunterloftis
Image-based lighting
rendered with github.com/hunterloftis/pbr
@hunterloftis
Image-based lighting
rendered with github.com/hunterloftis/pbr
@hunterloftis
Image-based lighting
rendered with github.com/hunterloftis/pbr
@hunterloftis
The Future
5:20
@hunterloftis
2018
@hunterloftis
2018
@hunterloftis
2018
@hunterloftis
2018
@hunterloftis
2018
@hunterloftis
An exciting, emerging field
Research that hasn't been implemented yet
"Embarrassingly parallel" algorithm
Fun to hack on!
@hunterloftis
I would love your help!
roadmap:
distributed concurrency
smoothing groups & normal maps
glTF support
expanding the material library
beautiful example scenes!
@hunterloftis
How's Moses doing?
@hunterloftis
Thank you!
https://github.com/hunterloftis/pbr
https://www.disneyanimation.com/technology/innovations/hyperion
http://www.cse.chalmers.se/edu/year/2013/course/TDA361/Pathtracing.pdf
http://blog.selfshadow.com/publications/s2015-shading-course/hoffman/s2015_pbs_physics_math_slides.pdf
https://www.cs.cmu.edu/afs/cs/academic/class/15462-f09/www/lec/lec8.pdf
https://www.atomicheritage.org/history/computing-and-manhattan-project
https://graphics.pixar.com/library/PathTracedMovies/paper.pdf
https://www.wired.com/1995/12/toy-story/
https://en.wikipedia.org/wiki/FLOPS#Cost_of_computing
Hunter@Heroku.com

More Related Content

Painting with Light (Scenic City Summit)