# How can I make a procedural wavy brick pattern texture?

How can I make a procedural texture to recreate this kind of bricks with wavy edges.

You can get rather close by using a Magic Texture with Depth 0 to perturb the coordinate space, and then feed that to a Brick Texture.

Right now I'm lost on how to achieve uniformity on the edges. Perhaps if I sound the alarm someone like @Robin Betts will save us.

🌬️🐚

Big thanks to Robin, here's the file if you want to mess around with it. At some point I may try to implement it in this answer.

• @AllenSimpson great :) just cosmetics ... Location -3/-1/0 match a bit better reference shape ... also would be better to be able manipulate thickness of mortar after vector deformation ... is it possible with material nodes to math edges between colors and dilate like in compositor? ... imgur.com/yl60pnu Nov 4, 2021 at 18:35
• @Alan Simpson Late lurker, here ... away, today. Flattered by the ref, but there is no simple SDF: 'distance from sine'. There is at least some iteration to approximate a minimum.. for example: shadertoy.com/view/3lSyDG ... not impossible to hard-wire that into a tree... or you could fake it with semicircles? Nov 4, 2021 at 22:18
• @RobinBetts Ah, maybe if I had looked at any code in the past few years. :) All I can do with this right now is scroll and nod my head in agreement that this is some math. LOL Nov 4, 2021 at 22:21
• If I get time tomorrow, I'll give it a shot. It would a generally useful one to solve.. I'm afraid failure might be an option :D Nov 4, 2021 at 22:25
• @AllenSimpson Well.. er.. yes. It can be done. I gave up on the linked method, too inaccurate, and wound up using Inigo Quilez' bisection method, which produces a pretty even stroke in 'just' 8 iterations. A bit heavy for this answer, i think. Nov 5, 2021 at 20:24

Some Allen Simpson modification with Wave textures ...

... quite sensitive setup easily to destroy :(