Redshift3D Quick Tip: repeating a ramp

Posted by Petru Carvaci on Mar 25th, 2021

Repeating a Ramp in Redshift is quite easy with the use of a few math nodes. Instead of duplicating knots forever, you can use a scalable setup with great control.
First you need to map the surface over which your chosen ramp will be copied, we would use a simple black to white ramp. (You could use here UV coordinates, but more on this some other time).

copy ramp redshift3d


Then you need to specify how many times you want your custom ramp to be copied (here it is 10 times). After that, using the Modulo math node makes the magic happen. Math Mod returns the remainder of the division, in our case [0…10] divided by 1, so we get 10 ranges of [0…1). Finally this gets into the Input slot of our custom Ramp (set to Alt input). The result is that each of those 10 ranges of [0..1) is mapped to our custom ramp.