Presentation is loading. Please wait.

Presentation is loading. Please wait.

Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One.

Similar presentations


Presentation on theme: "Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One."— Presentation transcript:

1

2 Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One

3 ALU Budgets What do you use higher ALU performance for? –Full HD resolution(1920x1080) 2.25 times larger than half HD resolution(1280x720) –Post-processing High quality post-processing with existing algorithms –High resolution post-processing –Glare, de-focus blur, motion blur –Screen-space anti-aliasing New post-processing –Screen-space lighting (reflections), ambient obscurance, sub- surface scattering, volume rendering

4 Recent GPU Trend ALU free –Current GPU performance doesn’t depend on the number of ALU cycles B/W of cache / texture / render targets Register / multi-threading Limitations of render backend resources –Increasing the number of ALU instructions doesn’t tend to decrease performance ALU is typically used to save B/W by encoding and decoding It depends on the design of rendering passes

5 How About Shading? Many texture samples –For both forward and deferred techniques The only difference is the rendering pass –Albedo, Reflectance –Normal / Height, Roughness, AO –G-Buffer –Light source (IBL / SSL) / accumulation, GI info. –Do we have a budget to use more ALU?

6 More ALU? Can we use more ALU instructions for shading? –Old normalized Blinn-Phong model uses 20 to 30 instructions –100 instructions / light are affordable for new generation consoles –Using more instructions for shading is a good candidate to use ALU efficiently

7 The Current Popular Model A physically based model for specular –Microfacet model GGX (Trowbridge-Reitz) (D) Schlick approximation (F) Smith (G)

8 Better Model for Fresnel? Spherical Gaussian Approximation –This model approximates the Schlick approximation –Should we approximate the Fresnel equation? –Should we use more a accurate approximation?

9 Evaluation Yellow : Fresnel equation (IOR = aluminum at 610nm) Green : Schlick approximation (IOR = aluminum at 610nm) Blue : Fresnel equation (IOR = 1.5) Purple : Schlick approximation (IOR = 1.5) F(  ) 

10 Need Approximation? Do we have to approximate Fresnel for new generation consoles? –Fresnel equation w.r.t. reflectance ( f 0 ) It is easier to handle than refractive index

11 (IOR = 1.3 + 7.48i ) Blue : Fresnel equation with the refractive index Purple : Fresnel equation with the real reflectance Fresnel with Reflectance This Fresnel equation is inaccurate for large f 0 –A large real f 0 is calculated from a complex refractive index –The Fresnel equation should take complex numbers –The complex version is more complicated F(  ) 

12 Improved Spherical Gaussian Fresnel behavior is complicated –Need a complex approximation to represent the behavior –Try to improve accuracy with most useful value IOR = 1.5

13 Improved Spherical Gaussian (IOR = 1.5) Blue : Schlick approximation Purple : Fresnel equation Yellow : Improved Spherical Gaussian Schlick Improved Spherical Gaussian F(  ) 

14 Conclusion for F Term Schlick is a good enough approximation –It still has a problem with complex refractive indices with a large imaginary part It can be improved with Fresnel Term Approximations for Metals [WSCG 2005] –It requires a complex refractive index as a parameter –This difference is difficult to distinguish with punctual lights, but is more visible with image based lighting We use the Schlick approximation in this talk, though you can choose better approximations (including improved Spherical Gaussian) as you like

15 How about Diffuse? Lambert? –It is not realistic –We use microfacet models for specular, so why not for diffuse?

16 Oren-Nayar? Use Oren-Nayar [SIGGRAPH 1994] –Diffuse model taking into account the microfacet model and roughness View dependent component Matte-look depending on roughness Retro-reflective effect

17 NDF is not GGX –NDF of Oren-Nayar is G term is not Smith –Torrance-Sparrow V-cavity model Oren-Nayar doesn’t conserve energy with specular on each facet –Not a physically based model Problems with Oren-Nayar

18 Our Goal Better diffuse model –Using the same microfacet model as specular –Physically based diffuse model

19 Microfacet Model for Specular A reflectance model for specular can be simple –You only take reflection in view direction into account

20 Microfacet Model for Diffuse Since diffuse reflects incident light in all directions, a reflectance model is complex –If we assume all facets are Lambertian –All facets reflect toward view direction  : Hemisphere around the geometry normal(n) m : Microfacet normal

21 Try to Improve Oren-Nayar The first problem is that Oren-Nayar doesn’t take Fresnel into account –See “Improved Diffuse Reflection Models for Computer Vision” [WOLFF et al. 1998]

22 Starting Point if otherwise Blue : Original Oren-Nayar Purple : Improved one (SIGGRAPH 2012) LrLr ee

23 Intuition When surface gets rougher –Microfacet model behaves like a blur filter –When roughness = 0 Fresnel effect with Lambertian –When roughness increases Fresnel effect gets blurrier

24 Oren-Nayar analysis Lambertian View-dependent factor (microfacet effect) Blending factor (with roughness)

25 Diffuse Fresnel Term Using “A Practitioners’ Assesment of Light Reflection Models” [PG 1997]

26 Add Fresnel Term

27 Result Lambert Improved Oren-Nayar [SIGGRAPH 2012] Oren-Nayar with Fresnel roughness = 0.7

28 Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e 1 (0  ) cos  1 (0  ) f0f0 0.04 LrLr

29 Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e 0.707 (45  ) cos  1 (0  ) f0f0 0.04 LrLr

30 Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e 0.174(80  ) cos  1 (0  ) f0f0 0.04 LrLr

31 Is This Physically Based Diffuse? This is still a compromise –F term In reality, each facet must follow Fresnel Integrate Fresnel (with other terms) over facets –D and G terms Still not GGX and Smith

32 Try to Derive a New Diffuse Model Simply, integrating the diffuse microfacet model with given D, F and G functions –Not modifying Oren-Nayar

33 Deriving a New Model The model doesn’t have a closed form –It is numerically integrated

34 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.0 f0f0 0.04 ll LrLr

35 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.5 f0f0 0.04 ll LrLr

36 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 1.0 f0f0 0.04 ll LrLr

37 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 0.5 (60  ) cos  1.0 (0  ) roughness 0.8 f0f0 0.04 ll LrLr

38 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 0.342 (70  ) cos  0.5 (60  ) roughness 0.6 f0f0 0.04 ll LrLr

39 Analysis Blue : Oren-Nayar Puprle: Oren-Nayar w/ Fresnel Green : New model n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.0 f0f0 0.04 ee LrLr

40 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.3 f0f0 0.04 ee LrLr

41 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.7 f0f0 0.04 ee LrLr

42 Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l 0.259 (75  ) cos  0.985 (10  ) roughness 0.8 f0f0 0.04 ee LrLr

43 Implementation of the New Model Baking the model to a texture is the simplest way –3 vectors and 2 scalars f 0 can be factored out of texture –It is difficult to bake the model directly

44 ALU implementation When your shader is texture-bound –Typically, it is texture-bound –Complex fitted model is better than texture reads

45 Fitted Shading Model

46 Complexity The model is very complicated –Only a slight performance difference between our new model and Oren-Nayar in typical scenes –ALU is free!

47 Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.0 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

48 Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.5 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

49 Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 1.0 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

50 Fitted Model Analysis n·e 0.5 (60  ) cos  1.0 (0  ) roughness 0.8 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated n·l LrLr

51 Fitted Model Analysis n·e 0.342 (70  ) cos  0.5 (60  ) roughness 0.6 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

52 Fitted Model Analysis n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.0 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

53 Fitted Model Analysis n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.3 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

54 Fitted Model Analysis n·l 0.866 (30  ) cos  1.0 (0  ) roughness 0.7 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

55 Fitted Model Analysis n·l 0.259(75  ) cos  0.985 (10  ) roughness 0.8 f0f0 0.04 Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

56 Limitation Accuracy at grazing angles for both view and light vectors is not enough with this model –It may be noticeable on the edges Roughness is assumed to be from 0 to 1 The fitting model shouldn’t be used to compute AmbientBRDF texture

57 Results LambertOren-Nayar w/FresnelNew model Roughness 0.0

58 Results LambertOren-Nayar w/FresnelNew model Roughness 0.05

59 Results LambertOren-Nayar w/FresnelNew model Roughness 0.1

60 Results LambertOren-Nayar w/FresnelNew model Roughness 0.3

61 Results LambertOren-Nayar w/FresnelNew model Roughness 1.0

62 Results LambertOren-Nayar w/FresnelNew model Roughness 1.0 (diffuse only)

63 LambertOren-Nayar w/FresnelNew model

64 LambertOren-Nayar w/FresnelNew model

65 LambertOren-Nayar w/FresnelNew model

66 Conclusion From a physically based perspective, the same microfacet model should be used for both diffuse and specular –It makes more persuasive visuals –New consoles have enough computational power to implement such complex models

67 Acknowledgements

68 Questions? http://research.tri-ace.com/ You can find these slides, including past presentations, at


Download ppt "Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One."

Similar presentations


Ads by Google