SlideShare a Scribd company logo
1 of 64
Download to read offline
Mastering Physically Based Shading
in Unity 5
Renaldas Zioma / Unity
 
 
 
 
 @__ReJ__
Erland Körner / Unity
Wes McDermott / Allegorithmic
Physically Based Shading
in Unity 5
One shader
Our past
• Butterfly Effect demo
• Inspiration from Mental Images Architectural (MIA) shader
• Inspiration from Disney SIGGRAPH’12 talk
• Secret Aim: look identical /w Marmoset Toolbag 2
4
Natural Materials
• Metals
• Non-metals (Dielectrics)
• monolithic materials: plastic, rock, water …
• cloth
• organic
5
vs
Dielectrics
• Most objects in natural environments are dielectrics
Dielectrics
Distinguishing Traits
7
• Hard to see your own image in the reflection
• Much more reflective on the edge
• Augustin Fresnel (1788-1827)
• Surface reflects almost* the same fraction of light for any
dielectric
• Light penetrates the surface
• on atomic level a lot of space for light photons to pass through
• Light is scattered under the surface
Dielectrics
All are almost the same
* though gems can be 2-3 times more reflective than glass
Dielectrics
Specular Reflection
• Light bounces of the surface
• NO color change!
• Surface irregularities will affect spread of the bounce
• Subsurface scattering
• Crystallites, cells, fibers - will absorb and reflect light
• different color
• random directions
• Otherwise light just passes through
• liquids, some plastics, gems
Dielectrics
Diffuse Reflection
Scattering
• Surface micro-structure
• rough vs smooth
• Diffuse reflection (absorption & scattering)
• we perceive it as a color of material
• Slight variation in amount of light bounced in specular
reflection
• sometimes denoted as F0
• governed by the Index Of Refraction of material
• 2-4% (IOR 1.3 .. 1.8)
• gems are outliers 7%-13% (IOR 1.2 .. 2.6) 11
Dielectrics
Why then they look different?
12
Metals
• Very good mirrors (if smooth)
• Colored reflection
• Surface is impenetrable to light
• can’t be transparent *
Metals
Distinguishing Traits
13
* well, actually some metals can be made into semi-transparent, if really really thin!
Electromagnetic field
Metals
Specular Reflection
• Lots of free electrons!
• light is bounced back
• “prevent” light penetrating the surface
• Fraction of light is absorbed at the surface
• color tinted reflection
Metals
What makes different looking metals
• Color of specular reflection
• we perceive it as a color of metal
• Surface micro-structure
• rough vs polished
Half-correct summary*
* works only for pure materials
• Metals
• No diffuse
• Very strong specular
• Colored specular (reddish, yellowish)
• Non-metals
• Strong Fresnel
• Very weak specular at normal incidence
• Monochromatic specular
• Colored diffuse (any color)
Materials are rarely pure or ideal
Materials are rarely pure or ideal
• Metals
• No diffuse - rust, oxidization, mix /w other materials …
• Non-metals
• Strong Fresnel - not for rough surfaces
• Very weak specular at normal incidence
• Monochromatic specular
• Multilayer materials can have stronger tinted specular
• dielectric mirrors, cloths like tarpaulin, vegetation …
Materials are rarely pure or ideal
• That is why we pick Diffuse+Specular workflow
• but there are definite upsides in the Metallic workflow too!
!
• btw, some call this workflow:
• Albedo+Reflectivity
• Specular+Gloss
So what is this Specular, again?
• Controls reflectivity at normal incidence
• Plastic (IOR 1.5)
• 4%
!
• Some Crystal (IOR 2.1)
• 13%
!
• Aluminium
• 95%
20
So what is this Specular, again?
• Plastic (IOR 1.5)
• 4% in Linear
• (59, 59, 59) in sRGB
• Some Crystal (IOR 2.1)
• 13%
• (100, 100, 100) in sRGB
• Silver
• 95%
• (249, 249, 249) in sRGB
So what is this Specular, again?
• Silver
!
• Copper
!
• Gold
!
• Aluminum
!
• Iron
22
gold
copper
silver
reflectance%
visible spectrum
Smoothness
• Controls Fresnel - reflectivity at grazing angle
• Controls blurriness of reflection
• Very rough surfaces
• Disney diffuse
• cloth
23
24
Standard shader
break down
Direct Light
25
Diffuse reflection
26
Indirect Light
27
+ Indirect Light * AO
28
+ Fresnel
29
Metallic Reflections
30
(or) Dielectric Reflections
31
Reflections /w Smoothness
32
Reflections * Specular
33
+ Reflections * Specular * AO
34
= Final result
35
What are the benefits!?
• Accurate, realistic material representation
• Consistent and predictable workflow and artwork
• For everyday materials
• …but also stylised look
36
The Standard shader
• Compact
• Folds
• Thumbnails
• Expandable
37
Standard shader - Primary inputs
• Diffuse [RGB]
• Specular [RGB]
• defines material type
• Smoothness [greyscale A]
• character of the surface
• Normal Map [Tangent Space]
38
Additionally…
• Occlusion [greyscale]
• Height map - Parallax [greyscale]
• Emission - HDR range [RGB]
• UV set selection
• Detail maps (overlay)
• Diffuse and Normal maps
• Blended with Mask texture
• Opaque, Cut-out, Transparent
39
Detail overlay
40
UV set selection and Masking
41
Normalmap overlay
42
Emission
43
Lighting in 5.0
• Lights
• Environment
• ambient probe
• light probes
• default reflection
• reflection probes
• Lightmaps
• HDR IBL
44
Global Localized
Diffuse Ambient Probe Light Probes
Specular Default Reflection Reflection Probes
Environment lighting
• Ties materials into environment
• Lights must match surrounding
• Exposure
• HDR on Main camera
• …in scene view
• …tone mapping too
45
• Auto generated from Skybox
• Directional light
• Specular reflection
• Ambient probe
46
Light Setups
Default, Simple, Out-of-the-Box
• Specify your own IBL texture
• Use “Specular Convolution” in
Texture Import settings 
• Setup your own ambient probe
• Top, Equator, Bottom
• Or script code
47
Light Setups
Custom Image Based
• Reflection Probes - convolved HDR Specular cubemaps
• HDR Texture import
• .hdr and .exr formats
• Up to 8K resolution
48
Light Setups
Reflection Probes, Light Probes and cubemaps
• Diffuse / Albedo
• No lighting information
• Metals are typically dark
Painted Texture Example
49
• Specular
• Defines material type
• Small variation among

dielectrics
• Dielectrics are monochrome

greyscale
Painted Texture Example
50
Painted Texture Example
• Specular, continued…
• Similar hue as Diffuse if metal
• Suggested range 40-75 sRGB 

for non-metals.
• 155-255 sRGB for metals
51
Painted Texture Example
• Smoothness
• Lots of details!
• Range between 0.12-.94
52
Painted Texture Example
• Occlusion - Cavities, Creases
• Mask reflections
• Mask indirect bounce
53
Obtaining texture data
• Scanned - “scientific method”
• Quixel Megatexture, Substance DB,
Surface mimic, …
• Hand painted
• Time-consuming to match values
• Need to remove lighting information
• Reference charts (DontNod, Quixel, …)
• Procedural
• Substance, among others…
54
55
Case Study
Procedural workflow with Substance
Substance
• Specialize in texture creation
tools built around Physically
Based Shading
• Substance file : streamlined
solution for using PBS in Unity
• Input doesn’t matter : content
packaged as Substance
• Automatically connect outputs
to shader
• Exposed parameters with
runtime support
Physically Based Templates
• Supports Metal/Rough, Spec/Gloss and
Custom PBR
• Based on Disney Principled GGX BRDF 

*cross-checked by AAA game studios
Material Workflow
• Material Blending
Substance Designer
Material Workflow
• Weathering Filters : Propagate effect across
multiple channels
Substance Designer and Substance Painter
Material Painting
• Paint across multiple channels 
• 100% Non-Destructive
• Export to Unity
60
Substance Painter
Substance Database
• Growing library of PBR materials as Substances

• Hand-painted

• Procedural
• Custom database
Custom Tools
• PBS Materials

• Dielectric

• Metal
• PBS Map Validation
Custom Nodes PBR Validation Node
Native Unity Support
• Reduce texture package
size
• Change parameters at
runtime
• Quick texture iterations
Q&A
64

More Related Content

Similar to Unite2014: Mastering Physically Based Shading in Unity 5

Metals & Non Metals
Metals & Non MetalsMetals & Non Metals
Metals & Non Metalsprincesumit
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In UnityEhsan Ehrari
 
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdfAdnanKhan153072
 
Minerals of the earths crust
Minerals of the earths crustMinerals of the earths crust
Minerals of the earths crustdandrzejewski01
 
Power point mineral notes
Power point mineral notesPower point mineral notes
Power point mineral notesharvey09
 
Laser Beam Manufacturing- Non Conventional machining
Laser Beam Manufacturing- Non Conventional machining Laser Beam Manufacturing- Non Conventional machining
Laser Beam Manufacturing- Non Conventional machining Hany G. Amer
 

Similar to Unite2014: Mastering Physically Based Shading in Unity 5 (12)

Metals & Non Metals
Metals & Non MetalsMetals & Non Metals
Metals & Non Metals
 
october23.ppt
october23.pptoctober23.ppt
october23.ppt
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In Unity
 
Mixtures and solutions 4-2
Mixtures and solutions 4-2Mixtures and solutions 4-2
Mixtures and solutions 4-2
 
Earth science day one
Earth science day oneEarth science day one
Earth science day one
 
Earth science day one
Earth science day oneEarth science day one
Earth science day one
 
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf
1_ Introduction to Optical Mineralogy, Light & Theories-converted.pdf
 
Minerals of the earths crust
Minerals of the earths crustMinerals of the earths crust
Minerals of the earths crust
 
Power point mineral notes
Power point mineral notesPower point mineral notes
Power point mineral notes
 
Ore Microscopy 2012
Ore Microscopy 2012Ore Microscopy 2012
Ore Microscopy 2012
 
Laser Beam Manufacturing- Non Conventional machining
Laser Beam Manufacturing- Non Conventional machining Laser Beam Manufacturing- Non Conventional machining
Laser Beam Manufacturing- Non Conventional machining
 
Shading
ShadingShading
Shading
 

More from Renaldas Zioma

Overview of AI Startups in Lithuania
Overview of AI Startups in LithuaniaOverview of AI Startups in Lithuania
Overview of AI Startups in LithuaniaRenaldas Zioma
 
Trip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine LearningTrip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine LearningRenaldas Zioma
 
New Tools for Art and Content - Artificial Intelligence and Machine Learning
New Tools for Art and Content - Artificial Intelligence and Machine LearningNew Tools for Art and Content - Artificial Intelligence and Machine Learning
New Tools for Art and Content - Artificial Intelligence and Machine LearningRenaldas Zioma
 
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CG
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CGTHE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CG
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CGRenaldas Zioma
 
FMX2013: Butterfly Effect
FMX2013: Butterfly EffectFMX2013: Butterfly Effect
FMX2013: Butterfly EffectRenaldas Zioma
 

More from Renaldas Zioma (7)

Overview of AI Startups in Lithuania
Overview of AI Startups in LithuaniaOverview of AI Startups in Lithuania
Overview of AI Startups in Lithuania
 
Trip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine LearningTrip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine Learning
 
New Tools for Art and Content - Artificial Intelligence and Machine Learning
New Tools for Art and Content - Artificial Intelligence and Machine LearningNew Tools for Art and Content - Artificial Intelligence and Machine Learning
New Tools for Art and Content - Artificial Intelligence and Machine Learning
 
Practical AI in Games
Practical AI in GamesPractical AI in Games
Practical AI in Games
 
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CG
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CGTHE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CG
THE BLACKSMITH demo: Bridging the Gap between Realtime and Offline CG
 
FMX2013: Butterfly Effect
FMX2013: Butterfly EffectFMX2013: Butterfly Effect
FMX2013: Butterfly Effect
 
Buttefly
ButteflyButtefly
Buttefly
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Unite2014: Mastering Physically Based Shading in Unity 5

  • 1. Mastering Physically Based Shading in Unity 5 Renaldas Zioma / Unity @__ReJ__ Erland Körner / Unity Wes McDermott / Allegorithmic
  • 4. Our past • Butterfly Effect demo • Inspiration from Mental Images Architectural (MIA) shader • Inspiration from Disney SIGGRAPH’12 talk • Secret Aim: look identical /w Marmoset Toolbag 2 4
  • 5. Natural Materials • Metals • Non-metals (Dielectrics) • monolithic materials: plastic, rock, water … • cloth • organic 5 vs
  • 6. Dielectrics • Most objects in natural environments are dielectrics
  • 7. Dielectrics Distinguishing Traits 7 • Hard to see your own image in the reflection • Much more reflective on the edge • Augustin Fresnel (1788-1827)
  • 8. • Surface reflects almost* the same fraction of light for any dielectric • Light penetrates the surface • on atomic level a lot of space for light photons to pass through • Light is scattered under the surface Dielectrics All are almost the same * though gems can be 2-3 times more reflective than glass
  • 9. Dielectrics Specular Reflection • Light bounces of the surface • NO color change! • Surface irregularities will affect spread of the bounce
  • 10. • Subsurface scattering • Crystallites, cells, fibers - will absorb and reflect light • different color • random directions • Otherwise light just passes through • liquids, some plastics, gems Dielectrics Diffuse Reflection Scattering
  • 11. • Surface micro-structure • rough vs smooth • Diffuse reflection (absorption & scattering) • we perceive it as a color of material • Slight variation in amount of light bounced in specular reflection • sometimes denoted as F0 • governed by the Index Of Refraction of material • 2-4% (IOR 1.3 .. 1.8) • gems are outliers 7%-13% (IOR 1.2 .. 2.6) 11 Dielectrics Why then they look different?
  • 13. • Very good mirrors (if smooth) • Colored reflection • Surface is impenetrable to light • can’t be transparent * Metals Distinguishing Traits 13 * well, actually some metals can be made into semi-transparent, if really really thin!
  • 14. Electromagnetic field Metals Specular Reflection • Lots of free electrons! • light is bounced back • “prevent” light penetrating the surface • Fraction of light is absorbed at the surface • color tinted reflection
  • 15. Metals What makes different looking metals • Color of specular reflection • we perceive it as a color of metal • Surface micro-structure • rough vs polished
  • 16. Half-correct summary* * works only for pure materials • Metals • No diffuse • Very strong specular • Colored specular (reddish, yellowish) • Non-metals • Strong Fresnel • Very weak specular at normal incidence • Monochromatic specular • Colored diffuse (any color)
  • 17. Materials are rarely pure or ideal
  • 18. Materials are rarely pure or ideal • Metals • No diffuse - rust, oxidization, mix /w other materials … • Non-metals • Strong Fresnel - not for rough surfaces • Very weak specular at normal incidence • Monochromatic specular • Multilayer materials can have stronger tinted specular • dielectric mirrors, cloths like tarpaulin, vegetation …
  • 19. Materials are rarely pure or ideal • That is why we pick Diffuse+Specular workflow • but there are definite upsides in the Metallic workflow too! ! • btw, some call this workflow: • Albedo+Reflectivity • Specular+Gloss
  • 20. So what is this Specular, again? • Controls reflectivity at normal incidence • Plastic (IOR 1.5) • 4% ! • Some Crystal (IOR 2.1) • 13% ! • Aluminium • 95% 20
  • 21. So what is this Specular, again? • Plastic (IOR 1.5) • 4% in Linear • (59, 59, 59) in sRGB • Some Crystal (IOR 2.1) • 13% • (100, 100, 100) in sRGB • Silver • 95% • (249, 249, 249) in sRGB
  • 22. So what is this Specular, again? • Silver ! • Copper ! • Gold ! • Aluminum ! • Iron 22 gold copper silver reflectance% visible spectrum
  • 23. Smoothness • Controls Fresnel - reflectivity at grazing angle • Controls blurriness of reflection • Very rough surfaces • Disney diffuse • cloth 23
  • 28. + Indirect Light * AO 28
  • 34. + Reflections * Specular * AO 34
  • 36. What are the benefits!? • Accurate, realistic material representation • Consistent and predictable workflow and artwork • For everyday materials • …but also stylised look 36
  • 37. The Standard shader • Compact • Folds • Thumbnails • Expandable 37
  • 38. Standard shader - Primary inputs • Diffuse [RGB] • Specular [RGB] • defines material type • Smoothness [greyscale A] • character of the surface • Normal Map [Tangent Space] 38
  • 39. Additionally… • Occlusion [greyscale] • Height map - Parallax [greyscale] • Emission - HDR range [RGB] • UV set selection • Detail maps (overlay) • Diffuse and Normal maps • Blended with Mask texture • Opaque, Cut-out, Transparent 39
  • 41. UV set selection and Masking 41
  • 44. Lighting in 5.0 • Lights • Environment • ambient probe • light probes • default reflection • reflection probes • Lightmaps • HDR IBL 44 Global Localized Diffuse Ambient Probe Light Probes Specular Default Reflection Reflection Probes
  • 45. Environment lighting • Ties materials into environment • Lights must match surrounding • Exposure • HDR on Main camera • …in scene view • …tone mapping too 45
  • 46. • Auto generated from Skybox • Directional light • Specular reflection • Ambient probe 46 Light Setups Default, Simple, Out-of-the-Box
  • 47. • Specify your own IBL texture • Use “Specular Convolution” in Texture Import settings • Setup your own ambient probe • Top, Equator, Bottom • Or script code 47 Light Setups Custom Image Based
  • 48. • Reflection Probes - convolved HDR Specular cubemaps • HDR Texture import • .hdr and .exr formats • Up to 8K resolution 48 Light Setups Reflection Probes, Light Probes and cubemaps
  • 49. • Diffuse / Albedo • No lighting information • Metals are typically dark Painted Texture Example 49
  • 50. • Specular • Defines material type • Small variation among
 dielectrics • Dielectrics are monochrome
 greyscale Painted Texture Example 50
  • 51. Painted Texture Example • Specular, continued… • Similar hue as Diffuse if metal • Suggested range 40-75 sRGB 
 for non-metals. • 155-255 sRGB for metals 51
  • 52. Painted Texture Example • Smoothness • Lots of details! • Range between 0.12-.94 52
  • 53. Painted Texture Example • Occlusion - Cavities, Creases • Mask reflections • Mask indirect bounce 53
  • 54. Obtaining texture data • Scanned - “scientific method” • Quixel Megatexture, Substance DB, Surface mimic, … • Hand painted • Time-consuming to match values • Need to remove lighting information • Reference charts (DontNod, Quixel, …) • Procedural • Substance, among others… 54
  • 56. Substance • Specialize in texture creation tools built around Physically Based Shading • Substance file : streamlined solution for using PBS in Unity • Input doesn’t matter : content packaged as Substance • Automatically connect outputs to shader • Exposed parameters with runtime support
  • 57. Physically Based Templates • Supports Metal/Rough, Spec/Gloss and Custom PBR • Based on Disney Principled GGX BRDF 
 *cross-checked by AAA game studios
  • 58. Material Workflow • Material Blending Substance Designer
  • 59. Material Workflow • Weathering Filters : Propagate effect across multiple channels Substance Designer and Substance Painter
  • 60. Material Painting • Paint across multiple channels • 100% Non-Destructive • Export to Unity 60 Substance Painter
  • 61. Substance Database • Growing library of PBR materials as Substances
 • Hand-painted
 • Procedural • Custom database
  • 62. Custom Tools • PBS Materials
 • Dielectric
 • Metal • PBS Map Validation Custom Nodes PBR Validation Node
  • 63. Native Unity Support • Reduce texture package size • Change parameters at runtime • Quick texture iterations