Hide actor but not its reflection

Hi there,
For 2 days now, I’m trying to solve Title’s problem.
I’m using Unreal 5.2 with Lumen. Basically, I have an enemy and I’d like to show only its reflection on screen, but not the actor.
I’m using Lumen as Ray Tracing is not really an option (I don’t have the hardware, also I don’t want to design a mechanic that requires to have an RTX card).

Please, any kind of help would be appreciated!

what sort of reflection is it? and what sort of effect is it supposed to have?

i picture a horror game right there.

on planes (floors and walls) you could potentially fake it putting it on the ground and render it upside down aka mirrored and use a transparency hack. without depthtest it would always render and you gotta do some fancy shader magic to control the look of it.

for regular graphics you’d have to render it controlled into a rendertarget and composite it. i’m not sure exactly howto do that. i’d have to try that.

First of all, I apologize for the lack of details about the game. I’m working on an HD-2D (2D Sprites in a 3D Environment) hack 'n slash game, inspired by Devil May Cry. It’s my Honours project at Uni.

Basically, the reflection is just a normal reflection from an NPC in puddles and windows, nothing fancy. The idea is that when the Player encounters the NPC, it vanishes, but its reflection is still visible in said occurrences.

I’ll attach a picture of how it looks right now.

You could theoretically hide it in the primary view but maintain its’ visibility in lumen; this will break screen traces however. I believe there’s a tag to do so, but I don’t remember the name.

The “Owner Not See/Only See” maybe?

You would need to disable screen trace reflections, and then use the raytracing quality switch in the material, connected to opacity mask to make the material opaque in lumen but masked in the main pass.

2 Likes

I think I’m one step closer to a solution using CustomDepth:


I feel like I only need to find the right thing to connect to the Lerp B Value… sorry, I’m really not that used to working with Materials…

You are not going to be able to do this with a postprocess, since the post process cannot sample what is behind the character, as only the closest pixels are drawn. Refer to my previous comment for a proven working method.

1 Like

yeah. 2.5d reflections are not that easy without rtx, using the surface cache.

i built a lil test and can’t figure it out.

for the floors you can maybe do the portal trick with depth stencil and smart cameras and maybe mirror reprojection. you can’t have walls in the same shot tho. hmm

this is a pixelart effect, probably best designed in software with all the flexibility. :slight_smile:

Thank you. I’ll mark yours as the solution. However, would you be able to demonstrate that in more details, please?

This is my current material setup:

image

Again, this will only work if reflection screen traces are off.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.