# Voronoi Cracks Fac?

I am familliar with Blenders Cycle's Voronoi Texture and have fiddled with it for a while. I am trying to get a result that is not like Intensity or Cells, but more like cracks. I tried the node setup from Image 1, but it came to Image 2 (not good!). I would prefer something like in image 3. So basically what I am asking is:

Is it possible to create the result from Image 3 purely with nodes in Blender.

Image 1:

Image 2:

Image 3:

• I would also like to know an answer to this, as I've tried to recreate that effect myself before. As far as I know there is no way to do this with materials without resorting to image textures. Would a geometry based mesh solution work for you? I can show you how to achieve a similar effect using nodes but it is not very flexible and you won't be able to control the "thickness of the strokes" Commented May 10, 2016 at 3:33
• Thank you for replying! I was, after a bit more searching, actually able to find an answer via Blender Artists. I am answering the question myself now. Commented May 10, 2016 at 11:04

Let's use a Laplacian kernel filter for this:

The Laplacian is a 2-D isotropic measure of the 2nd spatial derivative of an image. The Laplacian of an image highlights regions of rapid intensity change and is therefore often used for edge detection.

Here we go:

What is inside the group:

How this works:

• Image convolution is a filter operation where you sample the source image with a Convolution Matrix (Kernel) to get the output. Different values inside the matrix yield different filter results:

You can see some other kernel examples here.

• In green frame we get 9 mapping vectors. This determines the kernel size.

• In blue frame we sample 9 different values from 9 different places.

• In pink frame we apply the convolution matrix to the samples.

• In white frame we get the value of output pixel.

Here is a .blend so you don't have to build that:

This could be further improved to work on all 3 axes (so you can have volumetric edges) or with enhancing this to canny edge detection.

Limitation is the kernel size - the bigger the less accurate result and also the bigger the lines. A Dilation should be used to drive the edge thickness, I can add that if you need. Also with procedural blurring and thresholding you could add those little round corners, I can add that in also.

• A bit complicated, but very nice. Commented May 10, 2016 at 16:35
• @ShadyPuck it only looks complicated but is pretty straight forward. If Cycles had more node options it could look very clean but this way there must be a lot of duplication :( Commented May 10, 2016 at 17:39
• Love it! Could you please add some explanation as to the actual math going on there though? I don't know that I have the patience to mentally untangle that spiderweb of node wires. Commented May 10, 2016 at 17:50
• @ShadyPuck no didn't invent it, this is used in image recognition and filtering. I just implemented it in Cycles. Commented May 11, 2016 at 12:28
• @PGmath Yep added more info and organized the nodes picture with some framing. Commented May 11, 2016 at 12:29

Funny what Google can turn up. After a bit more searching, I was able to find an answer on Blender Artists.

This node setup will work, and you adjust the size of the cracks by increasing the rotation values in the bottom mapping node. The text that the guy posted on BA was this, if it helps anyone:

You can try something like this ... Use two identical Voronoi textures with cells Then rotate one with repect to the other, where the variation in angle determines the size of the cracks Mix these to find the difference Saturate the result to a simple black/white or factor value Use this as a mix factor or whatever It does not give a nice blurred edge, but you could add something for blurriness too Not perfect but reasonable Hope this helps Martin This is with a 0.1 deg rotation of XYZ`

• Yeah nice one. It's not perfect, it's hard to control the crack thickness, and they they are not very even, especially for larger width, but it works relatively well. Thanks for sharing Commented May 10, 2016 at 13:38
• @DuarteFarrajotaRamos Agreed, but you're welcome. Commented May 10, 2016 at 13:39
• for sheer simplicity and speed this is a great solution Commented Feb 10, 2022 at 17:43

# Node Setup

These are basically the sum of the absolutes values of the partial derivatives of the voronoi function (more accurately the finite difference approximation of them).

2D texture version:

Better suited for 3D:

Matrial setup:

Rendered result:

There is some similarity to the rotational version, but that would produce non-uniform crack thickness (zero at the origin of the texture coordinates and infinitely increasing by the distance of the origin).

You could also achieve these by using only one additional voronoi, but that would result lower quality (actually, the more additional voronoi vectors you use, the better will be the quality, but that depend on how well the coordinates are shifted for each of them).

The laplacian kernel method also shares some similarity, but (du to more calculation of the voronoi funcion) has higher quality (at the cost of performance).

This is simpler and faster, and quality is acceptable if not zoomed in too much. If you want to get uniform crack strength, add a grater than node before the output of the node group.

• Well done! I really like how the cracks are different sizes. It doesn't quite work for me now, but it might well in the future. Thanks! Commented May 10, 2016 at 20:25
• Could you tell me why it does not work? Maybe I could help. Commented May 10, 2016 at 20:48
• It does work, it's just not quite what I wanted. Sambler did something similar to yours. I was looking for a more uniform set of cracks, like in my or Jerryno's answers. However, as I said above, I might yet find use for it in the future. Commented May 10, 2016 at 20:55
• Actually, the variation is less crack size and more strength of the white (see my edited versions last sentence). Well, I guess I was just too late. :) Commented May 10, 2016 at 21:11

Based on the cracks with worn edges material by CGMasters, using the portion of the material that makes the cracks leads to the following node group.

The idea is to move multiple voronoi textures by a certain amount and mix them together. By using SeparateXYZ/CombineXYZ nodes we can add and subtract the same amount on each axis with only one input.

• Great! Only reason I'm accepting Jerryno's is because this is a little bit too random. Still fantastic tho. Commented May 10, 2016 at 20:53

At Blender 2.8 the Voronoi includes additional features - including a 'Crackle' mode which effectively provides the 'distance' from the edges of cells rather than from the center. This can produce the following result :

Cell Fracture

Margins have control and achieve constant width goal.

• Cell Fracture results in one plane then extruded
• Boolean difference with a Cube, yellow
• Triangulate, blue
• Detail in large

Result of Cell Fracture after steps below. Click image to see larger version.

Simple Cube in Layer 01 with the Cell Fracture Add On showing settings. Above image.

Particle System Modifier used on Cube.

• Cube scaled rather flat
• Particle System attached to Cube. Settings above.
• Cell Fracture add on used with settings above. Note Margin settings. Adjust to suit your needs. Add on installed in user preferences. See Cell Fracture tutorials if needed.
• Switch to next Layer 02 to see Cell Fracture Results CFR. CFR multiple objects joined Control-J.
• Edit Mode. Vertex Mode. Select Vertices on Bottom Side. Delete Vertices. Face Mode. Select Top Face. Select Similar by Normals. Vertex Mode. Selection Inverse. Delete Vertices.
• Only top flat faces remain.
• Render Image. Use image in Compositor or as Texture.
• This isn't answering the question at all. The question was how to create the described texture using blender nodes only. Commented May 10, 2016 at 9:38
• Thanks for replying, but this isn't the question I asked. Commented May 10, 2016 at 11:09
• With a small edit marking this as an alternate backup solutions to the nodes (with steps on how to add it as an image texture, I think this answer would be alright, Commented May 10, 2016 at 18:18