Occlude part of mesh behind invisible primitive

Hello people

I have a problem and I can’t seem to figure it out.
Everything should be invisible behind a certain point.
I thought about using an invisible plane and only render the background behind it, but I have no idea how.
Tried something with the scene depth but the depth doesn’t render for an invisible plane (translucent material set to 0 opacity)
Is there a way to make this happen?
Thanks in advance

I think an easier way to go about this may be to set opacity of mesh based on pixel position in the shader. Just feed an accurate height (The world z of the swirly vortex) into the object’s material and all parts of the object above that height set to 0 opacity.

edit: Note that you could use a material collection parameter to make this easily sync up between multiple materials/meshes.

Thank you, figured it out though :stuck_out_tongue:
It has to be able to be placed dynamically.