I would like to achieve this in the Shader node editor :

What I try to do

I go with a wave texture and a color ramp nodes. In the color ramp node, I can adjust the POS of the gradient but this change the thickness of the bars for all the axis and not like a gradient.

What are your thought how would you solve this ?

Thank you very much,

  • $\begingroup$ Is the picture what you obtain now or it is what you want to obtain? $\endgroup$
    – lemon
    Feb 7 at 7:20
  • $\begingroup$ It is what I want to obtain @lemon $\endgroup$
    – FlogFR
    Feb 7 at 7:57
  • 1
    $\begingroup$ A useful search term for you might be: 'half-tone' $\endgroup$
    – Robin Betts
    Feb 7 at 8:17

2 Answers 2


That can be this way:

enter image description here

Use the wave at some scale.

Shift the gradient input coordinates so that it start a bit later and scale it so that shift + scale = 1 (when X is 1).

Compare the two.

Wave goes regularly from 0 to 1.

Gradient go regularly from the shift to 1.

The more gradient growth, more often wave is less than gradient.

  • $\begingroup$ Ah damn it, all my work is useless now :D The only difference is I did it without a Wave Texture, just the X coordinates. $\endgroup$ Feb 7 at 8:18
  • 1
    $\begingroup$ Ah ah!! @GordonBrinkmann, we need no texture for this case, in fact. $\endgroup$
    – lemon
    Feb 7 at 8:22

@lemon already gave a good solution, here is just an alternative method which I only give additionally to not feel having done the setup and screenshots for nothing :)

What you can do is use the Generated texture coordinates with a Separate XYZ node to get a 0 to 1 gradient. This value multiplied by for example 50 and plugged in a Math node set to Fraction will separate this in 50 repeating gradients from 0 to 1.

Then you can compare the values with, let's say 0.5 and to get an increasing wider range where the result is true, the Epsilon value needs to increase from left to right, this can be done with using the X coordinate multiplied by a value smaller than 1.

This is the basic setup and its result:

basic setup

The factor with which you multiply the X coordinate will determine the width of the white lines and how much it increases from left to right. In the basic setup I multiplied with 0.3, below you see the result for 0.1:

x multiplied with 0.1

But in both cases it starts very thin on the left side. To change that, you can put an Add node inbetween to increase the base thickness. Here you see the result with adding 0.3 before the multiplication:

adding 0.3 to the base

You can also add 0.3 after the multiplication and get quite different results. But another thing you can do to change the overall appearance and results is instead of comparing to 0.5 maybe choose a different value. In the image below it's 0:

comparing to a different value


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .