# How do I randomise a glossy node's roughness within a specific range?

I have a glossy node with the roughness set to 0.05. I am using this material on many objects, and want to randomize the roughness by a small bit on each model (to be specific, between 0.02 and 0.05). I know that the way to randomize is to add an Object Info node, but what should I put between the Object Info node and the Glossy node to put the values 0.02 and 0.05 and plug into the roughness? An alternative to gandalf3's answer, you can use a Color Ramp: And then set the RGB values to the appropriate number for each handle: Note that if you instead choose to set the Value in HSV mode (instead of RGB), you'll need to add a Gamma node just after with gamma=0.4545 (due to color space conversions; RGB mode is in sRGB color space, and HSV mode is linear)

All that is needed is a bit of math: With an input of 1: 1 * .03 = .03, .03 + .02 = .05
With an input of 0: 0 * .03 = 0, 0 + .02 = .02

• a color ramp could do this too. – Bithur Feb 23 '15 at 12:34