Rounded Corners on Voronoi Shader

I’m trying to create a procedural texture for an irregular stone wall with uniform rounded corners. The voronoi is a good start, but I can’t figure out any math that would round the corners while keeping the edges straight.

I’m trying to get from this:


FromThisNodes

To this:


[yellow is the mockup in Illustrator, not coded in Blender]

But not this:


ButNotThisNodes

Hopefully someone has an idea. The only idea I have left is to somehow use the sharp-cornered voronoi to create geometry before beveling. That would be great for closeups and maybe the adaptive subdivision would keep renders reasonable wide shots where this is used a lot.

I can imagine a script, but that would need either a list of points for the corners or a list of the center points. I’m not ready for geometry nodes or Sverchok yet, but I can imagine there would be a solution there somewhere.

Thanks everyone.

Do you need the edges to be perfectly straight?

Otherwise your approach in the second image seems to give good results when playing with the smoothness value of the smooth F1 node:

1 Like

This could be soooo easy with a pre generating texture generation app (no i will not say the name of this non-open-source-anual-to-pay-app): for example your ref to 512x512:


and something done in 2min with MaterialMaker :

and the node setupis soooo easy…

But alas we want to use blender:

and the setup is…:

thanks for the recommendations. Keeping everything in the shader editor, i think the smoothness value is the closest I can get. It still leaves big gaps than I’d prefer at acute corners, but that isn’t very frequent. Won’t be noticeable at a distance, in the foreground I can try to hide it behind something