Table of Contents

This page provides information on the Stochastic Flakes Material.



The VRayStochasticFlakesMtl material can be used to simulate car paints, snow and other glittery materials. It works by simulating at render time the aggregated effect of a large number of mirror-like flakes scattered over the surface of an object. The material is somewhat similar to the VRayFlakesMtl and VRayCarPaintMtl materials, but uses less memory and avoids the tiling issues for these materials.




Basic Parameters

Enable flakes – When enabled, the material simulates flakes scattered on the surface of the object. When disabled, the material simply renders the specified brdf type with the specified glossiness. For more details, please see the Enable Flakes example below.

Number of flakes – The number of flakes, expressed as the square root of the actual number of flakes in the unit texture square. For example, a value of 3000 generates 9,000,000 flakes in the unit texture square. The number of flakes value is restricted to 231 (a little over 2 billion), which means the highest useful value for Number of flakes is 46340. If you need more than 2 billion flakes, increase the Flake scale parameter. For more details, please see the Number of Flakes example below.

Hilight glossiness – Controls the distribution of the flakes. Values close to 1.0 make all flakes oriented along the surface, whereas lower values randomize the normals of the flakes. For more details, please see the Highlight Glossiness example below.

Hilight glossiness map – Allows the highlight glossiness to be controlled with a map.

Blur angle – Controls the "softening" of the flakes effect. Higher values produce softer results while smaller values make the flakes sharper. Usually, value between 0.5 and 8 are used.

Reflection filter – Specifies the reflection color of the flakes.

Reflection filter map – Allows the reflection color to be controlled with a map.

Mapping type – Specifies the way the flakes are scattered on the surface:

Explicit UVW channel – the flakes are mapped according to the specified mapping channel. The density of the flakes on the surface depends on the way the UVs follow the surface.
Triplanar from Object XYZ – the material uses a triplanar mapping to create the flakes. This mode is useful for objects that don't have suitable UV mapping.

Map channel – Specifies which map channel to use, when mapping type is set to Explicit UVW channel.

Flake scale – Allows to scale the texture space. For mapping type Explicit UVW channel scale 1.0 is recommended. For Triplanar from Object XYZ mapping, Number of flakes are distributed in each square unit in local object coordinates. In this case it is necessary to lower Flake scale (0.05, 0.01 or less) and increase Number of flakes, depending on the object size, especially if square artefacts are observed.

The Number of flakes and Flake scale parameters are inversely proportional. This means that if you double the value of Number of flake and divide the Flakes scale by 2, the resulting flake density will be the same, although the flake pattern itself might change.

BRDF type – Specifies the BRDF that is used to guide the distribution of the flakes:

Beckmann – Uses a Beckmann distribution for the flakes.
GGX – Uses GGX distribution for the flakes. The GGX distribution has a longer "tail" compared to Beckmann.

Seed – Sets the random seed for the flakes. Changing this produces different flake patterns.




Example: Enable Flakes


Enable flakes is disabled in the first image, and the continuous GGX distribution is rendered. In the second image, the Enable flakes option is enabled.








Example: Number of Flakes


Number of flakes = 2236 (5,000,000 flakes per unit texture square)

Number of flakes = 7070 (50,000,000 flakes)

Number of flakes = 22360 (500,000,000 flakes)

Example: Highlight Glossiness


Hilight glossiness is 0.6

Hilight glossiness is 0.8

Hilight glossiness is 0.95



Example: Blur Angle


Blur angle = 1.0

Blur angle = 3.0

Blur angle = 6.0


Colored Flakes Parameters

Colored flakes – Enables flakes to have color.

Off – No variance to the specified color for the flakes is applied.
Random hue – Enables randomized hue for the flakes.
Random from map – Enables randomized hue for the flakes based on a map. Note: Only the bottom line of pixels of the map is used.

Saturation – Determines the variance in color strength used for the flake colors when Random hue is enabled.

Lightness – Controls the brightness variation for the flake colors when Random hue is enabled.

Random color map – Sets colors from the specified map to the flakes in a random pattern. Only the u-axis of the map is sampled for colors (the bottom part of an image). Random color map is available to use only when Colored flakes is set to Random from map.

White average – Renders colored flakes without the darkening effect. Note that this is not physically correct.



Advanced Parameters

Blend minimum – Specifies the number of flakes per pixel below which the flakes are computed. When the number of flakes per pixel is above this value, the material gradually transitions into a smooth (non-discrete) BRDF.

Blend maximum – Specifies the number of flakes per pixel above which the material only computes the smooth (non-discrete) BRDF. If the number of flakes per pixel is below this value, the material gradually transitions into discrete flakes.