Seamless periodic Voronoi texture - from nodes!

voronoi

This recent post by @CarlG in the Cycles Development Updates thread about tileable Voronoi textures got me thinking about how it might be possible to make such a thing today, instead of waiting for some future update. OSL is the obvious choice for making complex procedural textures, so of course I opted to do it entirely with shader nodes.

And somehow it works! Periodic 2D Euclidean Voronoi (F1, F2, smooth F1, and distance to edge) with separate periods for the X and Y directions, all jammed into one nightmarishly complicated node group. If you dare peek inside, please note that little to no attempt has been made to organize the nodes in a comprehensible way. There’s only so much I can do with a tangle like that anyway.

The sample file shows how to make it properly seamless by wrapping it around a cylinder such that there’s a whole number of Voronoi cells around the circumference (or, you could just use UV mapping instead). Have fun!

periodic voronoi.blend (2.1 MB)

10 Likes