4
$\begingroup$

I am trying to create a material on a plane, where the entire plane would be of one color(green, lets say), with just a band of black stripes in between with variable/random length. Something like this (sorry for the poor drawing, hope it gets the idea across): enter image description here

In blender, I have been able to achieve something like this: enter image description here

The node setup is as follows: enter image description here

I cannot figure out how to randomize the wave's length. As I am using the gradient texture as the factor for the mix node, randomizing the gradient texture's border should do the trick (just my thought), but not able to figure out how. Please help...Thanks..

$\endgroup$

1 Answer 1

2
$\begingroup$

First calculate if you're on the X belonging to a stripe, and then use noise texture to calculate the stripe height. Floor is used to snap the X coordinate for the entire strip to just one value, so that a stripe has equal height along its entire width - you may want to mute the Floor node when adjusting your noise, to see the noise's effect better.

The noise produces a value in range $[0, +1]$, but it can be multiplied by a Max Height different than 1 to increase or decrease the range of possible heights. Alternatively you can use pass the noise through a color ramp to control the heights. Then this value is divided by 2, because the next step is to measure if y coordinate is either above or below that value from the middle. Finally use Multiply as a logical AND, to control if the pixel belongs to a strip or not.

Not sure if that's intended, but in your question the lines aren't straight - can be achieved with another noise, this time modifying the coordinates:

About using Math > Multiply and Math > Add as AND and OR:

How do I get 1 for a certain range of a value?

$\endgroup$

You must log in to answer this question.

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