Physically-Based Shading Computer Graphics Seminar MTAT.03.305 - - PowerPoint PPT Presentation

physically based shading
SMART_READER_LITE
LIVE PREVIEW

Physically-Based Shading Computer Graphics Seminar MTAT.03.305 - - PowerPoint PPT Presentation

Physically-Based Shading Computer Graphics Seminar MTAT.03.305 Raimond Tunnel Intro into: https://cglearn.eu/pub/advanced-computer-graphics/physically-based-shading Phongs Lighting Model Phongs Lighting Model Phongs Lighting Model


slide-1
SLIDE 1

Physically-Based Shading

Computer Graphics Seminar

MTAT.03.305

Raimond Tunnel

Intro into: https://cglearn.eu/pub/advanced-computer-graphics/physically-based-shading

slide-2
SLIDE 2

Phong’s Lighting Model

slide-3
SLIDE 3

Phong’s Lighting Model

slide-4
SLIDE 4

Phong’s Lighting Model

slide-5
SLIDE 5

Phong’s Lighting Model

slide-6
SLIDE 6

Specular

Not just a highlight

vs

slide-7
SLIDE 7

Specular

Not just a highlight

vs

slide-8
SLIDE 8

Specular

Not just a highlight

vs

slide-9
SLIDE 9

Diffuse*

Diffuse light should also use the environment.

vs

slide-10
SLIDE 10

Dielectrics and Metals

slide-11
SLIDE 11

Dielectrics

pixel

slide-12
SLIDE 12

Dielectrics

Color comes from the diffuse Dielectrics also have specular!

slide-13
SLIDE 13

Metals

pixel

electron gas

slide-14
SLIDE 14

Metals

Metals are specular only!

slide-15
SLIDE 15

Dielectrics and Metals

electrons absorb the complementary wavelengths electron gas absorbs the complementary wavelengths dissipates the energy

slide-16
SLIDE 16

Dielectrics and Metals

electrons absorb the complementary wavelengths absorbed by the electron gas

slide-17
SLIDE 17

Dielectrics and Metals

Specify how much light is absorbed / reflected.

slide-18
SLIDE 18

Fresnel

Amount of light reflected ( ) depends on:

  • 1. Phase velocity of light in the material
  • 2. Angle of incidence
slide-19
SLIDE 19

Fresnel

  • 1. Phase velocity of light in the material

https://en.wikipedia.org/wiki/File:Wave_group.gif

slide-20
SLIDE 20

Fresnel

  • 1. Phase velocity of light in the material

Index of refraction Speed of light in a vacuum Phase velocity of light in the material

slide-21
SLIDE 21

Fresnel

  • 1. Phase velocity of light in the material

material

~n

Air 1.00 Water 1.33 Window glass 1.52 Sapphire 1.76 Diamond 2.42

https://en.wikipedia.org/wiki/List_of_refractive_indices

slide-22
SLIDE 22

Fresnel

  • 2. Angle of incidence

Steep angle: Penetrates the material Grazing angle: Ricochets off

slide-23
SLIDE 23

Fresnel

Schlick’s approximation

air material

slide-24
SLIDE 24

Fresnel

Schlick’s approximation

air material

This works well

  • nly for dielectrics!
slide-25
SLIDE 25

Fresnel

https://refractiveindex.info/?shelf=3d&book=plastics&page=ps

visible light ~1.62 ~1.58

Polystyrene (common plastic)

slide-26
SLIDE 26

Fresnel

https://refractiveindex.info/?shelf=3d&book=metals&page=aluminium

visible light ~4.57 ~0.43

Aluminium Complex IoR. Changes a lot.

~2.31 ~8.46

slide-27
SLIDE 27

Fresnel

https://refractiveindex.info/?shelf=3d&book=metals&page=brass

visible light ~1.82 ~1.50

Brass Complex IoR. Changes a lot.

~0.46 ~4.42

slide-28
SLIDE 28

Fresnel

The value is the reflected spectra at 0°. We can specify it ourselves instead of relying on the calculation with the index of refraction.

slide-29
SLIDE 29

Fresnel

material dielectrics gold aluminium copper iron

https://80.lv/articles/the-newbies-pbr-cheat-sheet/

slide-30
SLIDE 30

Fresnel

absorbed by the electron gas

Metals Dielectrics

diffusely scattered back out in material color

slide-31
SLIDE 31

Fresnel

Metals: in material color Dielectrics: uniform

slide-32
SLIDE 32

Fresnel

20% 80% 40% 60%

All objects are more reflective at grazing angles.

slide-33
SLIDE 33

Fresnel

slide-34
SLIDE 34

Dielectrics and Metals

color color black white

absorbed scattered

copper

light source color tinted

slide-35
SLIDE 35

Dielectrics and Metals

– is the material metal (1) or dielectric (0)

– color for metals, ~0.03 for dielectrics

slide-36
SLIDE 36

Interesting Links

https://psgraphics.blogspot.com/2020/03/fresnel-equations-schlick-approximation.ht ml - Peter Shirley, 13.03.2020 https://otik.zcu.cz/bitstream/11025/11214/1/Lazanyi.pdf - Lazanyi, 2005, a way to use Schlick with complex number IoR. https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading/re flection-refraction-fresnel - Reflection, Refraction (Transmission) and Fresnel

slide-37
SLIDE 37

In Game Engines and Graphics Libraries

What tools are these?

slide-38
SLIDE 38

Microfacets

slide-39
SLIDE 39

Microfacets

Surfaces are not generally microscopically flat!

pixel pixel

slide-40
SLIDE 40

Microfacets

The microfacet function

slide-41
SLIDE 41

Microfacets

The microfacet function We look at all the directions on a hemisphere for microfacet normals

slide-42
SLIDE 42

Microfacets

The microfacet function Given one microsurface with normal , how much light it radiates

The material (BRDF) of one microsurface.

slide-43
SLIDE 43

Microfacets

The microfacet function The total area of the microsurfaces that are with the normal . The distribution term.

slide-44
SLIDE 44

Microfacets

The microfacet function What percentage of the microsurfaces are illuminated? The geometry term.

masking shadowing V-cavities:

slide-45
SLIDE 45

Microfacets

The microfacet function Contribution into the viewer’s pixel.

(projected area)

slide-46
SLIDE 46

Microfacets

The microfacet function Contribution of the incoming light.

(projected area)

slide-47
SLIDE 47

Microfacets

Usually that integral is difficult to solve analytically! And you do not want to do some big sum in the fragment shader to approximate it…

slide-48
SLIDE 48

Oren-Nayar (1994) σ = 1.4

slide-49
SLIDE 49

Oren-Nayar (1994)

A numerical approximation for: – ideal diffuse reflector – Gaussian: macrosurface normal,

user parameter

– V-cavities

slide-50
SLIDE 50

Oren-Nayar (1994)

– the color

slide-51
SLIDE 51

Oren-Nayar (1994)

Authors were inspired by previous research about shading the moon (eg by Ernst Öpik in 1924).

http://kevin-george-2n3x.squarespace.com/blog/2014/5/25/shading-diffuse-models

slide-52
SLIDE 52

Cook-Torrance (1982)

An analytical solution for: – ideal specular reflector – Beckmann: macrosurface normal,

user parameter

– V-cavities

slide-53
SLIDE 53

Cook-Torrance (1982)

(Beckmann distribution) The integral was analytically converted to a finite equation!

slide-54
SLIDE 54

Cook-Torrance (1982)

red plastic aluminium

slide-55
SLIDE 55

Metallic-Roughness Workflow

slide-56
SLIDE 56

Links, examples and further materials in: Thanks

https://cglearn.eu/pub/advanced-computer-graphics/ physically-based-shading