As of version 1.0 beta 2.55 OctaneRender supports participating media inside objects (absorption, SubSurface Scattering
and emission). These settings are stored in medium nodes, which are attached to the corresponding input pin of diffuse
or specular material nodes.
There are two types of medium nodes, absorption and scattering. Scattering has parameters for absorption and scattering of light passing
through the medium, and emission inside the medium. Absorption is a simple version with only absorption.
Rendering a medium requires the path tracing or PMC kernel, with a sufficiently large maxdepth setting. The direct light kernel
renders an approximation.
Participating media should only be added to meshes that define a closed volume, rather than planes. Using planes to model
leaves of a plant with SSS will for instance not work. Using a single plane as ground plane should be OK (it will be treated
as an infinively deep material). The mesh can have opaque objects nested inside, but nested participating media are not supported.
The normals of the mesh must be oriented properly (outwards).
How to make a medium node work
A specular material is the easiest: by default it is set up properly. Transmission must be nonzero;
for the best effect reflection and transmission should be set to 1.0.
On diffuse materials subsurface scattering only works after they are set up with diffuse transmission.
To do so, connect a node to the transmission input pin, or in the node inspector use the drop down box to create a
node (beta 2.58b and later).
The reflection value needs to be set to a sufficiently low value, as only the part of the spectrum that is not reflected can
enter the inside of the object. If the reflection is set to 1.0, all light gets reflected regardless of the transmission value. If
set to 0.0, all light gets transmitted, but this gives an unnatural appearance. Values of 0.1–0.2 are a good starting point.
Also, if the reflection is coloured, the transmitted light will have the complementary color (e.g. if the reflection is set to
yellow, the transmitted light is blueish).
The transmission value works the same as in the previous releases, and is multiplied with the complement of the reflection
spectrum. This should be set to a high value.
Medium node parameters
Absorption is controlled with the absorption texture, which defines how fast light is absorbed
while passing through a medium. A setting of 0.0 means no absorption. The higher the value the faster light is absorbed by
the medium. This setting is wavelength-dependent, in the following setup for example it is set to absorb blue light faster
than other colors, giving the object a yellow appearance.
Textures are restricted to values between 0.0 and 1.0, but the absorption value can have a wider range of values. To allow
setting these values the absorption texture is multiplied with the scale parameter.
Subsurface scattering is controlled by the scatter texture (multiplied by the scale value),
and the phase function. The scattering texture defines how fast light gets scattered when traveling
through the medium, in a similar way to how absorption is defined. A very high value means light gets scattered very fast, a
value of 0.0 means no scattering.
The phase function controls in what direction light gets scattered. There is currently one kind of phase function defined,
with one parameter, scattering_direction. If set to 0.0, it means light gets scattered the same amount in any direction. A
setting larger than 0.0 means forward scattering, the larger the value, the more light is scattered in a similar direction as
it was traveling. 1.0 means it doesn't change direction. A negative value means backscattering, so more light is scattered
back to where it came from. This makes objects appear brighter on the side where the light is coming from.
The following setup uses a wavelength dependent scattering. Blue light is scattered more, so it has more tendency to scatter
back out of the material before it gets absorbed. Yellow-red light is scattered less, so more of it goes straight through the material,
giving shadowed areas the yellow color.
Scattering can generate a lot of noise with small light sources and low roughness. You can increase the caustic_blur parameter
in the kernel settings.
For a fast approximation you can use a specular material with both scattering and fake_shadows enabled.
The unit for absorption and scattering is m^-1 (or 1/m). If you have a measured value in cm^-1 you can convert it to m^-1 by
multiplying it by 100. For example: suppose you want to enter 4.5 cm^-1. This equals 450 m^-1. You can enter this value by
setting the scale to 1000 and the absorption texture to 0.45.
Finally emission is defined by attaching an emission node to the emission input pin. When connecting an emission node to
a medium node, it defines emission inside the volume instead of at the surface of the object. The power parameter gets a
different meaning: it controls how fast the radiance along a ray increases while traveling through the volume, and not the
total power. It is not multiplied with the scale parameter.
This effect works best with large and not too bright objects, very small bright objects will create a lot of noise.
The following image shows a normal mesh emitter (left) and a volume emission (right). The emitter in the right side has specular
material with an index of refraction of 1.0 (making it invisible without the emission).
Last edited by roeland
on Mon Mar 11, 2013 5:20 am, edited 4 times in total.
Reason: Added explanation for the stepsize parameter.