Lindsay Kay

BioDigital Tech Talk

March 10, 2017

Introduction

Physically-Based Rendering

to

An

Old School: Phong Reflection Model

  • ambient - amount of reflected ambient light
  • diffuse - amount of reflected diffuse light
  • specular - amount of reflected specular light
  • shininess - tightness of specular highlights

Phong material properties:

Old School: Phong Reflection Model

  • Synthetic
  • Easy to create unrealistic materials
  • Needs tweaking to look right
  • Does not enforce energy conservation
  • shininess is a poor approximation for roughness 
  • shininess can't be textured, so roughness map not possible
  • Best part: efficient on low-end GPUs

New School: Physically-Based Rendering (PBR)

  • A family of techniques
  • Math uses real measured values for color, roughness, etc.
  • Means that materials can more easily be reused from libraries
  • Enforces constraints
  • Robust for different lighting
  • Models surface roughness realistically
  • Diffuse - light scattered by roughness, with some absorbed
  • Specular - light reflected straight off surface 

PBR: Diffusion and Reflection

  • Specular & diffusion are mutually exclusive
  • Shader enforces (specular + diffuse) <= 1.0
  • "Nanny physicist"
  • Keeps consistency under different lighting conditions
  • Best part: prevents artwork from bending rules

PBR: Energy Conservation

  • AKA gloss, smoothness, roughness, microfacet
  • Tiny imperfections - micro scratches, grooves, cracks
  • Modeled statistically in shader, eg. using a scattering factor
  • Best part: texturable across surface

PBR: Microsurface

PBR: Roughness texturing

  • RGB texture where R channel contains roughness factor
  • Use a reflection cube map with MIP detail levels
  • At each point on surface, roughness selects which detail level to sample

PBR: Microsurface - shader

  • All materials perfectly reflective at grazing angles
  • Gradient (see below) does not vary much between materials
  • Divergence can be accounted for analytically
  • Best part: PBR shaders can handle Fresnel automatically

PBR: Fresnel

How specular reflection varies at different angles.

With PBR:

PBR: Common workflows

  • base color (RGB)
  • specular reflection factor (RGB)
  • glossiness [0..1]
  • base color RGB
  • metalness [0..1] - (usually just 1 for metals, 0 for insulators)
  • roughness [0..1]

1. Specular-glossiness

2. Metal-roughness

Metal-roughness is the most expressive of these two.

PBR: WebGL metal-roughness example

  • Get a feel for it using an example
  • http://bit.ly/2mIQzIb
  • Toggle textures on/off in the menu
  • Has cubemaps for lights and environmental reflection
  • Roughness selects MIP level in light cubemap

Intro to PBR

By xeolabs

Intro to PBR

Physically-accurate techniques that make objects appear more realistic, while streamlining content workflow by automatically constraining materials to within realistic parameters!

  • 401
Loading comments...

More from xeolabs