Glass that becomes transparant when there's a light behind it

You know that property of glass where if there’s a light behind it, it appears transparent, but if there’s no light behind it it becomes reflective?

Is it possible to simulate that - either in Blender Internal or in Cycles? Without having to resort to keyframing the glass’s transparency?

Thanks in advance.

The glass shader in cycles is fairly accurate, as long as you don’t use too dark of a color.

You know that property of glass where if there’s a light behind it, it appears transparent, but if there’s no light behind it it becomes reflective?

sort of

a flat plain of glass ( say a 1/4 in thick ) is basically a 80% / 20% beam splitter
this is do to the the angle of incidence and refraction

http://titan.bloomfield.edu/facstaff/dnicolai/images/ImagesPhy106/Chapter%2022/CAIS6KCM.gif

it is transparent all the time and being SHINY ( polished) it is also REFLECTIVE at the same time

The built in glass shader is pretty much a refraction[1]/glossy[2]/fresnel[factor] into a mix node combo. It is pretty accurate, but if you need to exaggerate effects or have better control over it, you should just build your own using mentioned nodes. For common glass, reflectance at facing angle should be around 4% (about that for all dielectric materials), in case you want to control it differently.

If faking glass, using a transparency shader instead of a refraction one, you can’t use fresnel. Get some background info from this PBR in Cycles tutorial: https://www.youtube.com/watch?v=WU0bmUkkiyA (just replace Diffuse with Refraction/Transparency).