Landscape system, related features and issues


There are more than several landscape related threads spread across the board and I decided to pull it together in this thread and maintain it as the main landscape feedback thread to help improve the general experience with landscape system in UE4. There are many issues/requests accumulated and are forgotten I hope centralizing the focus in this thread helps getting some attention.

Requested features that result in performance improvements:

1. Texture arrays.
2. Virtual texturing.
3. Material editor dynamic branching.
4. Improve material layering performance.
**5. **Allow to define vertex density per landscape component. Some areas should have less than 1 vert per meter, some other areas might need more than 1 vert per meter.

Features that improve artists efficiency with landscapes: These features greatly reduce the time taken to switch between layers, adjust brush radius and strength and let’s the artist focus more on the painting process instead.

1. Shortcuts for switching between layers when painting. i.e pressing 3 on the keyboard = select layer 3.
2. Increasing/decreasing brush radius by holding down a key and moving mouse forward/backward.
3. Increasing/decreasing brush strength by holding down a key and moving mouse forward/backward. (Preferably with an indicator showing the strength at mouse pointer instead of reading it from landscape tab).
4. Shortcuts for switching between brush types.
5. Ability to rotate brush alpha texture by holding down a key and dragging mouse forward/backward in 3D viewport, without needing to use Texture Rotation slider under landscape tab. Post.

Features which increase landscape quality:

1. Pen pressure support for landscape painting. Ticket.
2. Improve landscape sculpt tools.
3. Brush falloff curve editor.
4. Vertical LoDs to preserve heights at far distance.
5. Spline decals. Here’s spline decals in comparison to spline meshes. Thread. Ticket.

Features to increase landscape usability:

1. Terrain editing in run time. Thread.
2. Decals/Spline decals should affect landscape disaplcement. Allows for non destructive landscape editing. Has many other uses i.e spawn a decal upon explosion to create a hole like deformation on landscape surface.
3. Expose terrain heightfield / normal map to material editor. Sample those in terrain’s pixel shader. Weight maps too.
4. Generate the dominant physical material map from the landscape material to better support procedural landscape texturing.

Landscape related bugs:

1. Grass Tool has a large unexpected performance hit in comparison to Foliage Painter. Ticket.
2. Distance based Tessellation has major unexpected ShadowDepths cost when dynamic directional light affects tessellated surface. Ticket.
3. CSM blocky shadowing on smooth surfaces, largely affecting landscape surface. Thread. Ticket.

Added bug report


I had some of those and a few more in this thread, 2 years ago.

don’t forget this one (source):

  • Expose terrain heightfield / normal map to material editor( You should be able to sample those in terrain’s pixel shader. Weight maps too btw.)
    I requested exposing the normalmap 2.5 years ago, only got ignored. but sampling the heightmap and weightmaps would be great as well

It is good to have those requests as one thread, because they depend on each other to some degree.

I can only add this one to the list.

Good stuff! Added to op. :slight_smile:

not sure if you noticed but they added Virtual Texturing to the new roadmap :wink:

^ That has the potential to be extremely powerful indeed.

A few things:

  1. Virtual Texturing is said to be done for 4.17.
  2. Unless I am mistaken dynamic branching isn’t necessarily a performance improvement due to the way how uniform attributes in shaders work. My knowledge on this is rather basic though so someone else should chime in probably.
  3. Layer weightmaps are already exposed, no? You can sample them for procedural grass placement.
  4. Currently (again, as far as I know), it is impossible to define different physical surfaces for procedurally mapped landscapes, you can only do so via layer painting. This probably falls outside the scope of “landscape features” and more into “material features”, but having that ability would be grand.
  5. Another bug (a bit older but probably still there): (If you scale your landscape, procedural grass takes forever to load and completely destroys your fps)

Dynamic branch has small static cost but if threads are coherant and cost of code that can be skipped is big enough then dynamic branching can be huge performance win. I just optimized mobile shadow performance by skipping all parts which are fully in static shadows, normal is pointing away of directional light(nDotL) or distance is bigger than max shadow distance. Only about 25% of pixels actually need shadows after these three conditionals. All conditionals are combined to get just one dynamic branch.

It has appeared on new roadmap, which is a good sign, but I doubt it will make it into 4.17
Worth mentioning that virtual texturing should be integrated with landscape rendering properly.

I guess isn’t necessarily a performance improvement is a correct way of describing it. It is quite situational. Dynamic flow control indeed puts additional strain on them registers, but if used with care, gives appreciable performance increase.
I have some sort of poor man’s metrics in this post.

I think OP meant being able to sample weightmaps with your own UVs, for POM and what not.

Overall, I’d vote for texture arrays (including a tool to make them from texture assets in content browser) to be prioritized, as a feature, that would provide best usability-performance improvement with least implementation efforts.(Surprised, there is no feature request on tracker for this one yet, so I created answerhub post. Make sure to cast some votes and hopefully it will make it onto the tracker :slight_smile: )

“virtual texturing” inspired in MegaTextures initially released with idTech 4 engine?

I would find cool plugins designed especially for landscape editor. A - Maybe Speedtree like procedural plant generation. B - World Machine Like procedural landscape generator using nodes. Complete. C - Dynamic Weather system (seasons and meteorological phenomena).

Artists should be let to choose what surface type the decal can be projected to i.e landscape surface only. Without that, decal is projected on everything within the volume and that makes decals useless for ground. Notice dude’s feet.

deferred decals inherently have this ‘all or nothing’ way of working
in your case I think the “preferred method” is to make your characters not accept decals (do you actually need them to?)

While we can select every individual mesh we place in game world and uncheck “Receive Decals”, it’d be more productive and time saving to select a decal and uncheck “Affect Static Meshes”.

it would, but this goes against the concept of deferred decals and its technical implementation and limitations.
to add some sort of filtering system into the deferred decals would mean making it more expensive for everyone and everything (though I cannot pinpoint how much). ZoltanE describes it here: How to set which decals to accept? - UE4 AnswerHub

If Spline Decals are to be implemented (which is really easy btw, but does mean you’ll have to generate Quads and UV’s on the CPU probably) - they should be implemented for everything, not just Landscape use.

I actually need Spline Decals for a project I’m working on, so if I get around to it I could always submit a PR. If anyone has some existing code to start from, that’d be helpful.

Same here, I desperately need Spline Decals for use on static mesh terrain. The UE4 landscape simply doesn’t allow for the level of terrain detail required plus there is no way to clearly define different areas of terrain by a clean, material type transition. It sure would be nice to have a 3D bezier spline option where you could draw a shape on the terrain and then use the spline as a constraint to fill the shape area with a material. The Landscape paint tools are so limited in present iteration:(.

Two other issues:

When using a mask for brush when painting landscape, the mask has a rotation option, it’d be cool to be able to hold down a key on the keyboard and move the mouse forward/backward for rotating the mask. I’ve made the same request for increasing/decreasing brush radius and intensity.

Another problem with using landscape spline to create roads is if at any point one needs to delete the landscape, or export it, modify it a bit and re-import it, all the splines are lost and the work is gone. So that’s another reason to have spline decals.

OK, I am new here, so forgive a grommet.

How many Levels of Detail can you have in Unreal Engine for Terrain? Is it restricted to 2, or could you conceivable go to 23 levels like in most Terrain Servers.

That leads me to the question of using a terrain server like Cesium. Has anyone interfaced that into a global Unreal Engine?


This thread deserves a bump.