Problem with the camera and the smoke domain

I am doing some tests with smoke and i would add the fog with particle system to a footage, but i have a problem. If the camera is out of the smoke domain everything is fine and i am able to extract a render layer with only smoke with the right masks of objects (that means, you see only the smoke in front of the object), instead if the camera enters in the smoke domain this doesn’t happen anymore. The first picture is with the camera out of the smoke domain, while in the second one the camera is inside.
Does someone know how to solve this problem?

Could you use a z-depth pass instead? I know it won’t give you the same density at the floor. But may be a work around. Have you tried contacting the smoke GSOC developer to ask if it is a genuine bug?

Thanks for the answer.
I have tried with z-depth, but if my nodes is right it seem to work only inside the smoke domain. I attached a test blend file if you want to try. (On frame 70 the camera is outside, on 71 it is inside the domain)
I have never reported a bug and i do not know how to contact the smoke GSOC developer. Could you help me?


composite_z_pass.blend (1.04 MB)