5
$\begingroup$

I'm trying to make a repeating color ramp around the outside of a cylinder (i.e., ten separate instances of black-purple-green). Unfortunately, I lose the spectrum of color ramp colours when I use the modulo function to repeat (I only get black-purple). Is there another way of doing this to get the full color ramp to repeat using a radial gradient texture?

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Since no one has answered the actual question in the title, a node that takes its input modulo 0.1 will always output a result between 0 and 0.1, so you’ll always get only the first 10% of the color ramp. $\endgroup$
    – wchargin
    Jun 8 '20 at 0:47
9
$\begingroup$

Try this setup. The key is the MAP RANGE node.

MapRange

$\endgroup$
2
  • $\begingroup$ Huge thanks! Sending good vibes your way. I haven't come across this node before. $\endgroup$ Jun 7 '20 at 4:46
  • $\begingroup$ No problem. You can play with the two lower values to "push" the gradient around a bit, but it should be good as is. Happy travels. $\endgroup$ Jun 7 '20 at 4:48
8
$\begingroup$

If you know you're only ever going to need a 0-1 range in the segments, you can just use a multiplication .. but @Christopher's answer is more flexible.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ BTW, you can up-vote his answer as well as accepting it :) $\endgroup$ Jun 7 '20 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.