Displacement's behavior is troublesome on scaled landscapes.

Hello guys,

We’re building a game using Unreal Engine 5.8 and we have found out an annoying behavior using Displacement on Nanite Landscapes.

How we’re building our landscapes:

We’re using Houdini to Unreal plugin to easily import a heightmap, adding some modifications (erosion, …) and then creating the landscape in Unreal with the right partition parameters (Component Count, Subsections, …). We want to have a resolution of one vertex per 50cm, and our levels may vary a lot in altitude, some having a height of ~100m while some others can be more than 1km tall (mountains and stuff).

When the landscape is created, it appears in UE having some scaling. 50 for X/Y and something between 15 to +350 for Z, according to the topology. It seems it’s the proper way to import landscapes, Unreal forcing a density of 1 vertex per meter at 100 scale (so we need to scale down this by two), and adjusting the Z scale for better precision.

Everything was fine then until we decided to use Displacement. Our landscapes are Nanite and we’re using Nanite Tesselation + Displacement for tiny details.

Where it goes wrong:

Displacement parameter is just a scalar, and vertices are moved along the normal. The thing is, it occurs at local object level, before applying the scale. So when my landscape is scaled like [50,50,15], having a 5cm displacement would move vertices differently along X, Y and Z. It’s very noticeable on slopes (cf screen). It seems we are stuck with this behavior. We tried to find ways to export landscape with a uniform scaling, but we failed.

Here is an example on a [100,100,100] landscape (displacement is exaggerated for the example):

And the same example on a [50,50,15] landscape:

Please notice how the spikes are distorted and bend along the X,Y plane.

Do you have some insights on this?

Thank you!

Steps to Reproduce

  1. Create a new landscape terrain and sculpt a small (but beautiful) hill
  2. Scale it down to like [50,50,15]
  3. Make it nanite
  4. Apply a material on it, with tesselation and displacement
  5. Observe the way displacement behaves on slopes

Hey there! I’d not seen this shear issue before, but I am able to reproduce it in 5.8.2. What I’ll say about displacement as it pertains to landscapes is that you can (and should!) scale your magnitude to match your landscape scale. So for example the default landscape scale in Unreal is 100, so I’d go into the material’s Displacement settings at set the Magnitude to 0.04. It’s important to do this otherwise you’ll end up with bad cluster culling because the bounds of a cluster are inflated by that magnitude, so by default you end up with a cluster whose bounds are inflated by 400 units!

I’ll flag the shear issue with the team, but I can’t say which version of the engine would see a fix.

Hi Matt!

Thanks for the feedback! Is there a bug ticket or something I can hook on to know when there is an update?

Indeed there is! It’s being tracked as UE-367789.