Buttefly

49
Butterfly Eect: Workflow, Rendering & Shading Renaldas Zioma Unity Technologies @__ReJ__ Monday, April 29, 13

Transcript of Buttefly

Page 1: Buttefly

Butterfly Effect:Workflow, Rendering & Shading

Renaldas ZiomaUnity Technologies

@__ReJ__

Monday, April 29, 13

Page 2: Buttefly

Unite template2

What is it?Real-time animated shortCollaboration between Unity, Passion Pictures and NVIDIA

Monday, April 29, 13

Page 3: Buttefly

Unite template

Opportunity to Learn

• Passion Pictures• New world of RealTime• No prior experience with Unity

• Unity Technologies• CG Pipeline• Huge amounts of Data

3

Monday, April 29, 13

Page 4: Buttefly

Unite template

Project Outline

• 30GB of source Assets• 5GB of runtime Data• 137 shots• 40 “scenes” in Editor

4

Monday, April 29, 13

Page 5: Buttefly

Unite template

Project Organization• Team of ~10 - first month

• pre production• research / tools

• Team of ~30 - next 2 months• content• tools / engine modifications

• Team of 5 - last 3.5 months• polish• optimizations

5

Monday, April 29, 13

Page 6: Buttefly

Unite template6

Monday, April 29, 13

Page 7: Buttefly

Unite template7

Monday, April 29, 13

Page 8: Buttefly

Unite template

Previz• One Sequence• Goals

• Initial timings• Visualize Space

• Prime lenses • 10, 14, 18, 21, 24, 27, 35, 40, 50, 75, 100, 200

• Zoom lens • 18 to 150

8

Monday, April 29, 13

Page 9: Buttefly

Unite template

Pipeline

• Connect Passion pipeline with Unity Editor• Main Goal

Minimal changes to Artist workflow!

9

Monday, April 29, 13

Page 10: Buttefly

Unite template

Passion Pipeline

• No Change for Artists• Use Existing Asset Pipeline

• Sequences SB, BU• Shots SB_01_00, SB_02_00• Assets [Character/Camera/Layout]

• Export Models and Publish Shots as normal• Add Unity support

10

Monday, April 29, 13

Page 11: Buttefly

Unite template

Character Rig

• XSI Softimage Rig• Bones• Envelope• Face Shapes• Controls

• Unity Rig• Bones• Blend Shapes• Materials

11

Monday, April 29, 13

Page 12: Buttefly

Unite template

Facial Rig

• Bones• Head, neck, jaw, eyes

• Blend shapes • Face

• Mocap shoot• Face markers

• Cubic motion • Retarget facial animation onto XSI controls

12

Monday, April 29, 13

Page 13: Buttefly

Unite template13

Monday, April 29, 13

Page 14: Buttefly

Unite template14

Monday, April 29, 13

Page 15: Buttefly

Unite template

Non-linear time

• Treat Sequences as Live Shoot• Cover the action from different angles• Each sequence needs multiple cameras

15

Monday, April 29, 13

Page 16: Buttefly

Unite template

Non-linear time• Shot Description

• Final Cut edit• Export EDL as XML file• Camera in/out points

• Timeline in Unity

• Sequence Preview in RV• Using EDL from Final Cut• Play whole preview sequence in RV• Instant Feedback for Animators

16

Monday, April 29, 13

Page 17: Buttefly

Unite template

Timeline in Unity

17

Monday, April 29, 13

Page 18: Buttefly

Unite template

Timeline in Unity

18

Monday, April 29, 13

Page 19: Buttefly

Unite template

Non-linear Challenges

• Animation• Particles• Physics

• Rigid Body simulation

19

Monday, April 29, 13

Page 20: Buttefly

Unite template

Point Cache

• Per-vertex Deformations• Cloth• Hair

20

Monday, April 29, 13

Page 21: Buttefly

Unite template21

Point Cache

Monday, April 29, 13

Page 22: Buttefly

Unite template

Tessellation

• CatmullClark• Now: on CPU• Future: OpenSubdiv library

22

Monday, April 29, 13

Page 23: Buttefly

Unite template

Hair

• Guide “strands” for modeling• GPU Tesselation and “Amplification”•

23

Monday, April 29, 13

Page 24: Buttefly

Unite template24

Hair

Monday, April 29, 13

Page 25: Buttefly

Unite template25

MentalRay Architectural (MIA) Shaders• Familiar• Small set of parameters• Physically Based• Micro facet• Energy conserving

Monday, April 29, 13

Page 26: Buttefly

Unite template26

1 parameter for Diffuse

Monday, April 29, 13

Page 27: Buttefly

Unite template27

2 parameters for Specular

Monday, April 29, 13

Page 28: Buttefly

Unite template28

2 parameters for Reflectivity

Monday, April 29, 13

Page 29: Buttefly

Unite template

MIA Implementation

• Oren-Nayar• Diffuse

• Cook-Torrance• Specular• Geometric + Roughness + Fresnel term• Ward distribution for Roughness• I think... ;)

• Direct + Indirect illumination

29

Monday, April 29, 13

Page 30: Buttefly

Unite template

Unity Implementation

• Oren-Nayar• very expensive• OK approximations

• Cook-Torrance• Normalized Blinn-Phong instead of Ward• Roughness to Phong exponent (n):

• n = 2 / roughness2 - 2 • Tweaked to match MIA look:

• n = 2 / roughness4 - 2• Schlick approximation for Fresnel

• Only direct illumination at RunTime

30

Monday, April 29, 13

Page 31: Buttefly

Unite template31

MentalRay Unity

Monday, April 29, 13

Page 32: Buttefly

Unite template32

Monday, April 29, 13

Page 33: Buttefly

Unite template33

Indirect Illumination (GI)

• Point Clouds for Dynamic Geometry• Spherical Harmonics for Diffuse Bounce• Cube Textures for Reflections

Monday, April 29, 13

Page 34: Buttefly

Unite template34

Indirect Illumination (GI)

• Textures for Static Geometry• Diffuse Bounce• AO

Monday, April 29, 13

Page 35: Buttefly

Unite template35

Indirect Illumination (GI)

• Calculated offline with Autodesk Beast• Path Tracer + Final Gather

• IBL for Sky• Fake Caustics

Monday, April 29, 13

Page 36: Buttefly

Unite template36

Real Time Shadows

Monday, April 29, 13

Page 37: Buttefly

Unite template37

Baked Shadows• Of course baked only for static environments

Monday, April 29, 13

Page 38: Buttefly

Unite template38

Ambient Occlusion• HBAO - Screen Space

Monday, April 29, 13

Page 39: Buttefly

Unite template39

Ambient Occlusion• Too Dark & Dirty

Monday, April 29, 13

Page 40: Buttefly

Unite template40

Ambient Occlusion• Applied ONLY to Indirect Illumination• Colored to match Sky better

Monday, April 29, 13

Page 41: Buttefly

Unite template

Skin

• Texture Space Diffusion• 3 Layers

41

Monday, April 29, 13

Page 42: Buttefly

Unite template

Back Scattering• Translucency Map• Adds intensity to sub-

dermal layer

42

Monday, April 29, 13

Page 43: Buttefly

Unite template

HDR

43

2 Specular lobes

Monday, April 29, 13

Page 44: Buttefly

Unite template

HDR

44

Monday, April 29, 13

Page 45: Buttefly

Unite template45

Depth Of Field

• Antialiasing aware• FXAA based

• With Splatted Bokeh Texture

Monday, April 29, 13

Page 46: Buttefly

Unite template46

Monday, April 29, 13

Page 47: Buttefly

Unite template

Monday, April 29, 13

Page 48: Buttefly

Unite template48

Thank you!

Monday, April 29, 13

Page 49: Buttefly

Unite template

References

49

[Bavoil08] Image-Space Horizon-Based Ambient Occlusion. L. Bavoil, M. Sainz, 2008

[Catmull78] Recursively generated B-spline surfaces on arbitrary topological meshes. E. Catmull, J. Clark, 1978

[CookTorrance82] A Reflectance Graphics Model for Computer graphic. R. L. Cook, K. E. Torrance, 1982

[Hoffman10] Crafting Physically Motivated Shading Models for Game Development. N. Hoffman, 2010

[Lottes09] FXAA. T. Lottes, 2009

[Mental07] mental ray Architectural and Design Visualization Shader Library. mental images GmbH, 2007

http://www.mentalimages.com/fileadmin/user_upload/PDF/arch_and_design.pdf

[Mikkelsen09] Microfacet Based Bidirectional Reflectance Distribution Function. M. Mikkelsen, 2009

[Nießner12] Feature-Adaptive GPU Rendering of Catmull-Clark Subdivision Surfaces. M. Nießner, C. Loop, M. Meyer, T. Derose, 2012

[Olano10] LEAN Mapping. M. Olano, D. Baker, 2010

[Schüler11] The Blinn-Phong Normalization Zoo. C. Schüler, 2011

http://www.thetenthplanet.de/archives/255

[Zhukov98] An ambient light illumination model. S. Zhukov, A. Inoes, G. Kronin, 1998

Monday, April 29, 13