Matte Objects and Shadows¶
In most cases, your particle systems do not stand alone. You will need to combine them with other plates or rendered elements. The following exercises will introduce you to Krakatoa features for handling matte objects, shadow-casting lights, and particle shadows on geometry.
Matte Objects¶
Occluding Particles In the View¶
- To demonstrate the use of Matte Objects, create a sphere with Radius 10 in your scene and position it such that it obscures your camera’s view of the particle system.

- In the bottom of the Krakatoa GUI, check the >Matte Objects checkbutton to enable the rendering of Matte Objects.
- To quickly scroll down to the Matte Objects rollout, simply right-click the same checkbutton - the Main Controls rollout will collapse and the Matte Objects rollout will expand!
- Select your new sphere object in the viewport and click the Create/Update Matte Selection Set button
- This will create a Named Selection Set named “KrakatoaMatteObjects” in your scene and will add it to the right list box. Krakatoa will use all geometry objects in the Named Selection Sets listed in the right list as matte objects occluding the particles behind them and, under certain conditions, blocking light and thus casting shadows onto the particles.
- Check >Iterative [Full] and click the RENDER FRAME button to render an image.
Observe that the particles behind the sphere are no longer visible.

Casting Shadows On Particles¶
- Select and move the Sphere to the right so that it occludes the light from the Spotlight, thus potentially casting shadows onto the particles.
- Select the Spotlight and in the Modify Panel, turn Shadows on.
- Make sure the Shadow type is set to Shadow Maps (Krakatoa uses the Shadow Map Size value to define the size of its Attenuation maps, if no such parameter is found, a default size of 512 will be used).
- Press RENDER FRAME again.
Observe that the sphere is now casting a shadow into the particles. In the Rendered Frame Window, toggle between RGB and Alpha channels to see where particles are obscured by your matte object versus where they are simply in the shadow of the matte object.
![]()
Note on shadow quality:
Several factors will affect the quality of your shadows. If you begin to see moire patterns, you may need some combination of increasing the shadow map size, increasing the number of particles, and decreasing the particle density.
Intersecting Particles and Matte Objects¶
In the first example of occlusion above, rendering the Matte Object would not make much sense unless it was casting shadows on the particles - since all particles were behind the Matte Object, one could have just composited the rendering of the Matte Object from another renderer on top of the particles. But Matte Objects are especially useful when the particles interact directly with them - some particles are in front of the Matte Object, while others are behind, like in the following example:
- Assign a Standard material to the Sphere, set diffuse color to red and self-illumination to 10.0.
- Change the Radius of the Sphere to 20 and move it in the middle of the particle cloud:

Since shadows are also on in the Spotlight, the Sphere now both occludes particles and cast shadows on those behind it:

- Save this image to disk including the Alpha channel.
- Switch to Scanline Renderer - use the Switch Back From Krakatoa To Previous Renderer icon provided by the Krakatoa MacroScript. This will save the current Krakatoa settings as an RPS render preset which can be restored easily later.

- Save this image to disk too.
- Open Renderer > Video Post or use a 3rd party compositor like Combustion, Fusion, Nuke, After Effects etc.
- Load both saved images and composite the particle rendering on top of the scanline rendering:


Opacity-Mapped Matte Objects¶
Krakatoa v1.5.0 intruduced the ability to respect Opacity Maps of the Matte Objects when occluding particles and/or casting shadows.
- Open Material Editor
- In the default Standard Material of the Sphere, assign a Checker map to the Opacity Map slot.
- Set the U Tiling to 4 and V Tiling to 2.


- Compositing the Krakatoa and Scanline Rendering produces the following image:

You will probably notice that the edges of the Sphere are rather jagged. This is caused by the Krakatoa Matte Alpha which does not contain Anti-Aliasing info to smooth the edges - a particle that is partially occluded by the sphere is considered either completely visible or completely invisible because the pixel of the Matte image is either fully white or fully black.
We can increase the sampling of the Matte Objects in Krakatoa to fix this.
- Go to the Matte Objects rollout in the Krakatoa GUI and increase the Sub-Divisions spinner from 1 to 3.
- Render the Krakatoa pass once again
- Run the Video Post once again to produce the following result:
