Between Renderers with MDL Jan Jordan Software Product Manager MDL - - PowerPoint PPT Presentation

between renderers with mdl
SMART_READER_LITE
LIVE PREVIEW

Between Renderers with MDL Jan Jordan Software Product Manager MDL - - PowerPoint PPT Presentation

Sharing Physically Based Materials Between Renderers with MDL Jan Jordan Software Product Manager MDL March 18, GTC San Jose 2019 Lutz Kettner Director Advanced Rendering and Materials Introduction to NVIDIA Material Definition Language


slide-1
SLIDE 1

Jan Jordan Software Product Manager MDL Lutz Kettner Director Advanced Rendering and Materials

Sharing Physically Based Materials Between Renderers with MDL

March 18, GTC San Jose 2019

slide-2
SLIDE 2

2

Agenda

Introduction to NVIDIA Material Definition Language MDL Matching the appearance of a single material within different rendering techniques Defining physically-based materials MDL ecosystem Become part of the ecosystem

slide-3
SLIDE 3

3

Introduction

slide-4
SLIDE 4

4

The NVIDIA Material Definition Language (MDL) is technology developed by NVIDIA to define physically-based materials for physically-based rendering solutions.

slide-5
SLIDE 5

5

Iray Photoreal

slide-6
SLIDE 6

6

Iray Photoreal

slide-7
SLIDE 7

7

Iray Photoreal

slide-8
SLIDE 8

8

courtesy Harley Davidson

slide-9
SLIDE 9

9

slide-10
SLIDE 10

10

slide-11
SLIDE 11

11

NVIDIA vMaterials with Iray Photoreal

slide-12
SLIDE 12

12

Iray Photoreal

slide-13
SLIDE 13

13

MDL in Substance Designer

slide-14
SLIDE 14

14

Substance Designer

slide-15
SLIDE 15

15

Matching the Appearance of a Single Material Within Different Rendering Techniques

slide-16
SLIDE 16

16

Pathtracer Interactive Raytracer Realtime Rasterizer

One Scene for Different Renderers

Share scene and MDL materials for a consistent look Switching renderers with no scene modifications

slide-17
SLIDE 17

17

Iray Realtime OpenGL Rasterizer Iray Interactive Ray Tracer, Direct Illumination Iray Photoreal Path Tracer

slide-18
SLIDE 18

18

Material Implementation Material Definition Texturing

Traditional Shading Language Parts

Texture lookups Procedurals Uv-transforms Projectors Noise functions Math functions Light loops / trace N rays OIT / ray-continuation Ray marching Glossy reflection Transparency Translucency

slide-19
SLIDE 19

19

Rasterizer Declarative Material Definition Procedural Program- ming Language

Texture lookups Procedurals Uv-transforms Projectors Noise functions Math functions Light loops / OIT Glossy reflection Transparency Translucency

Renderer

Raytracer

Trace N rays

Pathtracer

Ray-marching

slide-20
SLIDE 20

20

Rasterizer Declarative Material Definition Procedural Program- ming Language

Light loops / OIT

Renderer

Raytracer

Trace N rays

Pathtracer

Ray-marching

slide-21
SLIDE 21

21

Rasterizer

Light loops / OIT

Renderer

Raytracer

Trace N rays

Pathtracer

Ray-marching

MDL is not a Shading Language MDL defines what to compute, not how to compute it – no programmable shading – no light loops or access to illumination – no trace call – no sampling – no camera dependence Declarative Material Definition Procedural Program- ming Language

slide-22
SLIDE 22

22

material volume geometry surface

MDL Material Model

backface

slide-23
SLIDE 23

23

material volume geometry surface

MDL Material Model

scattering

bsdf

backface

slide-24
SLIDE 24

24

material volume geometry surface emission

MDL Material Model

scattering

bsdf

intensity emission

edf

backface

slide-25
SLIDE 25

25

material volume geometry surface emission

MDL Material Model

scattering

bsdf

intensity emission

edf

scattering_coefficient absorption_coefficient scattering

vdf

backface

slide-26
SLIDE 26

26

material volume geometry surface emission

MDL Material Model

scattering

bsdf

intensity emission

edf

scattering_coefficient absorption_coefficient scattering

vdf

cutout_opacity displacement normal

backface

slide-27
SLIDE 27

27

material volume geometry surface emission

MDL Material Model

thin_walled ior scattering

bsdf

intensity emission

edf

scattering_coefficient absorption_coefficient scattering

vdf

cutout_opacity displacement normal

backface

slide-28
SLIDE 28

28

Diffuse Transmission Specular Reflection

  • Spec. Refl.+Transm.

Measured BSDF Glossy (various) Backscatter Glossy

Bidirectional Scattering Distribution Functions

MDL Elemental Distribution Functions

Diffuse Reflection

slide-29
SLIDE 29

29

Emissive Distribution Functions Volume Distribution Functions

MDL Elemental Distribution Functions

Henyey-Greenstein Diffuse Spot IES Profile

slide-30
SLIDE 30

30

MDL Distribution Function Modifiers

Tint Thin Film Directional Factor Measured Curve Factor

slide-31
SLIDE 31

31

MDL Distribution Functions Combiners

Normalized Mix Clamped Mix Weighted Layer Fresnel Layer Measured Curve Layer Custom Curve Layer

slide-32
SLIDE 32

32

MDL Layered Material Example

slide-33
SLIDE 33

34

Defining Physically-based Materials With Source Code

slide-34
SLIDE 34

35

struct material { bool thin_walled; material_surface surface; material_surface backface; color ior; material_volume volume; material_geometry geometry; };

MDL is a ‘C’ like language. The material viewed as a struct

Defining a Material Using MDL

slide-35
SLIDE 35

36

struct material { bool thin_walled; material_surface surface; material_surface backface; color ior; material_volume volume; material_geometry geometry; }; struct material_surface { bsdf scattering; material_emission emission; };

MDL is a ‘C’ like language. The material and its components viewed as a struct

Defining a Material Using MDL

slide-36
SLIDE 36

37

struct material { bool thin_walled = false; material_surface surface = material_surface(); material_surface backface = material_surface(); color ior = color(1.0); material_volume volume = material_volume(); material_geometry geometry = material_geometry(); }; struct material_surface { bsdf scattering = bsdf(); material_emission emission = material_emission(); };

MDL is a ‘C’ like language. The material and its components viewed as a struct

Defining a Material Using MDL

slide-37
SLIDE 37

38

material();

Material struct is already fully defined

Defining a Material Using MDL

slide-38
SLIDE 38

39

Material struct is already fully defined

material();

Defining a Material Using MDL

slide-39
SLIDE 39

40

Creating new materials

material name ( material-parameters ) = material ( material-arguments );

Defining a Material Using MDL

slide-40
SLIDE 40

42

material plaster( ) = material( surface: material_surface( scattering: df::diffuse_reflection_bsdf() ) );

Defining a Material Using MDL

slide-41
SLIDE 41

43

material plaster ( color plaster_color = color(.7)) = material( surface: material_surface ( scattering: df::diffuse_reflection_bsdf ( tint: plaster_color ) ) );

New materials can have parameters

Defining a Material Using MDL

slide-42
SLIDE 42

44

material plastic( color diffuse_color = color(.15,0.4,0.0), float roughness = 0.05 ) = material( surface: material_surface( scattering: df::fresnel_layer ( ior: color(1.5), layer: df::simple_glossy_bsdf ( roughness_u: glossy_roughness ), base: df::diffuse_reflection_bsdf ( tint: diffuse_color ) ) ) );

Create complex materials by layering

Defining a Material Using MDL

slide-43
SLIDE 43

46

January 10th update: more on procedural texturing and displacement Upcoming: advanced volumes

MDL Handbook

www.mdlhandbook.com

slide-44
SLIDE 44

47

MDL Procedural Programming Language

Function results feed into material and function parameters “Shader graphs” are equivalent to function call graphs

C-like language for function definitions

value

color_constructor texture_coordinate

texture_space`: 0 position

summed_perlin_noise

plaster_color

Material plaster

slide-45
SLIDE 45

48

Defining a Function Using MDL

float summed_perlin_noise ( float3 point, int level_count=4, float level_scale=0.5, float point_scale=2.0, bool turbulence=false) { float scale = 0.5, noise_sum = 0.0; float3 level_point = point; for (int i = 0; i < level_count; i++) { float noise_value = perlin_noise(level_point); if (turbulence) noise_value = math::abs(noise_value); else noise_value = 0.5 + 0.5 * noise_value; noise_sum += noise_value * scale; scale *= level_scale; level_point *= point_scale; } return noise_sum; }

MDL Handbook Functions allow control flow like loops, switches, conditionals

slide-46
SLIDE 46

49

Defining a Function Using MDL

material perlin_noise_material() = plaster( plaster_color: color( summed_perlin_noise( point: state::texture_coordinate(0) ) ) )

Call graph of functions substitute shader graphs

value

color_constructor texture_coordinate

texture_space`: 0 position

summed_perlin_noise

plaster_color

Material plaster

slide-47
SLIDE 47

50

MDL Module System

MDL is a programming language allowing dependencies among modules and materials import nvidia::vMaterials::Design::Metal::chrome::*; We use search paths to resolve imports

MDL is program code

slide-48
SLIDE 48

51

MDL Module System

MDL is a programming language allowing dependencies among modules and materials import nvidia::vMaterials::Design::Metal::chrome::*; We use search paths to resolve imports C:\Users\Jan\Documents\mdl\nvidia\vMaterials\Design\Metal\chrome.mdl

MDL is program code

search path MDL package space nvidia::vMaterials::Design::Metal::chrome

slide-49
SLIDE 49

52

.mdl

MDL 1.5 Preview

One material – fully self contained in one file Includes textures, previews, etc. in the file Renaming and copying works … work just like textures

MDL Encapsulated File Format (MDLE)

unpack refactor MDL SDK .mdle main.mdl resources/… thumbnails/… .jpg .jpg .mdl

slide-50
SLIDE 50

53

MDL 1.5 Preview

Localization of all MDL string annotations Based on OASIS standard XLIFF 1.2: XML Localisation Interchange File Format

http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html

Package and module XLIFF files in MDL file hierarchy Example C:\Users\%USERNAME%\Documents\mdl\ MDL search path nvidia\vMaterials\fr.xlf French vMaterial package XLIFF file nvidia\vMaterials\AEC\Glass\Mirror_fr.xlf French Mirror module XLIFF file

Internationalization (i18n)

slide-51
SLIDE 51

54

MDL 1.5 Preview

Hair shading

struct material { … hair_bsdf hair; }; hair_bsdf chiang_hair_bsdf { float diffuse_reflection_weight = 0.0; color diffuse_reflection_tint = color(1.0); float2 roughness_R = float2(0.0); float2 roughness_TT = roughness_R; float2 roughness_TRT = roughness_TT; float cuticle_angle = 0.0; color absorption_coefficient = color(); float ior = 1.55; };

Combined hair BSDF model

slide-52
SLIDE 52

55

MDL 1.5 Preview

Microfacet coloring to support flip-flop car paints and more

1D measured curve (MDL >=1.4) 2D measured curve (new in MDL 1.5)

slide-53
SLIDE 53

56

Material Catalogs Designed for Parallelism Measured Materials

Additional MDL Benefits

Spatially Varying BRDF AxF from X-Rite Measure Isotropic BSDF Modules and packages Archives Little data dependencies Side-effect free functions

slide-54
SLIDE 54

57

MDL Ecosystem

slide-55
SLIDE 55

58

MDL – Past, Present and Future

2011 2012 2013 2014 2015 2016 2017 2018 2019

MDL 0.x MDL 1.5 MDL 1.0 Iray 2013 MDL 1.1 Public Specification Catia V6 Bunkspeed MDL 1.4 Open Source SDK Public SDK Unreal Studio 4.20 Advisory Council Holodeck Solidworks Visualize MDL 1.3 Vray Adobe Dimension ESI IC.IDO vMaterials Nvidia Iray Plugins MDL 1.2 JIT Compile mental ray (3ds May, Maya) Substance Designer Daz 3d Megascans Vizoo

slide-56
SLIDE 56

59

MDL Advisory Council

Joint direction of MDL and the MDL eco system Include expertise other companies have gained in the field and with MDL

Companies sharing our vision of MDL

slide-57
SLIDE 57

60

NVIDIA Iray

Iray 2019 roadmap

Iray RTX 2019

  • Release in May
  • RTX support, up to 5 times speedup!
  • MDL 1.5 support for
  • MDLE
  • localization
  • 2d measured curve
slide-58
SLIDE 58

61

SOLIDWORKS Visualize

MDL import since 10/2018, tweaking + viewport preview coming

slide-59
SLIDE 59

62

Epic Unreal Studio

MDL support through DATASMITH

“Real-time workflows for enterprise” www.unrealengine.com/studio

slide-60
SLIDE 60

63

Vizoo xTex

MDL export in the next release

“Vizoo is the number one supplier of Soft-and Hardware solutions for the physically accurate digitization of material swatches in the fashion industry.“

www.vizoo3d.com

slide-61
SLIDE 61

64

MEDULR

Online MDL editor and material library preparing for opening

Discover, create and share materials. We're building a global community to create the worlds largest material library.

www.medulr.com

slide-62
SLIDE 62

65

Quixel Megascans

“Incredible scans and tools for creatives.”

quixel.com

slide-63
SLIDE 63

66

Substance Designer Adobe Dimensions

Creation Libraries/Scan Rendering Applications inc Renderers

Unreal Studio Adobe Stock Vray Max/Maya NVIDIA Holodeck Substance Source NVIDIA VMaterials NVIDIA Iray UE4

MDL Ecosystem

Chaosgroup Vray Iray DCC Plugins Dassault Catia V6 Daz 3D Studio Solidworks Vis. Siemens NX11 Other Iray Prod‘s Vizoo xTex Quixel Megascans medulr

slide-64
SLIDE 64

67

Focus on Material Exchange

Freely choose where to author material content

Substance Designer Iray for Rhino

create consume modify

Chaosgroup V-RAY

slide-65
SLIDE 65

68

NVIDIA vMaterials 1.6 – SIGGRAPH 2019

~1700 MDL materials verified for accuracy - FREE TO USE

slide-66
SLIDE 66

69

slide-67
SLIDE 67

70

Become Part of the Ecosystem

slide-68
SLIDE 68

71

Become Part of the Ecosystem

Integrate MDL enabled renderer

MDL is included

Write your own compiler

Based on the freely available MDL Specification

Use the MDL SDK

Published under the NVIDIA Designworks License and …

slide-69
SLIDE 69

72

Write Your Own Compiler

MDL Specification

Language specification document Free to use http://www.nvidia.com/mdl/

MDL conformance test suite

Syntactic conformance tests Semantic conformance tests Available on request

slide-70
SLIDE 70

73

https://developer.nvidia.com/designworks

RENDERING

Multi-Display Capture SDK Warp and Blend GPUDirect for Video Video Codec SDK Iray SDK OptiX SDK MDL SDK vMaterials NV Pro Pipeline GVDB Voxels VXGI GRID SW MGMT SDK NVAPI/NVWMI PhysX

PHYSICS VOXELS VIDEO MANAGEMENT DISPLAY

slide-71
SLIDE 71

74

MDL SDK 2019 (.0.1)

MDL 1.4 (1.5 feature previews) DB for MDL definitions DAG view on materials

several compilation modes

MDL editing Code generators

PTX, LLVM IR, x86, HLSL, GLSL (fcts.

  • nly)

Distiller and texture baker Samples Documentation and tutorials

Features

Editor Renderer API Samples Distill MDL source Database of content Generate code Bake textures Docs MDL SDK Compile Material Resolve, parse, store Optimized DAG view on material

slide-72
SLIDE 72

75

MDL SDK 2019 – What is New

Preview of MDL 1.5 features:

  • Localisation
  • MDL encapsulated format

Improved BSDF reference implementation (libbsdf) including measured brdf and emissive distribution functions Additional distilling mode (transmissive PBR) HLSL backend (2019.0.1) Automatic derivatives for texture filtering Open source release available on Github

  • Includes exclusive MDL core compiler API

More samples

  • Updated CUDA sample for transmissive

materials

  • (CPU rendering sample)?
  • MDL browser sample

Features

slide-73
SLIDE 73

76

MDL and RTX

  • Anisotropic glossy reflections
  • True refractive and volumetric materials
  • Measured BRDF
  • Proper translucency
  • Complex glossy lobe shape and color

MDL materials make RTX shine!

Materials tricky for todays game engines become feasible with RTX

slide-74
SLIDE 74

77

MDL SDK and RTX

Microsoft DXR

  • HLSL back-end with MDL SDK 2019.0.1

and sample path tracer in the SDK

NVIDIA OptiX

  • PTX back-end since MDL SDK 2018.1

sample program available as part of Optix 5.1 & 6 Integrating MDL with an RTX based renderer is simple!

The MDL SDK directly generates material code for use in RTX enabled renderer

slide-75
SLIDE 75

78

Automatic Derivatives for Texture Filtering

OptiX sample renderer integration: Derivatives off

slide-76
SLIDE 76

79

Automatic Derivatives for Texture Filtering

OptiX sample renderer integration: Derivatives on

slide-77
SLIDE 77

80

MDL in Realtime Rendering

1. Ubershader 2. Compilation: on-demand shader generation 3. Distillation to fixed material model All based on MDL SDK

Three approaches

slide-78
SLIDE 78

81

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

slide-79
SLIDE 79

82

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

fct bsdf bsdf fct fct fct fct fct fct fct fct bsdf bsdf fct fct fct fct bsdf bsdf bsdf

slide-80
SLIDE 80

83

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

tex tex tex tex tex

Material

diffuse specular glossy kurtosis normal fct bsdf bsdf fct fct fct fct fct fct fct fct bsdf bsdf fct fct fct fct bsdf bsdf bsdf

slide-81
SLIDE 81

84

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

tex tex tex tex tex

Material

diffuse specular glossy kurtosis normal fct bsdf bsdf fct fct fct fct fct fct fct fct bsdf bsdf fct fct fct fct bsdf bsdf bsdf

Approximate render result: Some materials will look quite different

slide-82
SLIDE 82

85

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

tex tex tex tex tex

Material

diffuse specular glossy kurtosis normal fct bsdf bsdf fct fct fct fct fct fct fct fct bsdf bsdf fct fct fct fct bsdf bsdf bsdf

Fast projection of material instances: Realtime editing Approximate render result: Some materials will look quite different

slide-83
SLIDE 83

86

Distillation to Fixed Material Model

Fixed Material Model MDL Material

Complex BSDF layering Complex procedurals Simple BSDF structure One texture per parameter

Distillation

tex tex tex tex tex

Material

diffuse specular glossy kurtosis normal fct bsdf bsdf fct fct fct fct fct fct fct fct bsdf bsdf fct fct fct fct bsdf bsdf bsdf

Fast projection of material instances: Realtime editing Approximate render result: Some materials will look quite different Flexible framework to target different fixed models not a fixed MDL subset (no “MDL lite”)

slide-84
SLIDE 84

87

Distillation to Fixed Material Model

Results on vMaterials

  • riginal

Fresnel( glossy, diffuse) diffuse-only

slide-85
SLIDE 85

88

MDL Distilling

Multiple distilling targets (diffuse only, diffuse_glossy, UE4, new: transmissive PBR)

Released as part of Iray/MDL SDK

Original: Iray MDL Projection: Dassault Stellar with Enterprise PBR

slide-86
SLIDE 86

89

May the Source Be with You

https://github.com/NVIDIA/MDL-SDK BSD 3-clause license Full MDL SDK

  • 48 modules, 570 files, 310 KLOC
  • Excluding

MDL Distilling and texture baking GLSL compiler back-end

  • Added MDL Core API
  • Includes MDL Core Definitions and more

4 releases shipped since SIGGRAPH 2018

NVIDIA Open Sourced the MDL SDK

Feature image courtesy of Adobe, created by art director Vladimir Petkovic.

slide-87
SLIDE 87

90

MDL Core API

Higher-level API for easy integration Reference counted interfaces Mutable objects In-memory store Texture and resource importer API close to the compiler Objects managed in arenas Immutable objects Stateless compiler Callbacks

A Lower-level Compiler API in the MDL SDK MDL SDK API MDL Core API

slide-88
SLIDE 88

91

Starting Material MDL Ecosystem What is MDL

MDL Takeaways

Declarative Material Definition Procedural Programming Language Open Source release MDL Specification MDL Handbook MDL SDK MDL Backend Examples Conformance Test Suite NVIDIA vMaterials MDL Advisory Council

slide-89
SLIDE 89

92

Further Information on MDL

Documents

NVIDIA Material Definition Language

฀ Technical Introduction ฀ Handbook ฀ Language Specification

GTC On-Demand

  • n-demand-gtc.gputechconf.com

www.nvidia.com/mdl raytracing-docs.nvidia.com/mdl/index.html MDL@GTC

Mon 9 AM SJCC 230B

Sharing Physically Based Materials Between Renderers with MDL Integrating the NVIDIA Material Definition Language MDL in Your Application A New PBR Material Serving Mobile, Web, Real-Time Engines and Ray Tracing Multi-Platform Photo-Real Rendering: Utilizing NVIDIA'S MDL and Allegorithmic's Substance Suite for Product Imaging Real-Time Ray Tracing with MDL Materials

Mon 10 AM SJCC 230B Mon 11 AM Hilton Hotel Almaden 2 Tue 9 AM Hilton Hotel Almaden 2 Thu 10 AM SJCC 230C