I’ve been playing around with Resident Evil 7 and noticed the first person hands simultaneously exist in the world while drawing over everything else, and I was curious if anyone had any ideas on how they might be doing that and if something similar is achievable in UE4.
Attached is a video I took playing around with the effect and trying to break it to examine what they’re doing. The hands receive and cast shadows in the environment as one would expect standard geo to do (as opposed to a flat card rendering a separate capture from out in space). Interestingly, when positioned so they would be clipping through the world, they still draw on top of everything but receive shadows from the world as if they are clipping. The video explains it better than I can in text, but any time the hands would clip, they just receive the shadow of the object they’re passing through. This leads me to believe they are in the world but doing something tricky with the rendering to still cause them to otherwise draw in front.
One idea that occurred to me but doesn’t seem to technically work in UE4 would be to use have the hands draw to custom depth and use a pixel depth offset in the shaders for all world materials to push those pixels back. Obviously the issue there, though, is that opaque materials can’t read from scene textures like the custom depth pass.
Any ideas would be great. The effect isn’t necessary for anything at the moment, but I’ve wondered about doing something similar in the past and have seen a few threads before without anything definitive ever being posted.
The hands are also affected by the game’s translucent water shader when they intersect the water plane (skip to 4:00):