Hide environment through glass

Hi,

I have tried looking for an answer on this but haven’t managed to see anything yet. I am rendering a scene with a window and through the window the environment HDR is visible. However I need to make it invisible and preserve the reflections on the glass from the inside of the room. None of the usual stuff works like enabling transparency as I assume the glass is rendering this with refractions etc. Any ideas how I can do this and preserve the glass reflections? Thanks

David

World > Ray Visibility. Uncheck “transmission”. Note that you get a black environment this way, not alpha or anything. That may or may not be what you wanted.

Imgur
I’m not sure if this is exactly what you need, but when I made this I was going for the following:

  • A window object with a glass panel.
  • Glass reflects the inside as per normal glass (fresnel based).
  • Glass acts as an invisible light portal for the outside sky (not sun).
  • Control over outside environments visibility through the glass, although I happen to use normal sky (not HDR), it’s still a “background” so I believe it should still work.
  • Ability for an additional sun object to work properly.

It could be further cleaned up I guess, as I see I have some mix nodes without both shader inputs used, meaning the factor could possibly have been handled earlier in the chain (to avoid unnecessary use of shaders).

If it doesn’t work, maybe it’ll help you think out your own solution. Toggling transmission didn’t really do what I was looking for.