0
$\begingroup$

I have a gas lamp that shines through the glass from the inside. In one environment it works perfectly and enough light comes through the glass (normal glass BSDF). But now I have inserted the identical gas lamp into a different environment and there almost no light comes through the glass. The render settings are identical and, as I said, it is the same lamp (I haven't changed anything). So it must be due to some general attitude. Could someone tell me what to look out for in general? I just can't figure out why it just doesn't work in one environment. Thanks!

Edit: It seems to have something to do with the scaling. If I scale the glass to 0.2, it works. In the original .blend file however, the lamp is normally scaled to 1.0 and it works there too. But if I append this lamp to another .blend file, I always have to scale it to 0.2 first in order for it to work. At environment 2, I happened to have scaled it to it, which is why it worked.

Environment 1 enter image description here Environment 2 enter image description here Shader enter image description here

$\endgroup$
16
  • 1
    $\begingroup$ You said render settings are identical... everything like Light Paths > Max Bounces / Clamping / Caustics etc.? In which way are the environments different? $\endgroup$ Commented Aug 3, 2021 at 12:29
  • 3
    $\begingroup$ If the lamp is really lighting your scene its generally a good Idea to use a light path node and mix the glass with a transparent shader (light goes through the glass via transparent shader thus no light is "lost", from the outside you still get refraction and reflection from the glass. Could you add some screenshots and/or the blendfile? its hard to tackle your specific problem otherwise $\endgroup$
    – bstnhnsl
    Commented Aug 3, 2021 at 12:29
  • 1
    $\begingroup$ @bstnhnsl Maybe you should explain more about the light path mixing as a beginner might not be aware of how this works... $\endgroup$ Commented Aug 3, 2021 at 12:31
  • $\begingroup$ Yes, working on a proper answer. Just wanted to see if he's quick with the upload of his file so I can see if this actually answeres his question $\endgroup$
    – bstnhnsl
    Commented Aug 3, 2021 at 12:35
  • 1
    $\begingroup$ @bstnhnsl I'm interested in this proper answer as well... usually I either get the refraction/reflection correct or I get enough light through. Both I don't get to work satisfactorily. $\endgroup$ Commented Aug 3, 2021 at 13:06

1 Answer 1

6
$\begingroup$

General Answer to let more Light through Glass

Cycles isnt really great at calculating light paths through glass. But you can help it find your light sources with relatively simple node setups.

Use the Is Shadow Ray output of a Light Path Node to control the factor of a Mix Shader Node. We just mix the Principled Shader with a Transparent Shader (make sure, the transpareent shader is set to pure white, older versions of Blender have a light gray as default).

Note, that my glass has a thickness.

enter image description here

The glass Sphere on the left is only the principled shader, the one on the right has the node setup shown.

What is happing here?

Cycles shoots rays from the camera into the scene at random angles. The rays bounce until they hit a light source (or the max # of bounces is reached). Cycles keeps track of the bounces and which type of bounce occured. The basic bounce types are camera ray (from the camera to the first bounce), reflection ray (after a reflective bounce), transmission ray (ray goes through a transmissive object) and shadow ray.

With our node setup we basically tell Cycles "if the current ray type is a shadow ray, dont try to render the glass, use a transparent shader instead" making cycles ignore the glass and the light can pass thourhg the object (almost) without further calculation resulting in more and noise free light.

There are other types of this fake glass, depending on what your requirements for the glass are.

If you dont need refraction (most common use case is an indoor scene in architectural rendering only lit by the outside sun/sky light) you usually use something called "architectural glass", which doesnt use a glass shader at all and mixes different light paths.

$\endgroup$
8
  • $\begingroup$ Yes, Is Shadow Ray is the one that works best for me, too... still not perfect maybe, but quite usable. $\endgroup$ Commented Aug 3, 2021 at 13:22
  • $\begingroup$ Not perfect, but it always depends on what you can get away with in your render when using cycles and glass $\endgroup$
    – bstnhnsl
    Commented Aug 3, 2021 at 13:24
  • $\begingroup$ @bstnhnsl Thank you very much for your answer. But as said, it works with the lamp without any problems in the first environment. Actually, in my opinion, it can only be due to some rendering settings that are different. 🤔 $\endgroup$ Commented Aug 3, 2021 at 15:32
  • 1
    $\begingroup$ @Tim Maybe you could add screenshots of all those render settings as well? At the moment I really have no idea what it is. And maybe lamp settings, scales and dimensions of the glass and the lamps? $\endgroup$ Commented Aug 4, 2021 at 8:09
  • $\begingroup$ @Tim Hm, thats what I thought. But yeah, unless we can have a look at the actual files its just random guesswork on our end. Not really helpful for anybody $\endgroup$
    – bstnhnsl
    Commented Aug 4, 2021 at 12:33

You must log in to answer this question.

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