Download

Render character behind other objects.

Hello all right?

I am creating a map of my game, but in some parts, the player ends up behind some walls, even so, I would like it to appear in any way.
I saw that using shaders, it would be possible, but do not know where to start.

Below is a picture that I found, the effect I wanted was more or less that.

Screenshot 2014-05-04 21.56.23.png&stc=1

Hello Weskey,

I’m no expert on this but I think I understand the logic of what has to happen here. So you want a sort of X-Ray vision? So that when a character is blocked or occluded by another object, it has a specific look (shader).

So you will need 3 materials:

1.) Material to apply to objects that you want to be seen through
2.) Standard material for character
3.) X-Ray material for character

Apply the standard material to the character

If the character’s material is further than the object’s material that is occluding it, apply the X-ray material to the character, else keep the standard material on the character.

There are also some sorting settings you will need to apply. I’ll try to do some research.

In order to get a proper example for you, I’d have to learn more of the Blueprint system. But for now, you will need to enable the “Disable Depth Test” flag in the Translucency Tab of the Shader settings in the Material Editor. This will allow the material to draw on top of Opaque geometry even if it is behind it.

Sorry for the delay in responding.
I will test the procedures you entered, and then come back with feedback.

My biggest question was how to replace the material of the character, when he was hidden by a wall (for example).
I will continue researching the system blueprint to see if I find something.
Thank you very much.