Salt Shaker - Can't see salt through glass.

I’m working on making a salt shaker and, for some reason, the glass isn’t letting me see the salt and I’m not sure what’s going on with it. I played around with the nodes for the glass, and nothing seems to work. I’ve included pics of the salt shaker with/without the glass as well as the node setup for the glass.

Properties Editor > Render > Light Paths > Refractive Caustics (check) / + be sure to have enough bounces


or hack the shader (let all light pass through) :wink:

Also - the glass shader doesn’t work too well for scenes like this - for some reason it darkens objects within it.

You can use the lightpath node trick to avoid this issue - you mix a glass with a transparent and use the lightpath node “is shadow ray” input to mix the two. Essentially it makes the glass look like glass to the camera - but it acts as a transparent material to anything that is shadowed by the glass (i.e. the salt)

You can see the effect this has in my scene above. The right hand object is regular glass shader - the left hand uses the light path trick. As you can see the red sphere inside the glass is lighter in the left hand object.