Glass Specularity in Cycles

I have been trying to create a custom glass material, that has better specular highlights than the standard GlassBSDF shader. But, I just can’t seem to get decent highlights on glass. Below are two shader outputs:



The first is a glossy output, from a custom node tree. I have brightened the specular highlight, while dimming the room reflections.

In the second image, I have used an “Add” node to combine my glossy result, with the output of a “Refraction” node.

Note, in the second image, how the specular highlight has become dull. In the first image, it is pure white. But, in the second, it now has only about 70% brightness. It seems that nothing will produce a white highlight on glass. Any suggestions? Has anyone had any luck with highlights on glass?

You’re not going to get a perfectly bright highlight on glass if you rebuild that exact situation in real life, the reason being because glass isn’t perfectly reflective at angles facing the viewer (how bright the highlight would be really depends on how much reflection a surface has).

Though even in this case, you might want to use the mix shader node to mix a little bit of a glossy shader with the built-in glass shader node (to make it more reflective without destroying the transparency).

show nodes set up

try to add a second level of glossy may be

here is a test I did for some different set up for glossy


this is not for glass but still gives an idea what effect glossy can have

here is one for dark glasses

happy cl

Attachments


What I do is have glass, then use an add shader to add a shader mix node to that. Leave first socket empty on mix, second socket gets glossy. Use fresnel to control mix factor. Fresnel then determines how much glossy gets added vs. nothing (empty socket).

Highlight area/strength determined by both glossy rough and fresnel settings. Of course scene lighting has its role.

Hope that wasn’t too confusing. (Short of adding a pic.) But that’s how I do it.

I do custom glass by mixing glossy and refraction with a fresnel output going through a power node. Makes easy control for making glass having anti reflective coating or reflective coating. Ace is correct though, glass isn’t typically very reflective at facing angles, and any reflections of a light source will be dependent on the brightness of the lightsource itself.

My bias value + 0.5 -> fresnel power means normal glass at 0.5. Use absorption to control overall “glass color”, but you can have a little tint at facing angles for reflection if anti reflection coated.

Try your glass with an unclamped HDRI with a sun, I’m pretty sure the sun will be very much reflected even at facing angles, even with a lot of anti reflection coating.

First of all, I would like to thank everyone, for their help. Also, someone asked about the node tree. Well, here is the version I have now. This one includes the extra add node and glossy shader, that a couple folks suggested:


Folks may notice 3 glossy shaders. These are to control different types of reflections. The first, in the lower left, provides the fresnel reflections around the edges. It has a color setting of .8, .8, .8. The next glossy shader, at center, controls the intensity of facing reflections—color: .07. .07, .07. the last glossy shader, at top, enhances the specular highlight—color: .005, .005, .005. here is the result, with a much improved specular highlight:


It has been mentioned, that glass does not reflect very well. That is quite true, for ambient reflections. But, the specular highlights can be quite intense, like the sun reflecting off of a windshield.

For my next test, I hollowed-out the center of the sphere, to test the second-surface reflections. Here is my result:


The first-surface highlight seems good. However, all of the second-surface highlights still seem weak. Perhaps, there is some trick i could use, with the “Light Path” node? Any suggestions? (The two panels on the sides, are tests of window-glass material—a work still in progress)

That’s because the sun is a very intense light source (something which isn’t seen in your image). It looks like you have the power of the sun lamp set to 1 which is too low of a value for realistic daylight.

Actually, I’m using two sunlamps—both at the same position and angle. The primary lamp has a power of 1.8, which seems to be the maximum that I can use, without washing-out the diffuse colors. Normally, I would reduce the effect of world ambient light on the shadows, to give the illusion of a more intense sun. But, this was just a materials test.

The second lamp is far more powerful—a setting of 200! It is set to ignore diffuse surfaces, and only produce specular highlights. But, that second sunlamp does not appear to be reaching the interior surfaces.

In the old Blender Render, I could use the compositor to select the specular layer, and add brightness, bloom, and flare effects, to give that extra intensity. But, I can’t do that in cycles. Cycles really needs a specular shader!

There’s still some tricks in the compositor when using Cycles. You could use a converter math node set to “greater than” to single out any hot spots or highlights. Combine that with inputs going into a glare node.