How do I repeat a ramp pattern on an object using the texture node?
-
Hi,
How do I map a ramp on an object with a repeated V in Redshift, so it will show the ramp more than once on the object and is it possible the animate it going ramp going up repeatedly? Thank you in advance.
-
Hi Hoi,
There are several ways to get there.
• The simplest is to right-mouse click (on the gradient) and choose Double Knots, fast and easy. But hard to adjust.
• The next one is to do it via UVs, perhaps not as simple as it might sound.
• The best way, in terms of adjustment, is to drive this with a linear ramp (knot set to linear interpolation), then do some math, such as multiply and modulo.
If you want to change the "Mode" (e.g., circular) you need to use the first Ramp, the Driver in this case, not the color one.
My best wishes
-
What an interesting way to adjust the ramp with math node, I'll make the ramp in Photoshop and animate it in the texture node using offset V. Always appreciate your insight and help!
-
You're very welcome, Hoi!
To animate, just use the Add Node and animate the value 0-1. In the F-Curve Editor Timeline, set the keyframes to linear, and perhaps the Function>Track After> Repeat After
Example (render it)
CV4_2025_drs_25_RSrr_02.c4dSince I write in a forum: If you need some background about this setup, please let me know.
Cheers
-
This is amazing, it would be great to get some technical and math background about the setup when you have some time. Thank you!
-
Hi Hoi,
Here is a simpler example (less nodes), just using the first Ramp, but it explains very well the idea:
https://www.youtube.com/watch?v=c5uhSkEiPRc
This will help to go faster through the text below.Think of the Gray value-based Ramp as numbers, All between zero and one.
When a certain "pixel" needs to be rendered (simplified said), the value from the Ramp will be requested; let's say it is 0.3 Somewhere in the middle, dependent on the interpolation.
This value would then go into the second Ramp and use the Color that the gradient has at position 0.5
Now we have used a multiplication after the first RRamp, so the example would be 0.5 times 20 (the number in the multiplication node, which can be set to anything you like) = 10
The second Ramp would receive now 10, and that is outside of the gradient from 0-1.
The next Node is now the critical one, ModuloModulo. Which is just a divider (like 10 divided by 4 equals 2.5), but it doesn't care about the numbers left from the period (2); it cares only about the value on the right side (.5)
This is a value that the second Ramp can use for the gradient.When we take the first gradient, it has a lot of values between 0-1, but that results only in one gradient from black to white. One time.
Multiplying this by 20 means it provides values between 0 and 20 as a list of increasing numbers.Which the Modulo, we use the ModuloModulo to divide it and get only the right side each time, which creates many short grades between the 0-20 value, but never exceeds the 2.5
I used the divided by 4 to make a point, as dividing by one might be received as "abstract". But let's use the 20 divided by 1 and explore this.
We need the second Ramp/Gradient to a maximum value of 1.0, so we divide this by one and always receive the remainder, never exceeding 1.0
This means we get 20 black-to-white gradients, and that is each time translated into the color gradient of the second one.
Now I, the new Node, was an Add node (plus), which moved just the values up, and while animated, the whole gradient in this Node expression moved.
I hope that helps a little bit, let me know if I missed a point, or where it stopped for you to create clarity.
Cheers
-
wow, thanks for the great explanation and video reference! this definitely is a better method than jumping between apps to modify the ramp
-
Thank you for the feedback, Hoi.
Doing it in the node editor is nicer than moving in and out of the app.
I'm sure after you have this as a muscle memory, you will expand this.
I'm glad it was useful.
Enjoy