Previous Topic (Feature List) Up (Contents) Next Topic (Motion Blur)

Particle Color Sources

Color Sources, Densities and Defaults

Krakatoa currently uses the 3ds Max shading system to calculate particle colors. Each particle has a color (RGB) and a density value (Alpha).

  • The default value for Color is [1.0,1.0,1.0] (white)
  • The default value for Density is 1.0 (no scaling)

The following Color Source rules apply:

  • Any particle source will render using the diffuse channel of its material (if available). This includes solid color and any maps providing color information to the channel.
  • When no material is assigned to the particle source and the object contains a valid Vertex Color channel, the vertex colors will be used. This includes Geometry objects and Particle Flows.
  • When neither a material nor a valid Vertex Color channel is detected, the wireframe color will be used. (in the case of Particle Flow, the display color is the wire color).
  • If a color source cannot be determined, the default white color [1.0,1.0,1.0] will be used.
  • If the particles are being loaded from disk, the settings in the Particle Loader will determine the particle color:
    • If the color was saved with the file and Saved Particle Colors is selected, the saved colors will be used. If no color was saved with the file, the particles will render white.
    • If the Loader's Wireframe Color is requested, the wireframe color of the loader will be used.
    • If the Loader's Material Color is requested, the material's diffuse color will be used. If no material is assigned, the wireframe color will be used.

The Density of a particle depends on the following values and factors:

  • Each particle starts with a Density of 1.0, or, if the particle is loaded from a file and the Load Particle Densities option is enabled in the Particle Loader, with the value stored in the file.
  • The Density is multiplied by the Volumetric Density calculated by Krakatoa based on the Density Per Particle values in the Final Pass Density group of controls in the Main Controls rollout. The value takes into account the particle quantity and attempts to preserve constant resulting density as the particle counts change. This means that you can test render a particle cloud with volumetric density and 1M particles and then render 50M particles with the same settings and get a much finer result but with the same density.
  • If the object the particle comes from has a visibility track, the Density value is additionally multiplied by the visibility, clamped between 0.0 and 1.0. Thus, a semi-visible object will result in 50% of the original Density. If the visibility track is set to 0 or less, the particles will not be loaded and processed at all.
  • If the >Scale Density using Material Opacity option is checked in the Main Controls rollout and the particle is coming from a source with a valid material, the opacity channel of the object is used to multiply the Density. Opacity of 100% keeps the Density unchanged, Opacity of 0% causes the Density to become 0.0. This includes the opacity value and eventual opacity maps assigned to the material.

Color Overrides

The Main Controls rollout provides some options to override the particle colors in the whole scene.

  • By default, the >Override Particle Colors option is turned off. All particles will use the above rules.
  • When the >Override Particle Colors option is checked, the following options become available:
    • Custom Particle Color - assigns the color specified by the Custom Particle Color swatch to all scene particles.
    • Material Editor Slot#1 - assigns the material found in the first slot of the Material Editor to all scene particles.
    • Ignore Materials - forces all objects to ignore any materials assigned to them and behave as if they had no materials, which by default means rendering with the wireframe color.
    • Blended Z Depth - stores the distance in world units from the particle to the camera image plane in the RGB channels.
    • Blended Camera Distance - stores the distance in world units from the particle to the camera's position in the RGB channel.
 Note: The last two modes will save floating point values to the rendered image (for example OpenEXR). 
 The pixels will appear white in the VFB but contain the actual distance in generic units.