SlideShare 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.
That’s 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

More from Hunter Loftis

More from Hunter Loftis (8)

Making Sense of Multiplayer
Making Sense of MultiplayerMaking Sense of Multiplayer
Making Sense of Multiplayer
 
Stop js-1999
Stop js-1999Stop js-1999
Stop js-1999
 
Production-Ready Node.js
Production-Ready Node.jsProduction-Ready Node.js
Production-Ready Node.js
 
Nobody Wants Junior Engineers
Nobody Wants Junior EngineersNobody Wants Junior Engineers
Nobody Wants Junior Engineers
 
Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999
 
We Will All Be Game Developers
We Will All Be Game DevelopersWe Will All Be Game Developers
We Will All Be Game Developers
 
ConvergeSE: We Will All Be Game Developers
ConvergeSE: We Will All Be Game DevelopersConvergeSE: We Will All Be Game Developers
ConvergeSE: We Will All Be Game Developers
 
ForwardJS: We Will All Be Game Developers
ForwardJS: We Will All Be Game DevelopersForwardJS: We Will All Be Game Developers
ForwardJS: We Will All Be Game Developers
 

Recently uploaded

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Painting with Light (Scenic City Summit)