Course contentsShow
← Unreal Engine Game Development
Lesson 515 of 8807. Visual Fidelity and RenderingFree lesson

Simulating Surface Detail with Parallax Occlusion

Implement parallax occlusion mapping to create the illusion of depth and complex geometry on flat surfaces without increasing polygon counts.

In this lesson, you will learn how to use Parallax Occlusion Mapping (POM) to create the illusion of deep, complex 3D geometry on flat surfaces without adding a single polygon to your mesh.

The Illusion of Depth

When you look at a brick wall in a game, you expect to see the mortar indented and the bricks protruding. Normally, this requires high-poly geometry or complex Nanite displacement. Parallax Occlusion Mapping (POM) achieves this effect by shifting the UV coordinates based on the viewer’s angle and a height map. Effectively, it "ray traces" through the texture internally to find the point where the surface would be, creating a convincing sense of self-occlusion and perspective shift.

Implementing the Parallax Occlusion Mapping Node

In the Unreal Engine Material Editor, you don't need to write the math from scratch; you utilize the Parallax Occlusion Mapping node. To set it up, you need a height map (usually stored in the Alpha channel of your Normal or Roughness map).

Your Material graph setup generally looks like this:

  1. Height Map: Feed your texture sample into the Height Map Texture input.
  2. Height Ratio: This defines how deep the effect goes. Keep this value low (e.g., 0.02 to 0.05) to avoid breaking the illusion at extreme viewing angles.
  3. Min/Max Steps: These control the "ray marching" precision. Higher values look sharper but are more expensive; use a lower Min Steps (around 8) and a higher Max Steps (around 32) for a good balance.
[Texture Sample (Height)] -> [Parallax Occlusion Mapping Node]
                                    |
            [UVs Output] ---------> [Base Color, Normal, Roughness Texture Samplers]

By connecting the UVs output of the POM node into the UV inputs of your other texture samplers, those textures will appear to "sink" into the surface. As the player moves their camera, the textures shift independently, creating a deep 3D effect that looks physically separate from the flat geometry of the underlying mesh.

Key Takeaway: Parallax Occlusion Mapping is a high-performance optimization trick that creates depth by mathematically displacing UV coordinates based on height map data, providing realistic detail while keeping your polygon count zero.