I have searched for this many times and have not found a satisfactory answer.
The effect I am trying to achieve is that found in the old pre-rendered survival horror/puzzle games, pre-rendered 2D background and depth masking.
I’ve tried several methods, using 2 cameras (orthographic for background and perspective for models) and using distance sorting to hide cutouts of depth objects (tables, chairs etc) but this only works so far as one character is concerned.
I’ve tried the depth mask shader found on the Unity wiki and this is great, but to work for this context would involve a lot of guesswork/tweaking to get something that matches the backgrounds properly.
What I would like to be able to do is use a pre-rendered depth map alongside the pre-rendered background to cut down the workload significantly, I saw a couple shaders most notably Aubergine’s one but could not get them to work properly. Does anybody know of a shader or tool that would let me do this?
I’m trying to build a team for my indi game development studios, Liquid-State game studios. We’re actually trying to work something like this out for our first game. Give us a shout out and maybe you could join the team?
We got some good pre-rendering technology if you heard of it, vue xstream. We’ve worked out a system basically you tell unity to not allow shadows on the plain, then mimic the lighting you have pre-rendered so that it appears to be the same as the rendered source.
As for the layer effect try using alpha planes to give the effect that the player can move behind the object.
“maybe theres a better system for unity out there, as stated above we’re just coming about.”
I think we will mostly have pre-rendered backgrounds also with movie texture as well.
If you’re interested give us a shout.
More people more ideas.
Where now rendering a GB’s of images and videos, but this is our FB page…“just made today”
well I can think of doing it part way…
assuming you have a low-model of your scene, a redered 2D backdrop, a camera and a 3d animated character in the scene.
clear background with camera
draw your 2D backdrop image (you could also use your main camera to render this once to a render texture, then just draw the render texture as 2d polygon, this would give you option to edit render direction easily in unity)
Render your low poly version of the scene, take, any unlit (super cheap) shader, leave z-write on, but strip out all lighting and color and everything else… It will still be rendering to z-buffer, so maybe not quite as fast as re-rendered. But it wont be reading from any textures, and wont have to do any lighting calculations, so it will still be pretty darn fast comparatively speaking.