How do I repeat a gradient color ramp?

I have a gradient on a cube with a color ramp. In the picture below you can see the color ramp is repeated just once. I would like to find a way how to repeat it 5 or 10 times. I could do this on the color ramp it self of course, but I prefer to it with a node setup.

After repeating the gradient, it should look something like this, a multiple loop of a color ramp.

• You could take the modulo of the vector's components and then combine them back Mar 9, 2015 at 22:36
• do you mean that no added node is necessary ? Mar 9, 2015 at 22:48
• Separate the Generated vector input into x, y and z, then take the modulo of the x, by using a math node, the combined the x, y and z into a vector, which you can use to map the texture. Mar 9, 2015 at 22:57
• could you add a picture , so i can see what you mean ? thanks Mar 9, 2015 at 22:58
• Not now, sorry - it's pretty late already Mar 9, 2015 at 22:59

You can use a Color Ramp node and a Modulo converter node to achieve this result.

Set up your nodes like this:

And this is the result:

What you are doing is you are making the Color Ramp node tell what color, and then you are mapping it using the Mapping node, and repeating it with the Modulo node. This makes it fully editable, you can change the color ramp, and the resulting texture will repeat endlessly.

• i wanted to try this solution , i clicked shift A , and searched for a modulo node, but that is not in any list . where do i find it ? Mar 10, 2015 at 6:26
• It's a generic math node. 'Convertor->Math'. Click 'Add' to see a list of operations the node implements. Mar 10, 2015 at 8:40
• Sorry, yes, the Math node can be changed to many different operations, but you have to add the plain default one first.
– VRM
Mar 10, 2015 at 11:09