0
$\begingroup$

I want to create something like picture 1 (credits to the Artists of Stellaris Game)

Pic1

As you can see in picture 2 there is nothing to see because I want to take an image in front for the horizontal background scene.

Pic2

But if I take a look from inside of this object through the glass front, the HDRI is visible (picture 3) and curved because of the IOR. I use the standard Glass BSDF shader.

Pic3

In picture 4 you can see the nodes I use to hide the HDRI for render but not for lighting.

Pic4

Why is it visible through the glass?

$\endgroup$
2
  • 1
    $\begingroup$ It's visible through the glass because what's coming through is a Transmission Ray, not a Camera Ray. $\endgroup$ Dec 8, 2022 at 12:42
  • $\begingroup$ So how do I stop it? I don't want it to be visible through inside either. $\endgroup$
    – Saif
    Dec 8, 2022 at 12:49

1 Answer 1

1
$\begingroup$

The HDRI is visible through the glass because the world background is not reached directly through a Camera Ray, but a Transmission Ray. So usually you would use the Is Transmission Ray as a mix factor.

In your case when you don't want to see the HDRI neither from the inside of the object through the glass nor outside the object, you can combine those two ray informations. Simply take a Math node set to Maximum and plug in Is Camera Ray and Is Transmission Ray. Since both outputs are either 0 or 1 you will get a camera ray = 1 from the outside and transmission ray = 1 from the inside.

light paths combination

By the way, this will leave the HDRI still be visible in reflections and glossy surfaces. So if you don't want that either, you can add more Math nodes set to Maximum and plug in the other Is [...] Ray outputs as well. But if you cancel out everything there won't be much left that is using the light of the HDRI.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you, that actually worked :) $\endgroup$
    – Saif
    Dec 8, 2022 at 13:15

You must log in to answer this question.

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