Physically Based Shading Diana Algma 29.03.17 I will talk about - - PowerPoint PPT Presentation

physically based shading
SMART_READER_LITE
LIVE PREVIEW

Physically Based Shading Diana Algma 29.03.17 I will talk about - - PowerPoint PPT Presentation

Physically Based Shading Diana Algma 29.03.17 I will talk about What is Physically Based Shading? Why is it good? Light physics Diffusion and reflection ( Why does snow appear white?) Fresnel effect Microsurface


slide-1
SLIDE 1

Physically Based Shading

Diana Algma 29.03.17

slide-2
SLIDE 2

I will talk about

 What is Physically Based Shading?

 Why is it good?

 Light physics

 Diffusion and reflection (Why does snow appear white?)  Fresnel effect  Microsurface  Conductors vs insulators  Energy conservation

 Simple rendering example  Examples of PBS

slide-3
SLIDE 3

What is PBS, why is it good?

 Shading that models how light behaves in reality  Follows principles of physics:

 Energy conservation  Fresnel reflections  Much more

 One shader for many different lighting conditions

slide-4
SLIDE 4

Light

slide-5
SLIDE 5

Reflection vs Diffusion

slide-6
SLIDE 6

Reflection vs Diffusion

slide-7
SLIDE 7

Diffusion

slide-8
SLIDE 8

Reflection

slide-9
SLIDE 9

Reflection & Diffusion

slide-10
SLIDE 10

Fresnel Effect

Any material can act as a perfect mirror

if it is smooth and viewed at the right angle

slide-11
SLIDE 11

Fresnel Effect

slide-12
SLIDE 12

Fresnel Effect

Any material can act as a perfect mirror

if it is smooth and viewed at the right angle

The curve or gradient between the angles

does not vary much from material to material

slide-13
SLIDE 13

Fresnel Effect

slide-14
SLIDE 14

Fresnel Effect

slide-15
SLIDE 15

Fresnel Effect

slide-16
SLIDE 16

Microsurface

 “Gloss”  “Smoothness”  “Roughness”

slide-17
SLIDE 17

Microsurface

slide-18
SLIDE 18

Conductors vs Insulators

 Conductors – 60-90% reflectiveness  Insulators – 0-20% reflectiveness  Conductors – reflectivity can vary across the

visible spectrum -> tinted reflections

 Conductors will absorb rather than scatter light  -> metalness

slide-19
SLIDE 19

Energy Conservation I

 Objects never reflect more light than they receive  Before doing diffuse shading, simply subtract the reflected light

slide-20
SLIDE 20

Energy Conservation II

 Rougher surface

  • >

smoother surface Large, dim highlights

  • >

small, sharp highlights

slide-21
SLIDE 21
slide-22
SLIDE 22

Rendering Equation

slide-23
SLIDE 23
slide-24
SLIDE 24

Rendering Equation

slide-25
SLIDE 25

Rendering Equation

 BRDF - Bidirectional reflectance distribution function  Conservation of energy:

slide-26
SLIDE 26

Translating it to code

Two problems:

Representing all the radiance functions Solving the integral fast enough

slide-27
SLIDE 27

Representing all the radiance functions

 Environment maps (cube maps)

slide-28
SLIDE 28

Solving the integral fast enough

 Optimize  BRDF depends on incoming radiance (which could be constant)  Using Lambert’s BRDF:

slide-29
SLIDE 29

Solving the integral fast enough

 Now integral depends on only the incidence angle of the light

ray

 Precalculate it and store the result in a cubemap

slide-30
SLIDE 30

Solving the integral fast enough

slide-31
SLIDE 31

The code

slide-32
SLIDE 32

The code

slide-33
SLIDE 33

The result

slide-34
SLIDE 34

Unity 5

slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37

Art

slide-38
SLIDE 38

Overgrowth vs PBR

slide-39
SLIDE 39

Overgrowth vs PBR

slide-40
SLIDE 40
slide-41
SLIDE 41

References

 Basic Theory of Physically-Based Rendering by Jeff Russell

 https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/

 Interaction of Light and Materials

 http://www.pernroth.nu/lightandmaterials/

 Article - Physically Based Rendering

 http://www.codinglabs.net/article_physically_based_rendering.aspx

 Nicolas Holzschuch, Romain Pacanowski. A physically accurate reflectance

model combining reflection and diffraction.

 https://hal.inria.fr/hal-01224702/file/RR-8807%20(1).pdf

 Background: Physics and Math of Shading by Naty Hoffman

 http://blog.selfshadow.com/publications/s2013-shading-

course/hoffman/s2013_pbs_physics_math_notes.pdf

slide-42
SLIDE 42

References

 Physically Based Shading in Unity 5: A Primer

 https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-

primer/

 Global Illumination in Unity 5

 https://blogs.unity3d.com/2014/09/18/global-illumination-in-unity-5/

 Physically-Based Rendering, and You Can Too!

 https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/

 “Real-Time Rendering, 3rd edition” by Tomas Akenine-Möller, Eric Haines, and

Naty Hoffman

 http://www.realtimerendering.com/

 http://blog.teamtreehouse.com/beginners-guide-physically-based-rendering-

unity

slide-43
SLIDE 43

References

 https://www.marmoset.co/skyshop/  https://en.wikipedia.org/wiki/Rendering_equation  http://www.ogre3d.org/forums/viewtopic.php?f=25&t=82936  http://wiki.ktxsoftware.com/Physically-Based-Rendering.html  http://blog.wolfire.com/2015/10/Physically-based-rendering  Picture from the game Ryse (and many more examples from games)

 http://www.neogaf.com/forum/showthread.php?t=1031164

 https://media1.britannica.com/eb-media/80/150780-004-83AAD576.jpg