Use image texture brightness to control glossy amount

hi fellow blender-renderers :slight_smile:

I have this highpoly, photoscanned model of a grilled hamburger with only a plain image texture.
The meat looks most delicious / realistic with a good amount of gloss that represents the hot grease. but the dark, almost black grill marks (where the meat got a little burned) don’t look realistic with gloss.

I’m pretty sure that I can remove the gloss from darker areas with the right material nodes setup but I don’t know how. Can someone hint me towards a node setup that would take the color output of the image texture node and tweak the data in a way that it can be plugged into the pricipled BSDF’s glossy input socket - so that it will apply higher glossy amount to lighter areas on the texture and less to the darker areas? I imagine a color ramp node within that node chain to tweak the threshold of glossy / non-glossy. It can be done, right?

or is there another way? I don’t want to select the dark areas by hand and apply a second material to them - too cumbersome and probably worse looking result.

Thanks for any hints! I imagine that for most more advanced blenderers this is pretty much child’s play but for me it’s somewhat advanced.

kind regards,
oyster

Something like this should work:


Notes:
In the roughness input black is shiny and white is rough.
I put the black in the colour ramp at the right and white at the left because you have to invert for the roughness input.
You can tweak the roughness values by changing the black and white colours in the colour ramp to greyish ones.
I also used the covert rgb to black and white node for the roughness input.

1 Like

@DNorman thanks for your awesome answer.

It makes total sense when I see it but I wouldn’t have been able to come up with it myself.
I’m surprised it takes so few nodes to do it :smiley:

thanks once more!