Cycles: initial subsurface multiple scattering support. It's not working as
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 1 Apr 2013 20:26:52 +0000 (20:26 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 1 Apr 2013 20:26:52 +0000 (20:26 +0000)
commitde9dffc61e15a6af41947cbcf09ada89779e86ac
treec3f6e42482085a3a18c8278adf55dbb1e0f76c8d
parent40b05d364e988bca01dd338026dc24765f56187a
Cycles: initial subsurface multiple scattering support. It's not working as
well as I would like, but it works, just add a subsurface scattering node and
you can use it like any other BSDF.

It is using fully raytraced sampling compatible with progressive rendering
and other more advanced rendering algorithms we might used in the future, and
it uses no extra memory so it's suitable for complex scenes.

Disadvantage is that it can be quite noisy and slow. Two limitations that will
be solved are that it does not work with bump mapping yet, and that the falloff
function used is a simple cubic function, it's not using the real BSSRDF
falloff function yet.

The node has a color input, along with a scattering radius for each RGB color
channel along with an overall scale factor for the radii.

There is also no GPU support yet, will test if I can get that working later.

Node Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF

Implementation notes:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering
55 files changed:
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/closure/bssrdf.h [new file with mode: 0644]
intern/cycles/kernel/kernel_bvh.h
intern/cycles/kernel/kernel_camera.h
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/kernel_compat_cuda.h
intern/cycles/kernel/kernel_compat_opencl.h
intern/cycles/kernel/kernel_globals.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_random.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_subsurface.h [new file with mode: 0644]
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/CMakeLists.txt
intern/cycles/kernel/osl/osl_bssrdf.cpp [new file with mode: 0644]
intern/cycles/kernel/osl/osl_bssrdf.h [new file with mode: 0644]
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/CMakeLists.txt
intern/cycles/kernel/shaders/node_subsurface_scattering.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/stdosl.h
intern/cycles/kernel/svm/svm_closure.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/CMakeLists.txt
intern/cycles/render/bssrdf.cpp [new file with mode: 0644]
intern/cycles/render/bssrdf.h [new file with mode: 0644]
intern/cycles/render/film.cpp
intern/cycles/render/graph.h
intern/cycles/render/integrator.cpp
intern/cycles/render/integrator.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/osl.cpp
intern/cycles/render/osl.h
intern/cycles/render/scene.cpp
intern/cycles/render/shader.cpp
intern/cycles/render/shader.h
intern/cycles/render/svm.cpp
intern/cycles/render/svm.h
intern/cycles/render/tables.cpp
intern/cycles/render/tables.h
intern/cycles/util/util_math.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/node.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_shader.h
source/blender/nodes/NOD_static_types.h
source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c [new file with mode: 0644]