5

I'm currently trying to create a wavy pattern with shader nodes, each with two opposing wavy lines running diagonally across a square area.

However, I want the curves to end up with a seamless pattern so that this can be applied to a larger mesh.

seamless diagonal wavy pattern with opposing waves

Nodes are not new to me, but I am just learning how to use shader nodes.

My first patchy attempt at least got me as far as creating a wavy line, which unfortunately isn't much yet:

What I have achieved so far - Result What I have achieved so far - Nodes

I honestly have no idea which direction to go further in here, however I was thinking of mirroring this pattern, then multiplying it, then rotating it $45°$.

opposing waves

I'm pretty sure that's probably the wrong way to go though.

Does anyone have any ideas or tips on how I can create such a pattern?

quellenform
  • 35,177
  • 10
  • 50
  • 133

1 Answers1

5

Maybe this?

enter image description here

I made the $45°$ rotation via the mapping node. The waves are generated by $\sin+\cos$.

quellenform
  • 35,177
  • 10
  • 50
  • 133
Chris
  • 59,454
  • 6
  • 30
  • 84
  • 1
    Wow, Chris, thank you, that helps tremendously! Once again I learned something from you! Now that I see it, it seems absolutely logical to solve it this way and I was obviously completely wrong with the Wave Texture. However, I'm still struggling to get it 100% seamless. I'm not quite sure what parameters this is based on yet, and I'm still experimenting with it. Any ideas on this? – quellenform May 27 '23 at 16:50
  • btw: Using a Greater Than node or setting Linear to Constant in the ColorRamp creates the contrast I was looking for. – quellenform May 27 '23 at 16:57
  • 2
    @quellenform "still struggling to get it 100% seamless" - if you just want to render a seamless pattern in Blender, the setup should suffice, because you're not (or you shouldn't be) creating a piece of a pattern and then tile the pattern, you're just passing the coordinates to sin/cos which are (seamlessly) periodic functions. However if you want to create a tile to e.g. create a seamless texture, you either need to derive dimensions from sin/cos or derive angle from tangens. Most combinations of angle, width and height just cannot be seamless. – Markus von Broady May 27 '23 at 17:24
  • @MarkusvonBroady "If you want to create a tile to e.g. create a seamless texture, you either need to derive dimensions from sin/cos or derive angle from tangens." ...thank you, this hint has been missing! – quellenform May 27 '23 at 19:09