Cycles: Add multi-scattering, energy-conserving GGX as an option to the Glossy, Aniso...
authorLukas Stockner <lukas.stockner@freenet.de>
Thu, 23 Jun 2016 20:56:43 +0000 (22:56 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Thu, 23 Jun 2016 20:57:26 +0000 (22:57 +0200)
commit23c276832b1bb43712756c0ea3af954557ab05e7
tree145caf15c444a33d521656d9d438030c309681ee
parent2af4c80be6d1888fc9bb34e67518ded8e8b1beff
Cycles: Add multi-scattering, energy-conserving GGX as an option to the Glossy, Anisotropic and Glass BSDFs

This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the
multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model".

Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes
the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until
the ray leaves it again, which ensures perfect energy conservation.

In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing
roughness - is solved in a physically correct and efficient way.

The downside of this model is that it has no (known) analytic expression for evalation. However, it can be
evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the
balance heuristic guarantee an unbiased result at the cost of slightly higher noise.

Reviewers: dingto, #cycles, brecht

Reviewed By: dingto, #cycles, brecht

Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel

Differential Revision: https://developer.blender.org/D2002
29 files changed:
intern/cycles/blender/blender_shader.cpp
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/closure/bsdf_microfacet_multi.h [new file with mode: 0644]
intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h [new file with mode: 0644]
intern/cycles/kernel/closure/bsdf_util.h
intern/cycles/kernel/kernel_bake.h
intern/cycles/kernel/kernel_emission.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_path_branched.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_shadow.h
intern/cycles/kernel/kernel_subsurface.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/osl_closures.cpp
intern/cycles/kernel/osl/osl_closures.h
intern/cycles/kernel/osl/osl_shader.cpp
intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
intern/cycles/kernel/shaders/node_glass_bsdf.osl
intern/cycles/kernel/shaders/node_glossy_bsdf.osl
intern/cycles/kernel/shaders/stdosl.h
intern/cycles/kernel/split/kernel_shader_eval.h
intern/cycles/kernel/svm/svm_closure.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/nodes.cpp
intern/cycles/util/util_math.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesrna/intern/rna_nodetree.c
source/blender/nodes/NOD_static_types.h