Invisible plane but not transparent?

Hi

Im looking to make a mesh transparent but i dont want it to be see through.

Basically i want the mesh to work as a shadow catcher but i dont want anything behind it to be seen.

Heres a picture of what im trying to achieve so you understand better, what i am trying to do.


So i have a mesh the shape of the castle that is working as a shadow catcher but as you can see the dragons tail and other areas can be seen. From the way the dragon is moving his tail should be covered by the structure.

I tried using a mask but that didnt work as if you look at his feet you’ll see that they stick out over the edge so but putting a mask over the area, i just ended up cutting off his feet.

Anyone have any advice on this topic?

Thanks!

I basically want the mesh to act exactly as a mesh, as in something that is behind it wont be seen but i want the mesh to be invisable…

Is this even possible?

working in cycles by the way

for now shadow catcher is under development, what you can do is render the dragon and the shadows separately than composite them in post production.