State of Unreal Landscape System

Ok, so I have been developing a landscape material for some time now. The material was going to use tessellation. Then along came Virtual Textures. After implementing the RVT’s the question was raised, “Do I really need tessellation on a landscape as it can have low performance?”. This lead me onto Virtual Height Fields (Experimental). After trying to get this working, the World Height does not seem to want to show on this mesh. It also leads to there being a landscape mesh and a virtual mesh in the world (unhappy face). So I think, hmm what about Parallax Occlusion Mapping on the landscape instead… nope, as that didn’t work with Virtual Textures.

All in all, I am totally confused as to the best way to produce a landscape that has displacement, is performant and can use Virtual Textures.

Any one else?

Displacement is on either way regardless of anything you do, so you may as well just use that.

In the future the way the landscape works is bound to change - but in favor of the new tools mostly.
We don’t know when and if the tessellation will actually be removed. Or what will happen to maintain compatibility…

The fps of a landscape with tessellation enabled is a lot lower than if you disable it. For me it’s a difference of 18 fps.

Are you in .22 or prior?
It has stopped making any difference at all since then - at least up to .25.
in .26 performance is horrible regardless.

Also check your GFX drivers - make sure it’s up to date.

I’m on UE4.26

I’ll give it a try later, but my guess is like everyone else the proformance drop is unrelated to this.

Regardless of what you do material wise, the landscape still uses tessellation to handle its internal LOD system (since .18 to be exact).
As such having PN triangles or any other type of tessellation value (with a multipleier of 0) hasn’t made any difference in performance in a long while.

If you see a performance drop. First check that tessellation is not “globally” active.
You need to reduce it to 0 after 3 to 5m - otherwise you just overload the scene with completely useless triangles (print your tris count with current, compare to with it off).

Yes. Yeah, making tessellation with distance blend will fix those performance issues for sure.
I’m doing that in OpenLand is it works pretty well.

Virtual Height Field mesh is an interesting concept. But it needs much love to be stable. One major issue is it cannot to negative displacements. (And of-course collisions)

But I assume, the proper solution is to use runtime mesh updates to the landscape itself. I think they did this shortcut because changing that in the code-level can be confusing (or not many people demands for tessellation for landscapes)

I’m trying to get a height or displacement texture to be virtual, so i can write to it and update it on tick. So far i ve got the tessellation working but it is flat. Does not seem to want to use the virtual displacement(as in extrude) when a virtual texture is made. I must not have made it right.


Virtual setting right?

Any ideas?

As far as I understand it, your material can write to a virtual texture output node with base color, roughness, and world height etc. You would then populate the object in your level with two virtual texture assets. One of them is set to “Base Color + Roughness” etc and the second would be set to “World Height”. The material output node then writes to both of these virtual textures for you. Then when you want to “read” the virtual texture in another material you have to include two virtual texture input nodes. One loads in the Base Color VT asset and the second reads the World Height VT asset. To get the values you then pull off the pins from the relevant node that holds that data. That being said, I too cannot read the displacement for tessellation from the World Height VT asset. As displacement is different to world height, I even added the World Position (z only [blue channel]) to the displacment value and then output that to the World Height Virtual Texture. That didn’t work either. The only way I managed to get some form of displacment value through the virtual texture system was to use the Specular pin and put the displacement value in and out of that in the same way as you would the world height. I don’t understand why it is not working correctly :frowning:

One other issue I have is how are we supposed to use displacement and a world height. The world height (world position z only) is used for blending other assets. But how can I also know the displacement to apply seperately?

It’s confusing.

WTH is the world height? > Displacement? or landscape height? i guess what i’m asking is what is the node world height actual used for? I’m confused on that. I was thinking it was used for displacement. You can see my tessellation is working, but no bumpys.

same here. I cannot get the displacement working using the World Height. I used the specular instead as the displacement.

As I said, World Height has been used to blend rock asset bases with landscapes so that they look like they are part of the same mesh.

let me test that hook up to specular. Will reply back

Edit: When i hooked Displacement up to specular. I still get flat tessellation.

In the material that is doing the output make sure it is the actual displacement that is plugged into the Specular pin (ie Do not include the world position z value). Then in the material that is reading it (may be the same material) you need to pull the Specular pin from your “Base Color + Roughness + Specular etc” virtual texture asset (not from your world height vt asset). I masked it for the blue channel too so it is a single scalar value. Multiply that by a vertex normal ws and again by a scalar parameter and then plug that into your materials world displacement.

My Guess is that you are plugging in a texture directly.
You’ll never see a 1cm displacement from a texture at the camera distance you screenshotted.
Multiply the texture by at least 10, and feed it into the world displacement.

i got this error on compile something to do with → FVertexFactoryInterpolantsVSToDS
trying to get full errors. Think it has something with the way i set my normal textures up.

  [2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
[SM5] 
/Engine/Private/ShadowDepthVertexShader.usf(180,2- 
33):  error X3000: unrecognized identifier 
'FVertexFactoryInterpolantsVSToDS'

 [2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
 [SM5] 
/Engine/Private/LightMapDensityShader.usf(26,3-34):  
error X3000: unrecognized identifier 
 'FVertexFactoryInterpolantsVSToDS'

  [2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
  [SM5] /Engine/Private/HitProxyVertexShader.usf(37,3- 
  34):  error X3000: unrecognized identifier 
 'FVertexFactoryInterpolantsVSToDS'

  [2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
  [SM5] 
  /Engine/Private/BasePassVertexCommon.ush(36,3- 
  34):  
    error X3000: unrecognized identifier 
  'FVertexFactoryInterpolantsVSToDS'

   [2021.05.17-17.35.57:965][457]MaterialEditorStats: 
Error: 
 [SM5] 
 /Engine/Private/DepthOnlyVertexShader.usf(30,3- 
  34):  error X3000: unrecognized identifier 
  'FVertexFactoryInterpolantsVSToDS'

  [2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
  [SM5] /Engine/Private/VelocityShader.usf(49,3-34):  
  error 
 X3000: unrecognized identifier 
 'FVertexFactoryInterpolantsVSToDS'

[2021.05.17-17.35.57:965][457]MaterialEditorStats: Error: 
[SM5] /Engine/Private/AnisotropyPassShader.usf(25,3- 
34):  error X3000: unrecognized identifier 
 'FVertexFactoryInterpolantsVSToDS'

i look into its shader and it needs this → FVertexFactoryInterpolantsVSToPS

Can not seem to figure out what is causing this error.

Go back to basics.
Even make a new material without textures and only the tessellation until you figure out how to make it run.

Then you can probably copy paste directly into the actual material and resolve the issue that way.

i had the tessellation working until i added the make material node and the virtual texture. When i hooked up the make material node and set the root material to bevirtual it seemed to break me tessellation bumpys. Still has tessellation but it’s all flat. I will start fresh at it this morning and see what i can come up with.

@MostHost_LA and @3dev Do either of you know if ASTC compression will be used In UE5? or any idea if they are Compressing into ASTC yet? Be nice to see compression straight to the digital tuner.

Found this, Looks like its coming
https://developer.nvidia.com/astc-texture-compression-for-game-assets

That’ll be interesting, but as far as games and even video quality goes, 4k at the proper texel density is enough resolution for just about anything (until 8k is the new monitor standard)