1
$\begingroup$

I am kind of new to Blender and have been looking for this a few days now and can't seem to find out so I ended up here.

I have a base object on which I have scattered stars. For the coloring of the stars I have set up the following nodes to give it random coloring:

  • Object info (Random) --> Colorramp (I have set up my colors) --> Principled BSDF (Base Color) --> Material Output.

Now I want to add metallic colors and these have a different roughness than my normal colors. So I tried to add in a new ColorRamp node with my metallic colors and a new Principled BSDF with a lower roughness setting followed by a Mix Shader to add in both BSDFs.

But the outcome gives me random roughness on all colors. I only want the specific colors to look metallic...

$\endgroup$
3
  • $\begingroup$ Hello :). Instead of randomizing colors, you could randomly assign different Principled Shaders $\endgroup$ Mar 1, 2022 at 19:03
  • $\begingroup$ So you want to control the roughness like if random color is metallic then 0.1 else 0.5? What defines a color as metallic? And what do you use as Fac for the Mix Shader? $\endgroup$
    – Blunder
    Mar 1, 2022 at 20:32
  • $\begingroup$ Yes i would like to control the roughness and metallic settings for specific colors. Lets say red and blue needs to be metallic 0 and roughness 0.5, gold and silver needs to be metallic 1 and roughness 0.2. I did not put a node into the Fac for the Mix shader tho.. $\endgroup$
    – Ale97
    Mar 2, 2022 at 10:53

1 Answer 1

1
$\begingroup$

You need is a pair of data: the color and the info if it's a metal. When you use the Object Info's Random value and a ColorRamp to define the colors of the stars then you can use another ColorRamp with black and white values to define if the color is a metal or not.

With this info, you can decide which value is used for Roughness (or the value for any other slot). A MixRGB node works as a switch to define the Roughness value.

In the example, the yellow and the white colors become the metals gold and silver. Their corresponding color range in the second ColorRamp node is set to white while it's black for all other colors. Their roughness is set to 0.5 for non-metal colors and 0.02 for metal colors.

shader setup

$\endgroup$
1
  • $\begingroup$ This is what I had been looking for. Thanks a lot for your time I really appreciate it, now i'm gonna take some time to try and understand the set up. $\endgroup$
    – Ale97
    Mar 3, 2022 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .