Marble Grit

I have realized a nodegroup to simulate marble grit.It’s a mixture of many small pieces of marble and white cement.
The node is based on the voronoi texture (cells) and a base texture.
This is a short description of the inputs/outputs:

VORONOI SCALE: the input scale of the internal voronoi node.In the nodegroup,some simple cracks are created,using the Shift Vector input.These cracks separate the marble pieces.

SHIFT VECTOR: used to shift the voronoi texture,creating simple cracks.

VORONOI GREY POSITION 1/2/3/4/5 :these are values in range 0…1 ,used to define six areas with different grey shades. Each area will have its own shader.

TEXTURE COORDINATE VECTOR: the chosen texture coordinate vector to plug in mapping and texture nodes.

BASE TEXTURE: This texture is used to modify and round the shape of the marble pieces (voronoi internal node).
You’ll have marble pieces (voronoi internal node) only where base texture is not black,after the changes made with black/white position for base texture.
Inserting 1 as input,you’ll have only the marble pieces with cracks,with 0,only black.

BLACK/WHITE POSITION FOR BASE TEXTURE: these are the two points used in the rampnode.I’ve made a version of a simple black and white rampnode with fac/pos1/pos2 inputs.
With these inputs you can modify the extention of the base texture.

EXTRA TEXTURE: there are empty spaces where base texture is zero or in crack areas.
Here you can insert new marble pieces with an extra texure,chosen by you.

BLACK/WHITE POSITION FOR EXTRA TEXTURE: same as black /white position for base texture,but referred to extra texture.

EXTRA TEXTURE GREY POSITION 1/2/3/4/5: : same as black /white position for voronoi texture,but referred to extra texture.Every area will be added to corresponding voronoi area.That is first area for extra texture will be added to first area for internal voronoi texture and so on.

SHADER 1/2/3/4/5/6 : marble shaders for the six areas.You can plug up to six different shaders,or decide to plug the same shader everywhere.

BACKGROUND SHADER: the shader used for the unused area,after internal voronoi texture,base texture and extra texture.

There 3 examples of marble grit material.

  • marblegrit1 with base and extra texture
  • marblegrit2 with only internal voronoi
  • marblegrit3 same as marblegrit1 but with variable scale for internal voronoi texture and extra texture with very small pieces.
    You can insert your own marble shaders.I’ve used my version of marble shader with a more general nodegroup for minerals.
    The outputs are:
    SHADER: the marblegrit shader.
    SHADER AREA: a black and white map of the marble pieces. 0 means background,1 means marble piece.
    Example:

The node is:


The blend file is :

Attachments

Marblegrit.zip (614 KB)