Mountain Ridge Issue

Hello! My problem is simple, and hopefully the solution is relatively straight forward. I have produced a decent looking terrain height map, but the ridges are not to my liking.

The top of the ridge should be at a single height map point, but instead is kind of spread between several different points.

So instead of :
. . . . .

It’s like:
. . . .
. . . . .
. . . .

Hopefully you know what I mean :smiley:

Project included, along with a in game picture of the ridges from Unity.

Thanks for any help. Please let me know if I need to explain the problem another way.

Hi there,

Unfortunately, you’ve discovered a classic problem in computer graphics, known as “aliasing”. It’s been causing annoyances for at least the last 40 years :slight_smile:

This happens because the ridge is too sharp to be properly represented by the resolution of terrain that is being exported; so the ridge is sometimes captured by one vertex, sometimes by another, and you end up with a sawtooth pattern. The “true” ridge should be somewhere between the two vertices, but there is nothing there to register its passage.

There are a couple things that you can do to fix this:

  1. Use a higher resolution terrain, which is able to capture sharper features. This shrinks the size of the zig-zag until it is eventually unnoticable.
  2. Smooth the ridge so that it no longer is so sharp – this fixes the problem at the source. A couple pixel radius blur added to your heightfield before export should be sufficient. Unfortunately, it also blurs other features that were OK should be preserved.

Unfortunately there isn’t much else to be done so long as we’re only working with regular terrain grids…