Krakatoa Shaders (Phase Functions)¶
Overview¶
- Krakatoa v1.5.0 introduced several Shaders that control the scattering of light as it passes through volumes of particles.
- Krakatoa v1.6.0 enhanced this user interface of the Shaders by moving their controls to a separate, dynamically generated rollout which could host arbitrary shader definitions in the future.
Phase Functions¶
- The following Phase Functions are currently available:
Isotropic¶
- This used to be the default mode with >Use Normals turned off in Krakatoa 1.1.x.
- Light is scattered uniformly independent of the particle, light and camera orientation in space.

Phong Surface¶
- This is the same as the >Use Normals mode in Krakatoa 1.1.x
- Scatters light dependent on the angle between the light source’s direction, the particle normal and the viewing direction according to the Phong specular model. Note that the Phong model describes surface behavior but in Krakatoa every particle, even deep under the surface, will be shaded using this surface shading method. When using low densities, the results might appear unrealistic, producing “shiny volumes”
- Provides global and optional per-particle SpecularPower (Glossiness) and SpecularLevel channels.
- The examples below compare Isotropic to Phong Surface with Specular Power and Specular Level set to 1|100, 10|300 and 50|300:




- The examples below show Phong Surface with Specular Power and Specular Level controlled by Krakatoa Channel Modifiers (KCMs) using Cellular Maps. The >Allocate SpecularPower and SpecularLevel Channel options were checked and the channels were provided by one or two KCMs:
- The first image uses a constant SpecularPower of 10 and the Cellular Map to control the SpecularLevel.
- The second image uses a constant SpecularLevel of 100 and the Cellular Map to control the SpecularPower.
- The third image uses the Cellular Map to control both SpecularPower and SpecularLevel.
- The fourth image also uses the Cellular Map to control both channels, but the one map has its Cell and Division colors swapped.




Henyey-Greenstein¶
- Scatters light dependent on the angle between the light and the viewing direction.
- Provides global and optional per-particle Phase Eccentricity channel.
- The examples below show the Henyey-Greenstein Phase Eccentricity value set to -0.75, -0.5, -0.25 and 0.0:




- The examples below show the Henyey-Greenstein Phase Eccentricity value set to 0.0, 0.25, 0.5 and 0.75:




Schlick¶
Scatters light dependent on the angle between the light and the viewing direction. Provides global and optional per-particle Phase Eccentricity channel. The examples below show the Schlick Phase Eccentricity value set to -0.75, -0.5, -0.25 and 0.0:




The examples below show the Schlick Phase Eccentricity value set to 0.0, 0.25, 0.5, 0.75:




Eccentricity Channel Per Particle¶
- When the Henyey-Greenstein or Schlick shader is selected and the >Per-particle [Eccentricity] Channel option is checked in the Shader rollout, the Eccentricity channel will become available in the particle stream of the renderer.
Eccentricity Channel Sources¶
- The initial value of the channel will be set to the Default Eccentricity value
- The value can be overwritten per particle using a Krakatoa Channels Modifier (KCM) on the modifier stack of a PRT Volume or PRT Loader object.
- The value will be overwritten per particle by a Krakatoa Channels Modifier (KCM) assigned to a Global Channels Override set in the Global Render Values rollout.
Example¶
- Every particle can provide its own Eccentricity channel value, allowing the varying Phase Eccentricity and thus varying light scattering within the same particle cloud.
- This becomes especially effective when the angle between the camera and the scene lights is changing.
- In the following example, the Camera is rotating around the model.
- The model has the Eccentricity mapped using a mixture of a Cellular and Noise Maps via a KCM Modifier:



