I made a game! Buy on Steam

This article was updated. Jump to Update 1.

This post extends my Fallout 3 – Edges article.

Source: Fallout 3

While the decal in Fallout “only” added detail to the surface but didn’t change the silhouette, we can see a beautiful breakup of the straight concrete wall in Cyberpunk 2077: Phantom Liberty:

Source: Cyberpunk 2077: Phantom Liberty

To me, this looks so good, that I would not be surprised if it would be a custom mesh with unique texture.

But it is not!

It all starts with a simple box as wall (with chamfered/beveled edges) and a detailed mesh which is stuck into the wall as overlap (there are 3 steps of fade-in for the wireframe because this mesh uses 3 different materials and therefore renders in 3 separate draw calls).

Source: Cyberpunk 2077: Phantom Liberty

Sticking a mesh into another looks a bit ugly, though, as we can clear see where both geometries intersect. The Cyber-Artists of CDPR try to cover this up by placing a decal on top of both geometry, but the intersection is still quite visible:

Source: Cyberpunk 2077: Phantom Liberty

The magic happens now, when another layer of decals comes on top!

Source: Cyberpunk 2077: Phantom Liberty

Here are the textures for this decal, and I must admit: I love those stone structures, the sharpness and the cracks! πŸ’˜πŸ’˜πŸ’˜

The small grayscale texture is a height map for the wonderful parallax occlusion mapping (POM), which adds all the depth to it. Here is a quick example with their texture but displayed in Unreal:

There is a weird behavior thought, and I’m not sure why it happens. Here you can clearly see how the depth of the POM changes depending on the distance so that parts of it get pushed downward?

Source: Cyberpunk 2077: Phantom Liberty

I did a test in Unreal, but I could not reproduce the issue. Maybe it’s related to my very low settings in the Cyberpunk game, because I only use a GTX 1080. What I can rule out: There is no tessellation happening, and increasing anisotropic filtering also doesn’t change anything.

Anyway, I love how these POM decals blend both geometries so perfectly into each other! I hope you like it as much as I do and if you have any idea what this odd behavior, let me know in the comments!

Update 1

Oskar Świerad gave us some info what the issue could be in his reply on bluesky:

“We made the number of steps dependent on the angle. What you see here is probably an artifact of that (or interpolation)”

2 thoughts on “Cyberpunk: Broken Edges

  1. Gaktan

    The depth changing over the distance might be an optimization of the POM. The technique works by ray-marching the depth texture with a variable amount of steps and step size. I bet the step size is increased, and the step count reduced with distance for better performance.

    Reply
    1. Simon Post author

      Yes, I had the pleasure of getting a reply from one of the developers: “We made the number of steps dependent on the angle. What you see here is probably an artifact of that (or interpolation)”

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *