A neat feature of many titles is being able to see enemies or important objects through walls, similar to the detective mode in Batman: Arkham Knight, the thermal vision in Splinter Cell, or the outlines in Evolve and other games. Let's implement similar functionality now.
Before we start working within the Unreal Editor we will need to have a project to work with:
Cookbook_Chapter7
). Once you are done, click on Create Project.In order to see other objects, let's first add an object that we'd like to see into the level:
Example_Map
file and from the Content Browser tab, go into the Character
folder and drag a HeroTPP
skeletal mesh into the level. This will be our enemy that we will want to see no matter where they will be.SeeThruMaterial
). Once it's created, open up the Material Editor.Constant3Vector
with a color of your choice and assign it to the Emissive Color property.This blending mode is used for objects that require some form of translucency and is applied onto areas in front of it, but this mode also has another feature that is perfect for what we want to do. We will look into it next.
For more information on how to use Transparency effectively, refer to https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/HowTo/Transparency/index.html.
With this, we can see the object no matter what! Later on, you can use this recipe with the knowledge of blueprints to toggle the effect.
Tom Looman also came up with another implementation using the Render Custom Depth flag that looks similar to the game Evolve with outlines. It can be found at http://www.tomlooman.com/ue4-evolves-outline-post-effect/.
Now, there is much more that exists in the Material editor, especially when you add more complex interactions and/or apply them to meshes to create some interesting effects. Here are some additional tutorials that may be useful to you going further:
3.149.254.110