Object info/Random -> Noise (42.5, 0, 42.5) -> Color Ramp with the colors you want. The 42.5 (the fractional part) values will ensure color output, where you may want to use only one channel to drive the ramp. Leave noise detail at 0, not needed. I tend to also use some additional contrast to ensure the min/max values are actually reached.
Thanks for sharing that node setup. It works great for my need!
This is quite advanced for me and since I’m new to Blender I still don’t understand the logic behind the setup. I’ve read the Blender documentation about the object info node and understand how it is being applied here however are there any links you can share that can help a beginner like me to understand, for example, why 42.5 ensures color output. I had a quick read about color management on the Blender documentation and understood the issue about different color spaces. However your comment about color output still isn’t clear to me. I played around with the node setup and saw that if the 42.5 value is reduced the number of variations of colors is also reduced. Is this what you mean by ensuring the color output? I used a viewer node to analyze the output of the noise node. At low values (around 0.01 to 0.1) each of the objects has a color that is similar to the one next to it. At values above 1 there is already a lot of variation. Could you explain in more detail or share any links that could help me understand what’s going on when this scale value of the noise node is altered? The Blender documentation says that the scale slider changes the overall scale of the texture but I don’t understand how increasing the scale of it makes each instance a different color.
I think I understand why you chose to drive the color ramp with a single channel. It gives the color ramp node a black & white input with more contrast right? Could you also explain or point out some documentation about how the single channel from the Separate RGB node is the tool of choice for this setup? Could I use some other node to get only black and white values? I tried the other channels and noticed that the color variations changed a little. The red channel seems to be the best since it seems to have the most contrast and variation between each object. I’m assuming this is just by chance. Or will the red channel always have more variation from a noise input?
42.5, just an old habit, doesn’t mean anything special When feeding a single channel into noise vector (like grey scale output from Object Info/Random), you need to increase distortion to get different colours out of the noise node. If left at zero, all three channels will be equal regardless of the noise scale value. But too low scale, and colour will only drift slightly as you observed. Those two values don’t change rendertime much (if any), whereas Detail will and have no impact for this so I leave it at 0.
Use Colour output if you want to have three different random values to play with. I used green as a means to drive the roughness value as an example, but could be anything. Like Hue Saturation Value with separate controls without using the colour ramp. I’m not really a fan of the colour ramp as it’s contents can’t be exposed to a user interface like values and colours can.
Use Fac output if you only need a single random value, although in case of Object Info/Random, the noise node would not be required - just plug the Object Info/Random straight into the colour ramp.
The contrast node is just to get more of the highs and lows rather than center distribution around 0.5. I’m not sure what you would need to do to get a perfect evenly distribution, but it’s good enough for my random desires