RSS< Twitter< etc

Rendering A PRT Volume As Voxels In Krakatoa MY

Last Edited 2013/02/16 @ 6:00 pm PST. 


The following tutorial continues the exploration of the basic rendering workflows in Krakatoa MY, this time rendering the PRT Volume particles in Voxel mode.

The Scene

In this example, we will use the same setup with a Buddha statue scan as the source volume for a PRT Volume object as in the previous tutorial.

Krakatoa Voxel Rendering

Switching Krakatoa MY To Voxel Mode

Krakatoa provides two volumetric rendering methods - Particle rendering (also known as Point rendering), and Voxel rendering. In the former mode, each particle is drawn as a more or less pixel-sized point in the image buffer. We explored some of that in the previous tutorial.

In Voxel mode, the particles are registered on a voxel grid which is then rendered into the image buffer.

Both methods have their Pros and Cons. 

  • The Particle mode is generally faster and very useful for rendering wispy smoke, dust, sand, silt and other particulate matter. The main drawback is that when flying through a point cloud, the individual particles become visible and do not change their size as they approach the camera (unless DOF is used). Also, Particle mode requires a large amount of particles to produce smooth or solid-looking results.
  • The Voxel mode typically requires less particles to represent large volumes - as long as at least one particle is found in every voxel, the volume will look continuous. It is very useful when rendering effects like billowing smoke, vapor, clouds and so on and allows the camera to fly through such clouds without negative side effects. The main drawback is that it is usually slower to render (requires one drawing pass for each light) and cannot represent minute detail below the size of the voxel. 

To switch Krakatoa MY to Voxel Mode 

  1. Open the Render Settings window and expand the Rendering Controls panel in the Krakatoa Settings tab.
  2. Switch the Rendering Method from Particles to Voxels.
  3. Set the Voxel Size to 1.0 and the Voxel Filter Radius to 1.
  4. Make sure the Use Surface Shell option in unchecked in the PRT Volume.
  5. Set the Number Of Subdivisions to 2, make sure Enable Random Jitter is checked, Well Distributed Jitter and Jitter Multiple Per Region should be unchecked.
  6. Render the frame. 

We rendered 9.5 million particles for the above image, but this is really not necessary. Our voxel size in the PRT Volume is 1.0, but the resulting Region size after two sub-divisions is 0.25. This is 4 times smaller than the renderer's Voxel Size of 1.0.  

  1. Change the Number Of Subdivisions to 1 - this will produce regions with a size of 0.5x0.5x0.5.
  2. Uncheck the Enable Random Jitter option.
  3. Re-render a frame.

This saved us 9 seconds, and the results are very similar. It shows that when rendering as Voxels, higher particle counts are often not necessary as long as there is enough data to populate all voxels.

Let's see what happens when there is exactly one particle per rendered voxel.

  1. Uncheck the Use Multiple Subdivisions Per Region checkbox.
  2. Re-render the frame.

As you can see, this is probably good enough for a quick preview and is actually faster than rendering in Particle mode. Only 353,482 particles were generated and rendered in 1.95s, but the quality is not high enough and some moire effects are visible due to the grid structure of the voxel data.

Increasing The Voxel Filter Radius Values 

We can counteract these visual artefacts by using a higher Filtering radius. This will make the result blurrier, but if the goal is to render a smooth, cloud-like volume, this side effect might even be desirable. 

  1. Increase the Voxel Filter Radius value in the Rendering Controls panel of the Krakatoa Settings tab in the Render Settings window from 1 to 2.
  2. Re-render the frame.
  3. Increase the Voxel Filter Radius value to 3 
  4. Re-render the frame. 

 As you can see, increasing the Filter Radius smooths out the edges at some significant performance cost.

Increasing The Voxel Size Value

Another way to produce smoother, cloud-like results is to increase the renderer's Voxel Size. 

  1. Change the Voxel Size from 1.0 to 2.0.
  2. Set the Voxel Filter Radius to 1 
  3. Re-render the frame. 

You will surely notice the aliasing around the edges because we have very large voxels containing up to 8 paricles each, unsmoothed with their neighbors.

Increasing the Voxel Filter Radius will help improve the quality.

  1. Change the Voxel Filter Radius from 1 to 2.
  2. Re-render the frame

We can increase the Voxel Size to produce an even smoother look.

  1. Change the Voxel Size value from 2.0 to 3.0
  2. Re-render the frame.

And this is the result with Voxel Filter Radius set to 3:


Next Tutorial:

Rendering Maya Particles