Cycles: random walk subsurface scattering.
It is basically brute force volume scattering within the mesh, but part of the SSS code for faster performance. The main difference with actual volume scattering is that we assume the boundaries are diffuse and that all lighting is coming through this boundary from outside the volume. This gives much more accurate results for thin features and low density. Some challenges remain however: * Significantly more noisy than BSSRDF. Adding Dwivedi sampling may help here, but it's unclear still how much it helps in real world cases. * Due to this being a volumetric method, geometry like eyes or mouth can darken the skin on the outside. We may be able to reduce this effect, or users can compensate for it by reducing the scattering radius in such areas. * Sharp corners are quite bright. This matches actual volume rendering and results in some other renderers, but maybe not so much real world objects. Differential Revision: https://developer.blender.org/D3054
This commit is contained in:
@@ -52,6 +52,7 @@ static ustring u_cubic("cubic");
|
||||
static ustring u_gaussian("gaussian");
|
||||
static ustring u_burley("burley");
|
||||
static ustring u_principled("principled");
|
||||
static ustring u_random_walk("random_walk");
|
||||
|
||||
class CBSSRDFClosure : public CClosurePrimitive {
|
||||
public:
|
||||
@@ -79,6 +80,9 @@ public:
|
||||
else if (method == u_principled) {
|
||||
alloc(sd, path_flag, weight, CLOSURE_BSSRDF_PRINCIPLED_ID);
|
||||
}
|
||||
else if (method == u_random_walk) {
|
||||
alloc(sd, path_flag, weight, CLOSURE_BSSRDF_RANDOM_WALK_ID);
|
||||
}
|
||||
}
|
||||
|
||||
void alloc(ShaderData *sd, int path_flag, float3 weight, ClosureType type)
|
||||
|
Reference in New Issue
Block a user