Top-down and isometric cameras

How to see your character through walls in Unreal Engine 5

To see your character through walls in Unreal Engine 5 you either cut a hole in the wall material between the camera and the character, or draw the hidden part of the character on top with a Custom Depth post process. The cut-out gives the Diablo-style open roof and needs Masked materials. The silhouette works with any material, including assets you bought.

By RafaSC, 3D and technical artist · Updated · 7 min read

See-Through Occlusion: the roof opens around the character

Three ways games do it

MethodWhat happensGood atThe catch
Cut-out in the wall materialPixels between the camera and the character are discardedPer-pixel, no popping, you see the roomNeeds Masked materials, which cost more than Opaque
Silhouette post processThe hidden part of the character is drawn as a flat colourWorks with Opaque, glass and bought assetsYou see the character, not what is around it
Hide or fade whole actorsA trace from the camera finds what is in the way and fades itEasy to understandWhole walls pop in and out, and you manage traces and actor lists

The first two can live entirely in materials and post process. That is what the rest of this page covers.

Top-down view of a house: on the left the roof hides the character, on the right the roof opens around the character
Same scene, same camera. Left: without. Right: with the cut-out.

Method 1: a hole that follows the character

The idea is that the wall material itself knows where the character is. In a top-down or isometric game the camera looks at the character, so the character sits at camera position + camera forward x a fixed distance. With that point, the material can cut every pixel inside a tube between the camera and the character.

Diagram: camera, wall and character. Pixels inside a tube between the camera and the character are cut; nothing below the ground lock is cut
The material rebuilds the character position from the camera: no tick, no traces, no swaps.

Two details make it usable in a real game: nothing below a ground height is cut, so floors and rugs stay; and the shadow pass keeps the original mask, so a cut wall still casts its shadow into the room.

With See-Through Occlusion the setup in your own material is:

  1. Open your wall, roof or tree material. In Details > Material set Blend Mode = Masked.
  2. Right-click in the graph, type See-Through and add MF_SeeThrough_Apply.
  3. Connect Opacity Mask to Opacity Mask and Emissive to Emissive Color.
  4. If the material already had an opacity mask (leaves, fences) or emissive, plug them into the function's inputs.
  5. Save and create a Material Instance. Every setting is under the See-Through groups.
Material graph: a see-through Material Function wired to Opacity Mask and Emissive Color, Blend Mode set to Masked
Blend Mode Masked, one node, two pins.

Then match Focus Distance to your camera. It must be your Spring Arm length (character Blueprint > CameraBoom > Target Arm Length).

CameraSpring ArmWhat to do
UE Top Down template (Blueprint)1400Nothing, it is the default
UE Top Down template (C++)800Material Instance: Focus Distance = 800
UE Third Person template400 + collisionAdd BP_SeeThroughTarget and set Radius 80 to 120
Camera that zoomschangesFocus Distance Override in the MPC, or the component
Orthographic cameraanyUntick Auto Calculate Ortho Planes, or add the component
Several charactersanyComponent on each one, Target 1 to 4

The cut does not have to be a clean hole:

Six see-through styles on the same room: Glow, Hole, Dither, Burn, Ghost and Cutaway
The cut does not have to be a clean hole: dither, glow rim, animated burn.

Method 2: a silhouette through any material

When your meshes cannot be Masked (Opaque-only, glass, bought assets), draw the hidden part of the character instead.

  1. Project Settings > Rendering > Custom Depth-Stencil Pass = Enabled with Stencil.
  2. On the character mesh: Details > Render CustomDepth Pass = On. Optional: CustomDepth Stencil Value = 1.
  3. In a Post Process Volume: Rendering Features > Post Process Materials > add the silhouette material (MI_PP_SeeThrough_Silhouette in the pack).
A teal character silhouette visible through an opaque wall, drawn by a Custom Depth post process
Silhouette mode: the wall stays Opaque, the hidden part of the character is drawn on top.

A stencil filter lets you show only some meshes, for example players and not enemies.

Zoom, third person and parties

A fixed distance stops being true when the camera zooms, collides with a wall or follows several characters. The fix is to tell the materials the exact position: add the BP_SeeThroughTarget component to the character Blueprint, compile and press Play. It writes one position per frame to a Material Parameter Collection. For a party, add it to each character and choose Target, Target 2, Target 3 or Target 4.

If you only zoom, one node is enough: wherever your zoom changes the arm length, call Set Scalar Parameter Value on MPC_SeeThrough, parameter Focus Distance Override, with the new arm length.

Four third-person views: effect off, a top-down radius on a close camera, radius 100 with focus override, and camera pushed to the wall
Third person needs a smaller radius and the target component.

Keep it cheap

Masked materials cost more than Opaque: there is no early depth rejection, and Nanite switches to its programmable rasterizer. The cost depends on how many cut pixels are on screen, so measure it in your own level with stat GPU.

  1. Use it only on meshes that can block the view: front walls, roofs, trees next to paths. Everything else keeps its Opaque material.
  2. On Nanite meshes set Pixel Programmable Distance to 1500 to 3000 on the Static Mesh Component. Far meshes render as Opaque. It works on instanced foliage too.
  3. No tick, no traces and no material swaps are involved. The component writes one vector per frame.

Two gameplay notes. In click-to-move games, set roof and wall collision to ignore the Visibility channel so clicks go through the hole. And dithered styles need TSR or TAA, which is the UE5 default; the clean Hole style works without.

Frequently asked questions

Do I need Blueprints or actor tags to see the player through walls?

Not for a fixed top-down or isometric-style perspective camera: the material finds the character from the camera. For zoom, third person, orthographic cameras or several characters, add the included component. No programming.

Why is the floor being cut around my character?

Focus Distance is bigger than your Spring Arm length (the C++ Top Down template uses 800), or Ground Offset needs to go lower, for example to -80.

Can I do this without Masked materials?

Yes, with the silhouette method: enable Custom Depth-Stencil, turn on Render CustomDepth Pass on the character and add a silhouette post process material. The wall stays Opaque.

Does it work with Nanite, Lumen and foliage?

Yes, including instanced foliage. Use Pixel Programmable Distance on Nanite meshes to keep far meshes on the cheap Opaque path.

How expensive is the cut-out?

The full master material is 411 pixel-shader instructions. The real cost is Masked versus Opaque, so use it on the meshes that can block the view.

Related guides

See the Player Through Walls in Unreal Engine 5: summary image for Pinterest

Save this guide for later. Product used on this page: See-Through Occlusion.