0
$\begingroup$

I created a starry sky with a noise texture and used an HDRI for lighting. If I activate transparency in film, I also hide the my noise texture. How do I hide only the HDRI texture?

$\endgroup$
3
  • 1
    $\begingroup$ So do you want the noise texture to show in the background and keep the hdri hidden but still use it for lighting? $\endgroup$ Commented Jul 21, 2023 at 21:42
  • $\begingroup$ Yes, exactly that! $\endgroup$
    – TORM3NTO
    Commented Jul 21, 2023 at 22:04
  • $\begingroup$ I have provided an answer, but this is a pretty old trick known by many people and available if you search for it. Please do your best before to search before asking a question here. $\endgroup$ Commented Jul 21, 2023 at 22:13

1 Answer 1

1
$\begingroup$

Use the mix shader node with a light path node to get this effect. The is camera ray of the light path node tells you whether the ray hitting the surface is the last one to reach the camera. If yes then it outputs 1 and if no then 0. Using this as a factor in the mix node, where you are mixing the 2 background shaders, you can basically tell the render engine that, when I look at the environment I want to see the second shader. But if I am seeing this ray bounce off something(ie. not looking at the env) I want to the first shader.

Here I have demonstrated it using a metallic cube. enter image description here

$\endgroup$

You must log in to answer this question.

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