Unwanted Landscape deformation offset when deforming landscape with splines in different edit layer

When deforming the landscape based on a spline (using both blueprint and landscape splines), the landscape should “snap” to the spline. However, if the spline is placed or used in a different landscape edit layer than the initial deformation, the landscape will have an offset equal to the height of the landscape’s deformation before the spline was placed.

I expected the landscape to deform to the same height as the spline, not to create an offset that’s dependent on the deformation on other layers. It should preform as it does when the deformations are in the same edit layer.

What happens:

When deforming the landscape with a spline (using both blueprint and landscape splines), the landscape should “snap” to the spline. However, if the spline is placed in a different landscape edit layer than the initial deformation, the landscape will have an offset equal to the height of the initial deformation.

Steps to Reproduce
1. Create a level

2. Add a landscape + deform it with sculpt mode in the landscape edit layer “Layer”

3. Create a new landscape edit layer

4. Go back to selection mode

5. Create a spline blueprint so the landscape can deform to the splines placement (example nodes attached)

6. Add the spline to the level and add some points + move it up.

7. Position the spline over a deformation made from sculpt mode.

8. Set the LandscapeEditLayerName to the new edit layer you created (not the same as the sculpted layer)

9. Set the boolean condition to true and watch the landscape deform.

Hi Ida,

Everything that is happening in this video seems to be working as expected :

  • In the initial section of the video [0-10s], you are affecting the first edit layer in the stack (“Layer”), and the current height of the spline is written into it (note that since you’re not using the Splines edit layer, you are not using a non-destructive workflow and therefore, the spline data is written on top of the existing data, which is why, when you move the spline around, the terrain is still deformed to where the spline was previously located (instead of only around the spline, as you would get if you had used a proper Splines Edit Layer)
  • Later on in the video [10 - 25s], you are affecting another edit layer (“MyLayer”), but that layer is also a standard edit layer, and unlike the Splines Edit Layer, those blend additively. Therefore, the height coming from the other edit layer (“Layer”) is added on top of the one written into “MyLayer”. So technically, the “Editor Apply Spline” did its job and rasterized the spline into “MyLayer”, but since you have some height data on the other layer, the final height ends up higher than what you would expect. You would need to erase the height from the previous layer(s) in order to get “MyLayer”'s height to be the one from the spline.

This is why the Splines Edit Layer comes in handy : it ensures that all splines data is written into 1 and only 1 layer and it does so in a non-destructive way (i.e. every time a spline is adjusted, the previous spline data is “erased”, so that you effectively always have a height that matches the current location of the splines), but also, it has a different blending policy than standard edit layers, that is akin to alpha blending : at the location of the spline, the final height will be the spline layer’s height, no matter the height on any of the layers underneath (alpha = 1). Then, as the distance from the spline increases, alpha decreases, and we blend the spline layer’s height towards the accumulated height from the edit layers underneath. Splines can even have a settings to only allow raising the terrain from previous layers, only lowering it, or both.

This method you are using to write height from splines comes from a time where edit layers had not been implemented and it isn’t used much anymore, since Splines Edit Layer is much more user-friendly. If possible I’d advise you to use it. The one caveat is that you can only have 1 Splines Edit Layer in your landscape and therefore all landscape splines will write to the same layer. In practice, we’ve never received complaints that this was a problem, though.

I hope this helps. Let me know if you have any question.

Cheers,

Jonathan

Yeah, the doc is not up-to-date, the method to create a splines edit layer has changed in UE5.5, you now need to choose the type of the edit layer when adding a new one : press the ‘+’ button, then select the splines edit layer class type.

Then you just manipulate landscape splines using the landscape splines tool, as describerd here (https://dev.epicgames.com/documentation/en\-us/unreal\-engine/landscape\-splines\-in\-unreal\-engine), except you don’t need to hit the “Apply Splines to Landscape” button, since it’s done automatically as you manipulate the splines.

[Image Removed]

Cheers,

Jonathan

Does this only work with the landscape spline tool?

Is there any way to use it with Blueprint splines?

Indeed, this is user-driven and not exposed to blueprint at the moment. You will need to add some code if you want to manipulate this from blueprint.

Hi Jonathan,

Thank you for you reply! It sounds interesting, but I have some questions.

How do I create a Splines Edit Layer?

How would I use it? Do I use it the same as when I reference the landscape layers?

I have only found this about that method https://dev.epicgames.com/documentation/en-us/unreal-engine/landscape-edit-layers-in-unreal-engine#usingnon-destructivesplines but it seems to be out of date.

//Ida