Skip to main content

Voronoi Shader

Pro Feature

Pro features are only available with a Professional licence. To upgrade, visit cavalry.scenegroup.co.

Intro

A Voronoi diagram is a type of tessellation pattern that can be found in nature, such as in cells or a giraffe's coat, and is often used in architecture, art and computer science.

It is generated by scattering a number of points on a plane and subdividing it into cells enclosing a portion of the plane closest to each point.

UI

Common Attributes +

Offset - Offset the position of the pattern.

Scale - Increase/decrease the size of the pattern.

Rotation - Change the angle of the pattern.

Time - This attribute is automatically connected to the Composition's frame number which will evolve the pattern in playback. Remove this connection if a static voronoi pattern is required or replace it with a Frame Behaviour to increase/decrease the speed of the voronoi's evolution.

Loop Length - Set the duration in frames that it takes for the Distortion Amount to loop. A smaller value will increase the speed of the voronoi's evolution (and vice versa).

Distortion Amount - The voronoi pattern is initially generated from a uniform grid of points. This attribute can be used to move the points in random directions to create a less uniform pattern.

Seed - Change the direction of the Distortion Amount to create a different pattern.

Style - Define the appearance of the cells:

  • Flat - Fill the cells with the Cell Color.
  • Greyscale - Fill each cell with a random greyscale (black to white) color. Note that the range is clamped so that the darkest cell is never 100% black. Black can then be used for the Edge Color so that edges can be isolated when using a Gradient Map Filter to recolor the cells. See tip below.
  • Euclidean - Fill the cells with a radial gradient centred on each grid point.
  • Manhattan - Fill the cells with a 4 sided shape gradient centred on each grid point.
Gradient Map

To set a different color for each cell, set the Style to Greyscale and then add a Gradient Map Filter to the Shape. This can be used to remap the Voronoi's greyscale (dark to light) values to colors. The darkest cell is prevented from being fully black by design and so, if the Edge Color is set to black (#000000), the area from position 0 - 0.02 (far left) along the Gradient Map Filter's gradient can be used to isolate and affect the color of the Voronoi's edges.

Equidistant Edges - When the Style is set to Euclidean, this will draw the gradient along a line perpendicular to the edges to create a 'pyramid' look.

Greyscale Seed - Randomly change the greyscale colors set by the Greyscale style.

Cell Color - Set a color to fill the cells when the Style is set to Flat.

Type - Select how the pattern is generated:

  • Normal - Create a pattern which can also generate gaps along the edges between the cells.
  • Hierarchical - Create a pattern with the option to further sub-divide the cells into smaller cells. When Style is set to Flat, the color for the cells at each Level can be set in the Hierarchical Colors tab.

Edge Width - When Style is set to Normal, increase/decrease the width of the gap between edges.

Edge Feather - When Style is set to Normal, increase/decrease the softness of the edges. This attribute has a soft minimum of 0 but it is possible to set a negative value by entering one manually.

Roundness - When Style is set to Normal, increase/decrease the fillet where each edge connects to create a softer, more rounded look.

Edge Color - When Style is set to Normal, set the color of the gaps between edges.

Levels - When Style is set to Hierarchical, set the number of times cells can be subdivided. For example, a value of 2 will subdivide some of the cells once and then subdivide some of those cells again. The top/first level is 0.

Levels Amount - When Style is set to Hierarchical, recursively increase/decrease the chance of the cells being subdivided.