0
$\begingroup$

The sand inside the glass and the sand outside are the same material, but the ones inside are darker.

Light Paths settings are all turned up

Max Bounces total : 802

glossy : 478

Transparency : 441

Transmission : 353

I made sure the base color of the glass is completely white.

I tried lowering the alpha value, but the glass reflection starts to become fuzzy and I get a problem where I'm able to see the inner edge of the glass because I made the glass solid.

enter image description here enter image description here

$\endgroup$
5
  • $\begingroup$ First of all, your Transmission bounces setting at 115 is useless, when the Total is 12. This way your Transmission bounces are limited to 12 as well (only Transparency bounces are independent from the Total bounces). Next question, why do you make the glass solid? This way the refraction looks incorrect and it doesn't help with the brightness inside either. $\endgroup$ Aug 31, 2022 at 20:08
  • 1
    $\begingroup$ All glass has some thickness to it, that's why I made it solid. $\endgroup$
    – Mike
    Aug 31, 2022 at 20:42
  • $\begingroup$ Most people use "solid" to say it's glass through and through, you mean you used a Solidify modifier to create some inner walls? That's okay, the refraction didn't look like it somehow. Some people don't use a Solidify modifier, which doesn't work on glass materials as if the walls were infinitely thin, but as if it was a solid block of glass. $\endgroup$ Aug 31, 2022 at 21:18
  • $\begingroup$ I solved it by unchecking shadows under ray visibility in the glasses objects menu. It appears that the inner darkness was caused by the glass casting a shadow onto the objects inside of it. Although now the glass doesn't cast shadow. Is this the right way to do it? $\endgroup$
    – Mike
    Aug 31, 2022 at 22:27
  • $\begingroup$ Well, I tried to give an answer to show the different possibilities. The problem is always the shadow. I've made some material which works a bit like unchecking shadows in ray visibility, this gives good results for the inside of the glass, but it has the same problem with the glass no longer throwing shadows. I'm trying to find a better material for quite a while now, but until now nothing was flawless. $\endgroup$ Aug 31, 2022 at 22:44

3 Answers 3

3
$\begingroup$

//EDIT: I improved my glass material a little more, you'll find it at the end. Be aware that this is no overall solution, depending on the objects and scene other material setups will work better - this one is a glass material for things like hourglasses, snow globes, ships in a bottle etc. where other objects are inside a glass container. Different glass objects like e.g. windows in an interior scene may look better using the refined glass material mixed by Is Shadow Ray.

To get more light on objects inside a glass object, one way would be to disable the Clamping > Indirect Light in the Light Paths settings. I think the default value is 10, if you set it to 0 the clamping will be disabled. This will make the inside a little brighter, however this may cause more noise and fireflies at low sample rates.

Another problem is, that even if you have a bright sunlight which produces sharp shadows outside of glass objects, inside the shadows will be diffuse and soft. To change this, you have to tweak the glass material by mixing it with a Transparency BSDF and the Is Shadow Ray output of the Light Path node. This way the inside will get very bright. To reduce the brightness to a normal level, you can plug the Is Shadow Ray and Diffuse Depth output into a Math node set to Maximum. This is in my opinion the best compromise for a glass material (note that it doesn't matter if you use the Glass BSDF or the Principled BSDF with Transmission = 1). However, this will result in the glass having no shadow.

What I don't recommend is increasing the Max Bounces. Yes, there are differences in brightness between bounce values from 0 to 10 maybe, but higher values will make much difference in this case and only increase render times.

To see that and compare with other methods I mention above, I made an overview of the different settings I tried:

glass comparison

I tried a lot of Math nodes on the Light Path outputs and it seems it's easier than I thought: it's bright enough inside the glass, shadows are sharp and the glass still throws a shadow - the Ray Depth output is working quite well, just not the default output value, but plugged into a Math node set to Greater Than with 2 as Threshold. Only the refraction seems to be a bit different. Well, nobody is perfect...

new glass material

$\endgroup$
3
  • $\begingroup$ I will look into those options, thanks! I was hoping for an easier solution, but it looks like this is not straight forward problem to solve. $\endgroup$
    – Mike
    Aug 31, 2022 at 22:46
  • $\begingroup$ @Mike I finally got glass throwing shadows on the outside and edited this material in at the end. Can't see the shadows there because I disabled the exterior in the render, but it works. Still not perfect though... $\endgroup$ Aug 31, 2022 at 23:13
  • $\begingroup$ @Mike It was just a few days ago that someone had a problem with glass, and often before... I'm in on this topic for quite a while and keep working on it, I'm still searching for the swiss army knife of glass materials. $\endgroup$ Sep 1, 2022 at 6:56
2
$\begingroup$

If you want 100~ transparent or transmission bounces you must set Max Bounces to a high number as well, but that isn't your main problem.

After bouncing into a glass object, when the ray strikes a backface that hit is registered as Glossy. You need to increase Glossy bounces as well.

Without enough bounces, the ray is reported back as lost which gives a black color for that sample, darkening the overall result.

$\endgroup$
1
  • 1
    $\begingroup$ The number of Total bounces only limits the Transmission (and Diffuse, Glossy and Volume) bounces. Transparency is independent from them. Increasing the Glossy bounces helps with black edges in the glass itself, it doesn't make things brighter much inside of glass objects. $\endgroup$ Sep 1, 2022 at 4:01
1
$\begingroup$

I solved it by unchecking shadows under ray visibility in the glasses objects menu. It appears that the inner darkness was caused by the glass casting a shadow onto the objects inside of it.

$\endgroup$
1
  • $\begingroup$ Hello and welcome. This site is not a regular forum, the answer section is reserved exclusively for answering the OP question. To ask for clarification, post comments or replies please use the comments section instead. If you have the same problem or a different question please use the Ask Question button at the top right. If you want to add additional information or further developments, use the edit button below the original post instead. $\endgroup$ Sep 1, 2022 at 12:56

You must log in to answer this question.

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