How to use subsurface scattering? (pre-1.7 guide)

Note: this guide was created for pre-1.7 versions of Corona Renderer. Some information may be outdated, some information may be missing.


Tutorial: Using SSS to shader strawberries





What is subsurface scattering?


In computer graphics, subsurface scattering is the effect of light penetrating an object, scattering inside it, reacting with its volume (changing color or intensity) and bouncing off it's inside. It is necessary for realistic rendering of materials like skin, wax or milk.



How it works in Corona


SSS effects in Corona are extremely fast, easy to set up and work with interactive rendering. There is no faking, interpolation or precomputation involved, so Corona always delivers highest quality SSS results. "Scattering" (as in wax or skin) and "volumetrics" (as in smoke or fog) in Corona are achieved using the same rendering algorithm.

In Corona, two materials are capable of producing scattering effects: standard Corona Material and special Corona Volume Material. They use exactly the same rendering technique for subsurface scattering. Corona Volume is a simple volumetric material intended for global fog and objects without defined surface (smoke, clouds), while standard Corona Material serves as a more general, multi-functional material with subsurface scattering capabilities (for refractive, opaque or translucent objects with defined surface - skin, wax, fruit, liquids).



Enabling Scattering Effects


1. Standard Corona Material:


To enable scattering effects, you need to allow light rays to pass through object's surface first. To do this, you can use refraction, translucency or opacity controls. Scattering materials should only be applied to solid, capped (watertight) objects. For objects with no thickness, use translucency instead. See: How to create realistic leaf or grass material?


Generally, in volumetric materials:

Refraction:
  • Should be used for objects that have some defined surface and specified IOR - like liquids (orange juice, milk) - materials that both scatter and refract light - examples 3, 6, 7
  • You can also use refraction glossiness with scattering effects
  • Refraction level=1 and IOR=1 will produce same results as opacity level=0, but it allows reflections
  • Refraction level=1 and IOR=1 will produce same results as Corona Volume Material, but it allows reflections

Translucency:
  • Should be used for objects that have some defined surface (like skin or fruit) and a scattering layer underneath - example 2
  • Refraction glossiness is ignored for translucency if refraction is not used

Opacity:
  • Should be used for volumetric objects that do not refract light and have semi-transparent surface layer, or for objects with no defined borders - like clouds, smoke or fog - example 4
  • Opacity level = 0 will produce same results as refraction level=1 with IOR set to 1, but it does not allow reflections
  • Opacity level=0 will produce same results as Corona Volume Material

After enabling light scattering inside an object, you can go to "Volumetric Absorption and Scattering" rollout. To enable and see light scattering, you need to:

1. Change absorption distance to a value other than 0
2. Change scattering color to other than pure black

All available controls include:

Absorption color - color that originally white ray will have after travelling "distance" specified in the medium
Absorption distance - distance, after which originally white ray will have "absorption color"

Scattering color - color of the scattering media
Scattering directionality - directionality of the scattering. 0 produces isotropic ("diffuse") scattering. Positive values produce forward scattering. Negative values produce backward scattering. Default value of 0 is suitable for most media, with the exception of clouds, where higher positive numbers will produce the effect of "silver lining"

Single bounce only - when enabled, only single bounce (direct lighting) will be scattered in the medium. This results in a biased (darker), but faster rendering. Useful e.g. for rendering "god rays".



2. Corona Volume Material


Corona Volume Material doesn't require any special actions to enable scattering effects as it is designed solely for them. To see the effect of light absorption and scattering, simply change absorption distance value to other than 0 and scattering color to other than pure black. You can also make your material glow by changing "emission distance" to other than 0.This material should only be used for objects with no defined surface (smoke, clouds) and for volumetric fog.


Emission distance - Emission from the volume (glowing plasma effect). Controlled by setting the "color" that is emitted from each "distance" of ray travelling in the medium. Higher values will make the glow less intensive.

Single bounce only - when enabled, only single bounce (direct lighting) will be scattered in the medium. This results in a biased (darker), but faster rendering. Useful e.g. for rendering "god rays".


Global Volume Material



Volumetric fog tutorial:


 


Creating Room with God Rays (5 parts):




To produce global volumetric fog effect, you can use "Global Volume Material" setting in Render Setup > Scene > Scene Environment. It is best to use it with Corona Volume Material, though using standard Corona Material is not a mistake as it may provide identical results.





Examples


1. Subsurface scattering material - "wax"
Refraction level was used to enable scattering effects as wax has no separate "surface layer".





2. Subsurface scattering material - "skin"
Translucency was used to enable scattering effects as skin has separate diffuse layer that covers light scattering layers.





3. Subsurface scattering material - "juice"
Refraction was used to enable scattering effects inside of liquid.





4. Subsurface scattering material - "smoke"
Opacity was used to enable scattering effects. The objects don't have defined "surface" layer.





5. Glowing subsurface scattering material - "ghost"
Corona Volume Material was used to enable light emission.





6. Juice - refraction was used.





7. Milk - subtle subsurface scattering.





8. Cloud created using a displaced mesh and Corona Volume Material:
Download sample cloud scene [ here ].
8.A. Directionality = 0




8.B. Directionality = 0,5


8.C. Directionality = 0,9


8.D. Directionality = -0,5


8.E. Directionality = -0,9


8.F. Directionality = 0,8 enables "silver lining" effect visible when sun lights the cloud from behind.
 

9. Volumetric fog created using Corona Volume Material in Global Volume Material slot:
Note the "god rays" forming below sun.


The same scene rendered without global volume material:




See also:

How to render skin?

What are the two available SSS modes?




Scanned skull model was kindly provided by Ten24 3d Scan Store.
http://www.3dscanstore.com/