In this tutorial, I’ll share two methods in Unreal Engine for creating fake depth. In other words, we’ll learn how to simulate geometry without sacrificing performance and prevent our textures from looking flat. If you’re not familiar with setting up textures in Unreal, I also wrote a tutorial on that topic here.
Before we begin, let me share some additional performance tips regarding bump maps. In this tutorial, I won’t be using Quixel textures, but the methods we discuss today will work with textures downloaded from any source. The reason I mention Quixel is that, by default, the lowest resolution you can download from Megascan is 2K, which is excessive for a bump map. You can reduce the resolution significantly while still achieving great-looking bump maps to:
In fact, using a low-resolution bump texture produces better results. This is due to limitations in the nodes that display bump maps in Unreal Engine 5, where low-resolution or blurry images can create smudged/etc. effects and reduce sharp transitions when viewed from different angles. If the last sentence doesn’t make sense, unfortunately, in Unreal Engine 5, bump textures lose their effectiveness from certain angles, but we’ll discuss that further shortly. So, if you wish, you can apply a very small amount of ‘Gaussian Blur’ to your texture in Photoshop or similar software.
Your advertisement can be placed here for $200 permanently. Suggested resolutions: 1800x663 or 1400x1400. Contact us.
After implementing ‘Bump Offset’ or ‘Parallax Occlusion Mapping’, you might notice that as you move your camera around, the mesh with the bump texture applied shifts its texture coordinates based on the camera’s view angle. To prevent or minimize this issue, when you import your bump texture into the engine, open your bump texture in UE5, and ensure that the ‘sRGB’ option is unchecked to prevent gamma correction:
After doing so, you might encounter an error message within the ‘Material Graph’. To resolve this, you’ll need to change the ‘Sampler Type’ from ‘Color’ to ‘Linear Color’:
Bump textures are grayscale images that contain black, white, and grey areas. These colors represent:
I’ve noticed that many of the bump textures provided by Quixel are a bit too gray for my liking. If you are aiming for archviz, you probably should not play with these values, but if you are a gamedev and want a little bit more punch in your texture, I recommend opening your image in Photoshop or similar software to adjust the white areas to be just a bit whiter and the black areas to be just a bit blacker. This will help you better visualize the results of the bump map on our mesh.
Left to Right: Regular Texture Setup > Bumpoffset Method > Parallax Occlusion Mapping Method
Which one looks like it has more depth to you?
Important Note: One thing you need to be aware of with bump maps is that the way they are handled in Unreal Engine can cause this effect to break apart from certain camera angles due to a limitation of Unreal Engine. This is why using blurry and low-resolution bump textures can help, as the transition from one viewing angle to another won’t appear as sharp. Sharp transitions occur when the contrast between the white and black values in the texture is too pronounced.
Bump Offset Node Setup
Bump Offset Node Options
The ‘Pixel Depth Offset’ feature is optional, you don’t need to plug that in for POM to work.
The Pixel Depth Offset feature moves pixels up and down in the depth buffer. This means that this feature can be used to adjust the fake depth length or to modify the calculated depth value of a pixel, allowing for more control over how two or more objects are composited together. This can be particularly useful in scenarios where we want to prevent z-fighting — a visual artifact where two objects at different depths appear to flicker or fight for visibility. In some cases, Pixel Depth Offset can be used to reduce unnecessary overdraw in a scene, optimizing rendering performance by ensuring that only the visible portions of objects are rendered.
One thing to pay attention to when using this feature is that higher values can create unwanted shadows, as some pixels are moved further away from the mesh itself. To prevent this from happening, you can click on the asset, go to the details panel, search for ‘Cast Shadow’, and set it to false.”
‘Parallax Occlusion Mapping’ Node Options
You can use both of these methods mentioned here simultaneously. For example; for less important assets, you can utilize ‘Bump Offset’ to conserve performance, and ‘Parallax Occlusion Mapping’ for assets that players will see from very close distances. You can implement a function that identifies the hardware where your game is being run and sets materials to use bump or parallax based on that information.
And as the last thing, if you enjoyed this tutorial and would like to see more written tutorials from me, you can donate as little as $10 to me on Patreon. This support will enable me to allocate more time to creating these resources.