First of all, I still have a lot to learn, but I’m currently developing a survival horror game inspired by Resident Evil HD Remaster, with pre-rendered backgrounds.
I created the background in Blender and also generated the depth map texture there.
My goal is to have the character be occluded by objects (using the depth map) when walking behind them, so they become hidden from view.
I’ve set up a post-process material to handle occlusion, but right now everything gets occluded (characters, enemies, etc.) regardless of their position.
What I’d really like to achieve is that the player character and enemies are only occluded when they are actually behind an obstacle (according to the depth map), and not at all times.
Does anyone have any suggestions or best practices for selective occlusion/masking using a depth map?
Any advice, guides, or references would be greatly appreciated!
Thank you so much in advance!
P.S. Is there a better solution for pre-rendered backgrounds on Unreal Engine? Thanks