Factor for mixing Glossy and Diffuse in Cycles

Today, I observed a painted metal cupboard.
The material was reflective all around, but it reflected the brightest parts of it’s environment most, like the sun, windows, off-white wall, metallic objects, etc.
It showed it’s diffuse color (approximately #3d4669) in the rest of the places like wooden bench nearby, table etc which were relatively lower on brightness value.

So I want a factor to control glossy influence and limit it to the brightest areas. The rest of the areas should show diffuse.

I tried achieving this is Cycles but I failed.
Can somebody please help me how to achieve this with nodes?
Assigning a low factor like 0.2 for the factor in the mix shader between Diffuse and Glossy significantly lowers the brightness of the brightest parts.

I can explain in more detail and share blend files and screenshots if you ask me.
Your replies are much appreciated. :eyebrowlift:

Try increasing the Clamp value in the render settings tab. That should reduce over exposure in certain areas.

hard to tell w/o any picture. Usually such problem can be solved using post production tone mapping, with some bloom (fog glow compositor node?), any other physically incorrect like Clamp will make your scene less natural.

Sometimes when you combine multiple shaders. you run into the problem with Energy conservation…so sometimes clamping
can override overexposed effects.

Watching energy conservation should only be something done when you are using the add shader node for any section of the material, it’s useful for compensating for the energy loss that may occur when using many different component types, but this is something that shouldn’t be needed for a simple diffuse/glossy mix.

Ace Dragon, is what I said currently possible in Cycles?
If not, I would really like this implemented. I believe this is how materials react in the real world.
They reflect only when the source is bright enough. Or else they show their diffuse color.

The mix factor should be based on something like, “if the value of the reflected color is greater than [controlled by a ramp or curve] then glossy should be mixed.”

Is there anyway I can take my query directly to Brecht or the other Cycles developers?

Thanks again for all the replies, Blender Artists :eyebrowlift:

I don’t think that’s actually how light works in the real world. Glossiness isn’t turned on or off based on the brightness of the light hitting the surface. But it’s very hard to tell exactly what you’re looking for without an example. Can you show a picture of what you’re talking about in real life, and share what you’ve tried in Blender? Here, I’ll start:


That is the result I get from this material setup:


What are you looking for that’s different from this, and what was wrong with whatever you’ve already tried?

I made a quick explanation of my query.


The reason you see the gloss more in the highlights is because the bright reflection completely overpowers anything else. Essentially, you’re underestimating the difference in energy between the brightest and darkest regions of the reflections. Second, the correct mix factor for diffuse/glossy is the fresnel node. That’s the main reason that node exists in the first place. (Technically, it’s correct in EVERY single case, but for unpainted metals it’s sometimes convenient to skip it entirely.) That’s not to say that a different mix factor, like layer-weight facing, an arbitrary curve, a constant value, etc, might not look good. It might look fantastic. But strictly speaking, it’s wrong.

EVERYTHING has fresnel. EVERYTHING. The effect is wrapped up in why specular reflection happens in the first place. Some slightly technical reading: http://en.wikipedia.org/wiki/Specular_reflection

Example renders, however, are vastly superior to dense wikipedia articles:

Wrong, constant mix factor


Right, fresnel mix


You can see your expected result in the fresnel sphere, the highlight shows in an apparent absence of nearby reflections. When you compare it to the constant-mix one though, you can see it is still very much dimmed. It appears to still show because it is the only reflection still bright enough to overpower the diffuse reflection.

In short, reflected energy % isn’t dependent on incoming energy. It’s an optical illusion that the fresnel effect bears a lot of responsibility for. The fresnel node has the mix factor you’re looking for.

You’re right, J the Ninja. Fresnel exists in all materials. But that’s not what I’m saying. As i showed you with my demo image, lowering the factor lowers the brightness equally of all objects reflected. This is not right. At lower factor values, the sky and light sources should still be reflected a lot on the cube while the ground and other dull objects’ reflections on the cube will be
negligible to absent.
This is what i propose. A threshold factor. The range of color values seen in the glossy reflections can be controlled.
All these will finally respect the fresnel IOR as seen in the mix factor.
I am positive this will help us create even more realistic material surfaces. This definitely follows the rules of energy conservation.
We can consider that a material’s diffuse color is its default. It tries to be diffuse everywhere. Only when a strong enough glossy ray hits it, will it reflect. So reflection rays coming off dull surfaces will not reflect as much as the light sources.


I’m having a funny sense of deja vu with this thread.