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.
UI Path: ||Material Editor window|| > Material/Map Browser > Materials > V-Ray > VRayStochasticFlakesMtl
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.
num 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 is restricted to 231 (a little over 2 billion), which means the highest useful value for num 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 will make all flakes oriented along the surface, whereas lower values will randomize the normals of the flakes. For more details, please see the Highlight Glossiness example below.
mtl hilight glossiness – 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.
subdivs – Controls the number of samples to use when calculating reflections. Note that this parameter is available for changing only when Use local subdivs is enabled in the Global DMC Settings.
reflection filter – Specifies the reflection color of the flakes.
reflection 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 will use 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, num flakes 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 num flakes, depending on the object size, especially if square artefacts are observed.
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 off; the continuous GGX distribution is rendered
enable flakes is on
Example: Number of Flakes
num flakes = 2236 (5,000,000 flakes per unit texture square)
num flakes = 7070 (50,000,000 flakes)
num 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 is 1.0
blur angle is 3.0
blur angle is 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 will be 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. – Uses the specified color (or a map if linked to this node in Schematic) when Random from Map is enabled.
white average – Renders colored flakes without the darkening effect. Note that this is not physically correct.
blend min – 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 max – Specifies the number of flakes per pixel above which the material will only compute the smooth (non-discrete) BRDF. If the number of flakes per pixel is below this value, the material gradually transitions into discrete flakes.
- The VRayStochasticFlakesMtl material is based on our paper: vray_stochastic_flakes.pdf