1
$\begingroup$

a few days ago I started to learn Blender. I only have experience with Affinity Designer and Illustrator Layers and Masks and stuff like that. I have this little scene:

enter image description here enter image description here

Link to the file: Blender File

What I want is for the red frame object to also be a sort of cut mask for the green object. So, in the rendering view, I want to see only the parts of the green object that show through inside the opening of the red frame. I hope I have described it in an understandable way.

What is the name of the technique or tool in Blender to do this?

Sorry if this question has been asked before.

$\endgroup$

2 Answers 2

0
$\begingroup$

It is possible, but might be hard for a blender beginner.

So i found a solution with geometry nodes and a "helper" object.

So you need to create a helper object which is just a copy of your red object, but you have to extend its edges to "infinity" ...or just make it big enough.

So mine looked like this:

enter image description here

then parent your red object to that new object, so whenever you move your red object, the helper object will be moved with it.

If you now turn on "viewport display" -> wire, you can see through that helper object and you can see what happens.

enter image description here

enter image description here

Now add an empty as "next" helper object which represents our point of view.

You could e.g. parent that to your camera so you will always have your effect whenever you look through your camera.

Now add to your green object a geometry modifier with these nodes:

enter image description here

What does this do?

It "shoots" rays from the empty to your green object. And whenever it hits something else (e.g. the helper object), the geometry of the green object (just a vertex) will be deleted. It is important that you give the green object lots of subdivisions. The more, the better the result.

Result:

enter image description here

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Thank you for that. I have tried to reproduce it. But the green object is always hidden now. See Frame_v1.blend $\endgroup$ Commented Mar 1, 2022 at 18:07
  • $\begingroup$ wow...you made everything right...except this here :"it is important that you give the green object lots of subdivisions" -> so select your green cube, tab to edit mode and then right click -> subdivide -> enter 20 and you will see the result. And thank you very much for providing blend file, so i could check it out !! $\endgroup$
    – Chris
    Commented Mar 1, 2022 at 18:49
  • $\begingroup$ I got it to work now. But I think my use case is a bit simpler, so maybe I don't need this elaborate solution: 1.) the reference point ("Next") is always in the center (X/Y) of the red object and Z is infinity. 2.) the green object is very flat and is just below the top of the red object. Again, your solution works quite well (see: Frame_v3.blend. There I replaced the green cube with a plane ("Canvas"), which I can now move (X/Y) and see the part of the photo I want to see :-) However, I will also try the solution from moonboots below. $\endgroup$ Commented Mar 2, 2022 at 8:14
0
$\begingroup$

If you plan to have a transparent background for your film, create these additional faces around your pink frame and give them this material which is a (Shader >) Holdout plugged into the Output:

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks for this. For my simple use case, see Frame_v4.blend this is probably the best solution. $\endgroup$ Commented Mar 2, 2022 at 8:45
  • $\begingroup$ ok great then..... ;) $\endgroup$
    – moonboots
    Commented Mar 2, 2022 at 8:57

You must log in to answer this question.

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