1
$\begingroup$

I want to render a scene with a Sky Texture in the background, while masking out an object A with another object B by using the Holdout option under Visibility > Mask in the properties of object B.
But in order to get the masking, I need to check Film > Transparent which disables the Sky Texture.

Is there a way to have both things working? Masking the object and having the Sky Texture?

$\endgroup$

1 Answer 1

1
$\begingroup$

Maybe there is a smarter solution, the only one I can think of is the following: create a new View Layer. In it you disable all collections so that there is nothing visible to render. Under View Layer Properties > Passes > Light > Other you enable Environment.

additional view layer

Let's say you now have one called ViewLayer with the render scene including the holdout object and ViewLayer_001 where all collections are disabled.

In the Compositor you need two Render Layers, one that is set to ViewLayer and the other is for the empty ViewLayer_001. After rendering you take an Alpha Over node and plug the Env output of ViewLayer_001 in the first input and the Image output of ViewLayer in the second input. This way you can combine the foreground with the background.

Unfortunately you have to use two layers. I thought I remembered it differently, like you could use the Env output direct with a single layer, but the background is black where the objects are so that doesn't work. Maybe someone has a better solution.

mixing view layers

$\endgroup$

You must log in to answer this question.

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