8dfcb121d49d15e8429271bf301d842a0b9ca1cb
This add support for the thickness output in a consistent manner across all BSDF. If thickness is above zero, for any ray going below the surface, the object is modeled as a sphere tangent to the shading point and of diameter equal to the given thickness. The ray is then intersected with that sphere and transmitted out. This model perfectly matches a raytracer behavior for a sphere model of diameter equal to thickness. This replaces the old refraction depth model which was modelling a infinite slab of material. For simplicity, we do not do 2 microfacet transmission events. We simply use the main lobe direction for the first interface. This still matches the raytracer behavior for smooth surfaces. Weirdly enough the apparent roughness doesn't need to be amended. To get shadowing and translucency approximation to work, this splits the transmission BSDF evaluation to its own light loop. This simplifies a lot of logic and assumes only one transmission BSDF is ever sampled in a nodetree. This changes the behavior of the thickness output with regard to the thickness from shadow. We now take the min instead of the max between both. This break a lot of file since the default thickness is set to `0.1`. This patch doesn't change the default thickness output behavior but it will be changed in another PR. Note this might change the shadow sampling pattern since translucent and non-translucent are now sampling them separately. Pull Request: https://projects.blender.org/blender/blender/pulls/120329
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
