Mixing 2d Image with 3d Objects , Z Buffer Unity Free

Hello everyone

Here is what i want to do:
I want scenes that mostly consist of a kind of 2d picture with 3d objects mixed in, like cars, ships and some 3d buildings.

First a want to construct say a city at runtime, using a tilebased system.
Then i want to render everything that is supposed to be static for the rest of that scene , make a screenshot and get information about each pixels depth.
Later i draw the image from the screenshot over the whole screen and render the dynamic 3d elements after that.
However, parts of the image could be in front or behind the 3d objects so my idea is to overwrite the z buffer with the exact values i got earlier.

Can this be done with Unity Free and if so how ?

The simple answer is no. What you describe requires render to texture which is a pro feature.

My next question would be, why do you want to do this? Are we talking massive amounts of tiles or are your tiles insanely detailed?

EDIT: Your topic is possible though. You can make a shader that renders an image with z-depth testing. What is not possible is using Unity to render the objects into this texture without Unity pro.

Yes the reason is high poly models. Since camera perspective and most objects don’t really change i figured this would be a good way to save a lot of performance.
Since i can’t use the z buffer directly i guess i will try some masking geometry.