Sensing visual effect

Hello, so I’m working on a project where the player has this special sensing ability (mechanically, it works kind of like the sensing ability from Rise of the Tomb Raider). My issue is not with the actual mechanic, but with the way the effect looks. I’ve prepared an example here:


One of these berry bushes is poisonous, the other is not. The only way to determine which is which is to use the sensing ability.


This is currently what is looks like to use this ability. Obviously, the red one hurts you, but the blue one helps you.

However, this is not the visual effect I’m going for. I’d like for everything but the things that light up to turn black and white. I’ve been able to create the desired effect through photoshop (Well, Gimp but whatever).


My issue is… I haven’t the foggiest idea how to do this, or even if it’s possible to do in the Unreal engine. I’ve experimented with post processing effects a bunch, but I can’t quite get this to happen. If anybody has any helpful insight on this, that’d be amazing!

Make your Resources (your bushes) Render to Custom Depth with a specific Value.
Create a new Post Process Material which utilizes the custom Depth.

I think this is on the right track now, but all I can find is how to make outlines with the custom depth. I can’t find a whole lot of information on how to utilize custom depth better.

Yep, the solution to this is custom depth pass for the bushes and a post process material for everything around them in which you also use the depth pass renders of the bushes to exclude them from said post process material with a mask.

How do I use the depth pass in the bush’s material though? Cause it says I can’t use the custom depth node without the material domain being set to postprocessing :confused: I understand the concept, but I’m having trouble actually implementing it all.

Select your material node inside your material (the big node with all the inputs like color, roughness, specular ,…) and you will see options to the left. Somewhere near the top you can change your material domain to post process.

1800c328c19a6b12252c17e6bbe01d04.png

No I know how to change material domains lol. My confusion is on how to actually use a depth pass in the post process material and my bush material.

In the post processing material I can find the custom depth node… but then what do I do with that?

And furthermore, how would I use this in my bush material? Cause I cant change the bush material to post process domain.

I’m so bad at this lol.

I can’t experiment myself right now, but I think you can use the color from the custom depth node and use it as a mask in a lerp. Not sure about this, but you can try that.

Ok, I’ve almost gotten it.


Using like a reverse outline kind of thing, I am able to isolate these two bushes from the rest of the effect. Now instead of this yellowish bit, I need to somehow make it a desaturation filter. So that everything but these bushes becomes black and white. Again, I’ve experimented with some things but have no usable results.

Scratch that I actually got it to work perfectly. Just had to replace the flat colour with a desaturated scene colour node. Thank you so much to everyone who commented :smiley: