Landscape Height Limit

Hello everyone,
I’m pretty new in this forum and as an artist I’m so happy to be part of the UE Universe.
I have a studio and we are basically developing few things with UE4.
Of course problems are coming up.

I have decided to use the original Landscape sculptor that it pretty nice but the problem is that I have a kind of height limit.
Over that limit my mountains is flatting.
How can I solve this?

Many many thanks

1 Like

Anyone please?

Hi, here’s the answer: https://forums.unrealengine.com/deve…initive-answer

So you can change the z-scale of your landscape to go beyond the height limit but of course you will lose precision by increasing the z-scale (UE saves the heightmap into a 16 bit texture, so you can have around 65k height steps) and you can’t really change this once you have started sculpting since it is changing the scale of the landscape and will therefore also affect what you have sculpted so far.

Thank you very much, I did it but the problem still persist. Z-scale is just a scale factor and it doesn change the limitation.

Hmmm, not quite sure I understand your problem then :slight_smile:

Basically UE saves the height information of the landscape into a 16 bit greyscale texture (one pixel for each vertex of the landscape). Therefore you only have a certain amount of heights your landscape can have at any point (around 65 thousand, so 16 bit). Since this is a finite amount of heights you will always have a limit of how high your mountains can be.

So pure black in the landscape heightmap would be the lowest possible height and pure white would be the maximum height and then you’ve got around 65k heights in between (so different shades of grey). If you use the sculpt tool of the landscape what you’re doing is painting on the landscape heightmap but you can’t go beyond pure white or below pure black. If you want higher mountains, then you can change the scale of the landscape, so increase the height of what pure white would be but you will always have a max (pure white) and min (pure black) height.

I’m using the sculpt tool but how can I change the the Z scale?

Adding to what others already mentioned. The Landscape actor, that you place in your scene, has a transform. (translate, rotate, scale) The default scale values are set to 100. The Z-axis, the blue value, is the height scale. By default, 100 scale gives you -256 to 256 meters in engine. Let’s say you need a mountain height range of 1 km, you would need to set the Z-scale to 200. Which gives you -512 to 512 meters.

Your sculpted values never change however. Like @chrudimer said, you are painting a 16 bit grayscale map. These values are translated to whatever scale you’re using. Say that you painted the max value and it flattens out on top. Increasing the scale will not remove this flattening, because the values are the same. You then instead have a greater range, and would have to adjust everything you have sculpted.

Therefore it is important that you understand what Z-scale you are using in Unreal, and what size it represents. Because not only do you need to set this from the start, but you also need the height range when creating heightmaps in another software.

1 Like

So basically I cant remove this limit but I can bypass the limit simply increasing the z-scale and resculpting?

Yeah. If you want to get your original height back after changing the Z-scale, you can export your heightmap to for example Krita och Photoshop. Add a Multiply layer that is fully black and opacity set to 50%. (if your Z-scale is 200 that is) This will scale your heightmap down by half, which will counter the new scale you made in UE4.

Note however that it is likely that your terrain will be moved down… Because the centerpoint is at 50% grey. I guess you can start by restoring the height. Then do a second pass in PS or Krita, but do an add layer with fully white, but set to 25%. (this should move everything up to the same place it was before I believe)

Remember to save your heightmap in 16 bit to not loose any information. Most images are stored as 8 bit, so double check the bitmap precision before saving the png.

2 Likes

Yes yes, what you said it doesn’t sound new for me because I’m working in the CGi since many years ago but I was new in UE landscape tool. It is cool but it’s like any other gaming tool. I supposed to be something like a mesh plane. However I’ve just scaled up the landscape and adjusted the sculpting… a bit rudimentary but effective!

Thank you very ,much
now it’s the time to shading :slight_smile:

To Work out the exact height you can have this way.
create a new landscape. Save/export the heightmap. Paint one side black, one white.
Import it in.

Place a box on top, one on bottom. And see where the Z values read out. (Hint, those are standard at z scaling 100).

You then need to figure out your elevation.

Say your mountain range is K2, that’s 8,611m.

You need to have enough of a z scaling to go from elevation 0 to 8,611m.

now remember that the black is the lowest possible value, and it doesn’t sit at Z = 0.

Z=0 is actually your water level, it should always sit at 50% between max and min values.
So you need to figure out what factor of Z will take you from the current max value of the landscape to 8,611m.

100 is to max default height/2 AS x is to 8611

100/(default height/2) multiplied by the final height should give you the exact scale you need.

Apply the scale, load in the same heightmap with min/max and check the given values.

This obviously becomes important if you are maki g scale 1:1 things from a DTM.
Usually a digital terrain model will tell you what its minimum and maximum height are, and you have to set the z scale correctly for a proper display.

Thank you very much for explanation. I did it, I’ve got practice even with UE4 landscaping tools.
Now I’m looking for a good way to make an automaterial with 3 materials based on height, normal texture map and displacement map as well :slight_smile:

There is no “good” way as (generally speaking) the calculations involved in an auto material kill performance.
In other words, it’s more expensive in time to manually paint it on, but it will outperform an automated material.

As far as making it, You can follow this as a starting point:

mmmh, nice tutorial but not what I was looking for

Seems to me you can solve this problem by using two materials. One auto material to create the layer info and then a second material where you just use the layer info from the auto material.

So take the auto material (use white color for the feature you want to put into a layer and black for all the rest, repeat for all features) use a scene capture component 2d + Rendertarget to create the layer info and then use that layer info in the second material. So the time to create this will be the same regardless of the size of the landscape and you will keep performance. But of course you will loose some flexibility compared to just use the auto material. [HR][/HR]

With “based on height”, do you mean height blend, or do you mean based on height as in world height (so for example snow if you’re above 500m, grass below)?

Hi, yes I’m creating different material and blending them. About performance now I have to dynamically set different tessellation based on distance to improve the performance. Do you have any tutorial for that please?

Hmmm, not quite sure I understand what you mean. Tessellation is by default distance based and you can control that with the “Tessellation Mutliplier” inside the material. If you want to dynamically change that “Tessellation Mutliplier” I would use a material parameter collection then you can easily change it via blueprint in runtime.

If you want to have different “Tessellation Multipliers” per layer, you can use a landscape layer blend.

[HR][/HR]
As for tutorials, since I’m not quite sure I understand your question I can’t give you a recommendation there, only that you could try looking for something like “ue4 landscape tessellation”, but I assume you’ve already done that…

For the tessellation to actually be different based on any math, you need to make sure the materia does not have the adaptive option checked. Otherwise it will override whatver math you want to do.

As basic as you get.
distance between world position and camera.
Divide by scalar for distance. Power by scalar for falloff. Clamp to keep in 0 to 1 range. Feed into a lerp with min/max of the multiplier.

For basing things on height, very similar but world position mask G if statement comparing the the Z height you want and the options of what to use if above or below the treshold.
mind you, this is hard line you have to fade the material you place into the IF statement some other way.

Set Z offset to something like 10000 and midpoint to 3 in landscape custom brush.

sorry for the late answer but as a workaround you can make the player smaller so that the landscape looks bigger lol

2 Likes