# How to illuminate the darkness inside glass objects in Cycles?

My model has a clear plastic (or glass) dome with objects inside. The objects appear dark. I've tried the glass shader with color 100% RGB, with very small IOR, and using just a refraction shader.

I know Cycles has problems with caustics, but I just want broad illumination to fall clean through the glass. The light-to-column path can ignore refraction, but is blocked or tremendously attenuated. The camera-column path needs refraction, and seems to work fine anyway.

This demo image offers all optical paths of interest:

• light upon object, seen directly
• light upon object, seen through glass (looks okay)
• light through glass onto object, seen directly. This is the shadow on the lit side of the column just below the glass tubing. I expect full illumination, but there is shadow. There is some light, but it's diffuse light from the floor.
• light through glass onto object, seen through glass. This

I did at one point try non-progressive rendering, and find extremely coarse light where there shouldn't be shadow, but this is not a practical way to make nice images. I've even tried cranking up certain sampling settings to many thousands, but still get bad noise though less, at the cost of long render times. I would like to finish my creations sometime before "Star Trek, the Generation After the Next" becomes real life, if you know what I mean. The next image is an example. I think Transmission in Sampling was 5000, but not sure.

I'm using Cycles in Blender 2.67 on a quad core Linux machine, 16GB RAM. Machine limits have never been a problem for 3D rendering.

Possibly, I screwed up some setting when I made my startup file, and just need to fix it. OTOH maybe this is just a limitation of path tracing, or of the way Cycles does it. If that's the case, what to real-world Blender artists do when they need to produce images on a budget and schedule? What is the practical real-world fix?

This may be caused by Cycles's rendering of caustics.

Glass and Transparent Shadows With caustics disabled, glass will miss shadows, and with filter glossy they might be too soft. We can make a glass shader that will use a Glass BSDF when viewed directly, and a Transparent BSDF when viewed indirectly. The Transparent BSDF can be used for transparent shadows to find light sources straight through surfaces, and will give properly-colored shadows, but without the caustics. The Light Path node is used to determine when to use which of the two shaders.

To clarify the node setup a bit:

• The Light Path node determines the type of the current ray being traced. For each socket, it outputs a 0 if it is not that type or a 1 if it is. Thus, getting the maximum of those two values is equivalent to a boolean inclusive-or operation. The Maximum node will therefore output a 1 if the ray Is Shadow Ray or if it Is Reflection Ray; this will cause the transparent BSDF to be used (as it is the bottom input of the Mix Shader). Otherwise, it will output a 0, and the top shader (the glass shader) will be used.

The following diagram demonstrates some of the various ray types:

• The node setup used is part of a node group called "TrickyGlass," which you can see at the top. A node group is a reusable chunk of nodes that can be parameterized just like any other nodes – in this case, with the three inputs on the left – and output, in this case, a shader. Thus, you can use this setup in a node tree like any other shader node.

Here's an image using just a regular glass shader:

And after switching to the TrickyGlass node group:

• Usually it's nice to mix in some Fresnel into the transparent color, so it's less transparent on edges of objects which is a cheap way to fake caustics: youtube.com/watch?v=ALlP3GSrmK4 urchn.org/post/fake-caustics-in-cycles – Greg Zaal Aug 26 '13 at 6:26
• Also, is there a reason you use the Shadow and Reflection rays rather than the Camera and Glossy rays? I'm not saying it's wrong at all, I'm just curious if there's a difference. – Greg Zaal Aug 26 '13 at 6:27
• Reflection includes glossy and diffuse. We don't want camera. – wchargin Aug 26 '13 at 17:33
• Your answer was very helpful to me rendering an eyeball. It has a surface over the whole eye which was shadowing the iris and darkening it. Its a good technique because in real life there is no space between the surface and the eyeball but it tends to be modelled that way. – beiller Jul 26 '14 at 23:04
• How do I change the appearence of my nodegroups to the appearence you show there? – Teck-freak Jan 10 '17 at 18:08

Another aspect to consider is the environment in which the glass is in. A perfectly black sky (as seen in your screenshots) is not very good for the glass to reflect/refract with. If you want realistic looking light interaction, consider adding mesh light emitters to mimic real light sources.

Consider setting up a studio-like lightbox, or use an HDR image to act as the sky.

Increase the bounces in your render settings light paths.

Basically each face is a bounce, the outside edge of the glass, the inside edge(if it has thickness), the pole, the ground. The bounces tell cycles when to stop following the ray.

• I've cranked up bounces to 20. No difference. – DarenW Aug 25 '13 at 16:12
• @DarenW I struggled with this too for hours. it wasn't the bounces. I found that when the glass was solidified with the solidify modifier, it had "fill rim" checked. This changed the problem instantly for me. – chase Nov 18 '15 at 4:16

Your glass is dark, or the space behind is dark due to your render settings.

You need to make sure caustics is turned on or the glass will be dark and will not transmit light regardless of your transmission passes.

I struggled with glass and water for some time as well, and unless you have caustics enabled it will never come out right or behave correctly regardless of what shader mix you use.

I didn't get any luck with the listed answers. Changing the transmissions settings in light paths fixed it for me.

Transmission: 8

It's simple. Set Roughness value of Glass shader to 0.03, and Color Management to Log, and select a look. Be sure that glass is two-sided. I'm serious.

• Well, cegaton's technique is helpful too, because if you use only mine, image is desaturated. Use both. – Денис Колесников Jul 6 '17 at 13:06