I have a problem while compositing my render layers. There is a butterfly that goes through a jungle (images as plane). It appears on the foreground, and goes to the background followed by a camera.
So I created a render layer for the butterfly alone, and other render layers for the jungle in order to color grade elements separately.
The problem is that my butterfly moves in depth. I don't know what is the best way to composite my render layers ( I am new to compositing in blender).
I tried to do that with the Z-combine node but it gives me strange result, see the images below:
It may be the wrong method? What about masking the butterfly with the alpha channel of foreground render-layers? I don't know how to do that.