4

the problem

I want the robot arm to always be fully visible in front when rendered (and preferably while working in the viewport, too). So the tree should never overlap the robot in the final image, even if the robot is technically inside the tree.

How can I achieve this (in the easiest way possible)?

Suro
  • 41
  • 1
  • 2

1 Answers1

1

Create two scenes, one with the tree only and the other with the robot only. enter image description here

The robot scene should have a transparent background (Select Film Transparent in the Rendering Properties menu). enter image description here

In the Compositor mix the two scenes using the alpha of the robot scene as mix factor. enter image description here

mugnozzo
  • 1,237
  • 7
  • 21
  • 2
    I think using view layers in the one scene rather than two different scenes would be more convenient in this case : That way you can actually see and edit the interactions in real time if you create a third view layer with all objects enabled. Just my 2 cents – Gorgious Oct 06 '20 at 09:05
  • Yep... Actually you're right. But I haven't used layers in 2.8 and later yet, so I answered with something I was sure about. :-) – mugnozzo Oct 06 '20 at 09:13