Landscapes and VR

Hi,
For our VR project we need a landscape of about 4 x 4 Km. Can we render that efficiently using Unreal? We will need very high resolution (8K headset) with high frame rates (90 Hz). Is the Unreal landscape rendering capable of doing that? We can use a RTX2080Ti for this.
And if we also need canyons with overhangs and caves, can that be done with the Unreal landscape feature?

Hi, you mean 8k final resolution not per eye, right?

Whats gonna break you’re performance is the 8k resolution regardless of the engine you use (and I’m not sure whether an RTX2080Ti will be enough).

I benchmarked some tests with an RTX2070 Super (first with an 1080p monitor with 400 screen percentage (that should be 8k), then with an oculus rift s headset 1440p at 250 screen percentage (8k would be 300 screen percentage but then something breaks completly))

At all tests I set the post process quality to 0, rest is at epic settings with the deferred renderer (for VR you would want to use the forward renderer due to MSAA)

1080p at 400 screen percentage with the default unreal engine map (just the sky an directional light and a small platform, so an nearly empty level)

1080p at 400 screen percentage 4kmx4km landscape with 3 layers

1080p at 100 screen percentage same view as image directly above

vr 1440p at 250 screen percentage same level as directly above (so 4kmx4km landscape) but maybe a little different view

vr_1440p_250screen_percentage.jpg

And that’s an image of the level with the landscape

I think an RTX2080Ti has around nearly double the speed of my RTX2070Super and for a nearly empty scene the forward renderer should be faster than the deferred renderer.

If you spend that much money on hardware, I recommend that you buy/use a dedicated tool to build landscapes (I use world creator 2) and then import the landscape into ue4 for further changes, the landscape looks way better and you need less time to build it.
When you build a landscape you essentially altering a heightmap texture, therefore you can’t build any overhangs or caves. Want you can do, is paint holes into the landscape in ue4 and then put a cave mesh there (obviously overhangs would also be separate meshes).

Also I recommend you watch the unreal learning video “An In-Depth Look at Real-Time Rendering” on the learning tab if you haven’t already, cause you will be pressed for any performance optimization you can get. [HR][/HR]
And the complexity of the landscape material:
landscape_shader_complexity.png
The landscape has 3 layers. First one is grass and rocks and blends them based on the normal (slope) and then with a heightblend and also blends in the dirt using noise textures and heightblend. Second layer is sand/mud using weight blend with the first layer and the last layer is only for the spawning of procedural foliage (it specifies where the dirt is).
Also I still got all my logic to automatically spawn several different grass types based on a combination of noise textures to break up the else monoton spawning of the grass types. [HR][/HR]
Now I tried to optimize this landscape above (first by changing some of the lod settings, then by additionally using this same landscape with a lower precision).
Again with post process quality at 0 and with the deferred renderer and the landcape has no material assigned to it (default grid look).

The format is
resolution ;;;; gpu time in ms ;;;; drawcalls ;;;; tris count

Without Landscape (just the default map without the atmospheric fog and without the sphere reflection capture):
1080p ;;;; 1.98±0.04 ;;;; 64 ;;;; 3968
4k ;;;; 3.03
8k ;;;; 11.68

With landscape and with default settings
1080p ;;;; 2.18 ± 0.04 ;;;; 236 ;;;; 307000
4k ;;;; 4.52
8k ;;;; 15.90

Changed lod settings (LOD 0 screen size at 0.8 instead of 0.5 and Other lods at 1.2 instead of 3.0):
1080p ;;;; 2.08 ± 0.04 ;;;; 255 ;;;; 70300
4k ;;;; 4.20
8k ;;;; 16.10

Using lower precision 4m instead of 1m and default settings
1080p ;;;; 1.98 ±0.04 ;;;; 104 ;;;; 223232
4k ;;;; 4.00
8k ;;;; 14.47

Lower precision with changed lod settings (same lod settings as above)
1080p ;;;; 1.98 ±0.04 ;;;; 109 ;;;; 85536
4k ;;;; 3.84
8k ;;;; 15.24

It seems that those changed lod settings boost the performance in 1080p and 4k but cost performance in 8k and also slightly increases drawcalls and nearly the same visual quality. Using lower precision gives a performance boost at cost of details in the landscape (4m precision instead of 1m).
Keep in mind that this is only one possible configuration of lods and I never touched the tessellation settings. Further this is using 2x2 sections per component. 1x1 section per component would slice the drawcalls down to about 1/4 of what the landscape uses above but may increase or decrease overall performance.
At 1080p the cost of the landscape with lower precision seems to be inside the fluctuations of the gpu time, therefore not visible here in comparison of without any landscape.

If you would need an even further performance boost you might wanna try slicing the landscape down into static meshes and use those as suggested further below that might or might not give you a further performance boost depending on the system and the situation your use it in.
Before implementing such a system keep in mind though that then you won’t be able to use those features specifically designed/optimized for the landscape system (which might be a pro or con):

(landscape lod system, landscape grass node, landscape layer blend;;;;;;;;;; sculpting, painting, procedural foliage per layer)

In my opinion the last four points mentioned won’t be much of an impact as you would slice your landscape only once you’re finished with it. But without actually implementing such a system I can only guess it’s strenghts and weaknesses compared to the default landscape system.

Hi chrudimer, thx for the benchmarks!

What I do not understand is why an almost empty scene still takes 15 ms!
And why is there a factor 8 frametime difference between the 400% and 100% landscapes?

I see that the “An In-Depth Look at Real-Time Rendering” is a course of more then 3 hours! nice! I will start tonight!

I don’t know enough about the deferred renderer to answer that one, but I heard several times, that the deferred renderer has a somewhat high default cost, whereas the forward renderer has a lower initial cost, but then goes steeper up.

That’s with forward rendering in the same almost empty scene (again with post process quality at 0) with 1080p at 400 percent resolution (so 4320p/8k).


I just saw that in the default map there is atmospheric fog (that’s atmosphere in the profiler, and took 2.95ms in the deferred renderer and took 2.49ms here). In the landscape map there is no atmospheric fog.
The other big part here is TAA (TemporalAntiAliasing) and with MSAA instead the frametime is around 14.7ms at 375% but breaks at 400% (more than 100ms, so I’m not sure I would trust the 375% completely either but MSAA is more taxing than TAA and the 14.7ms is again with the atmospheric fog).
And I’m not sure why there is still such a high post processing cost, even though it is set to 0.

So for VR you would want to use the forward renderer instead of the the deferred one.

100% means the game is rendered in a resolution of 1080p (cause I have a 1080p monitor) and 400% means the game is rendered in a resolution of 4320p (4 times the native resolution). Therefore the frametime goes up.
Incidentally with post process quality also at epic settings, it only costs around 0.3ms at 1080p, and around 2.4ms at 4k but more than 30ms at 8k (but you can set post process qualtity to 0 at 8k, then that solves this one).

So it seems to me there are some things in the engine that don’t like 8k (everything is fine with 4k but postprocessing, vr and msaa break at 8k, so take up to 30ms/100ms+/100ms+ frametime). I’m not sure whether this is specific to my computer or a general thing though.

When my computer finishes compiling shaders for the forward rendering I will also post the performance of the landscape map with the forward renderer.

You should run the benchmark after exporting the landscape to FBX and importing it back as a static mesh in a new level.

You’ll likely find that the costs are overall lower (especially in the latest engine).
using world comp is even more expensive on the render for the same single tile apparently…

The landscape material and his complexity will also drastically impact the render times - drawcalls required for the components and all that.

Ok, this is now the same landscape again with post process quality at 0, this time with the forward renderer.

Forward Renderer 8k with TAA as anti aliasing.

Forward Renderer 8k with MSAA as anti aliasing


With MSAA as anti aliasing the render time was around 7.5ms at 200%, so 4k and around 14.2ms at 300%.
[HR][/HR]
Also what headset are you using? If you’re using the pimax 8k then as far as I understand it only renders at 1440p per eye (due to limited bandwith in the connection) which will result in a combined render resolution of less than 4k.
[HR][/HR]

If you want to do this, sure go ahead, create a new landscape with unreals recommended size, so 4033x4033, then use the noise brush and then benchmark it :slight_smile:
But I strongly assume this will be **way **slower in this case here, and you will have a problem to even import it, cause https://forums.unrealengine.com/development-discussion/rendering/14101-poly-count-limits

Keep in mind that this is a landscape with 4033mx4033m and with the default resolution of 2tris per 1m^2 that results in around 32.5 million tris always rendered due to no culling and no lods.
As with the default landscape system you will end up with around 0.4 million tris due to culling and lods. You could argue about draw calls, I get around 300 with materials and 240 with the default material. The drawcalls are per section, so I have 2x2 sections per component, if you would use 1x1 then that would reduce drawcalls but you would have less culling (pros and cons). With 1x1 and the max section size I get around 100 drawcalls. Keep also in mind that drawcalls are only one possible bottleneck, there are many more and reducing one may increase another one.

So it’s up to you to show that a static mesh is faster here (I’m sure there are cases where one single static mesh makes more sense, but not here)

Everything in unreal engine has pros and cons. I don’t think there is that one approach that works in all cases. As far as I used world composition it increased my performance (Incidentally world composition was nowhere mentioned in this topic before and I did not use it in those benchmarks).
You shouldn’t just post such a general statement without talking about the circumstances (how you used it) and as a bonus, benchmark it, else it will confuse people.
I’m no pro in world composition, only used it a couple of times, but I would strongly assume that there are situations where world composition will decrease your performance but this does not mean that it is generally more expensive.
[HR][/HR]

At last this is the link to one of unreals doc about landscape Landscape Technical Guide in Unreal Engine | Unreal Engine 5.3 Documentation
Also you might wanna watch the tutorial video from world creator 2 website where the guy talks about UE4 landscape system and recommended landscape sizes. It’s under tutorials on their website -> world creator to unreal -> the first of the two videos.

Yes the Pimax. But in native resolution mode. Thus 2 times 4Kx2K. So actually it is 8Kx2K in total. So maybe the numers are half of the indicated numbers above. But still to much for 90 Hz frarme rate.

Thanks for all the information. This helps a lot.

Unfortunately you would be incorrect. You can find base benchmark along with repro steps AND sample tile files on answerhub.
Maybe with the forward Renderer this would change.

Re the landscape VS static mesh only you are also partially incorrect.
the landscape saves All the LODs for you on export.
All the different landscape components are properly exported as separate tiles.
This means that with about 10 second work you can take the export, work it, and re import it as separate FBX files you can just drag onto the level.
Being they are part of the same scene you won’t even need to mess around with offsets and positioning.
Assuming you preserved the LODs they will also LOD down to the settings of your choosing.
This also allows you to better control how much detail is visible up-close vs whatever the landscape does.

What you do loose is the ability to paint it like you would the landscape. To some that’s a lot. To others that’s nothing. It depends on what you are doing really.

Therefore, Unlike you suggested, the performance and import should not be problematic at all.
ofc you are partially correct in the sense that IF the whole landscape were imported as a single mesh, then yes, you would only loose performance due to the fact that the whole of it would always render.

If you are seriously concerned about performance, the landscape VS your own set of static meshes offers a somewhat drastic performance boost.
Since I am at the point where I need to swap from the landscape to meshes in my project, I’ll post a benchmark once I’m finished with it.
I’m just coming up with solutions to preserve the paint at the moment.

In case anyone is curious, picture the layer data as a black/white file that marks in white the areas the layer occupies. Exporting this data would allow the creation of a material that can then mask out the same paint areas.
ideally it should function for everything with minimal work and an extra sample on the material for each texture. (And maybe if pushing those to 8k is feasible you would also gain definition vs the base landscape) I’ll update here when I’m done with it and can show the before/after benchmarks.

Also, one more thing I wanted to note that may not be obvious. Material complexity on the landscape will drastically affect the benchmarks.
So, out of curiosity, and for others looking these over.
how many painted layers do you have? What is the total count of instructions on the landscape material? A shader complexity picture would also be helpful in getting a general idea.

Ah ok, cause I saw 2 pimax 8k types, one that takes in a 1440p image per eye and then upscales it to 4k and one that directly takes in a 4k image per eye.

As last thing you might wanna keep in mind, is that you can always render the image at a lower resolution (less then 4k) and unreal engine will automatically upscale it to 4k native resolution. I’ve done the reverse in those tests above, I rendered at higher resolution and that image then got downscaled to my native resolution.

doc on that: Scalability Reference | Unreal Engine Documentation under “Resolution Scale”

Because the screen door effect will be the same both times (both times 4k image per eye) but rendering at lower resolution would increase your performance that you can then sink elsewhere (more divers environment for example). But that’s a tradeoff you would just have to test for yourself to see what looks better, it’s just so that you know that you’re not bound to render at 4K per eye even if the native resolution is 4k.

Yes I would strongly assume that in specific cases using world composition will decrease your performance. Imho this does not mean it will do this in any usecase (and you’re just talking about world comp and landscapes, right?). Would you mind posting the links to those sites, cause I didn’t found them.
So maybe all those tutorials on world creator and world machine about importing a tiled landscape into ue4 for world composition might be useless but I would be careful to assume so.

Interesting, I didn’t know this and since you talked about a single tile in world composition and later on about drawcalls I assumed you meant one single static mesh. How does the lod transition work with the static mesh? Does the whole tile change lod at once, do you see rifts between the static mesh tiles due to lodding? Cause the landscape makes this lod transitions smooth and you can change all those lod settings in the landscape settings (and you can also have different lods for the visual and collision).

But this means you can’t use landscape layer blends and the landscape grass node, right?

Ofc you could mask this black white for each layer and grass type and take shots of it, but with all this it seems to me you’re trying to reinvent the landscape system with less features and would have to redo all these steps again if you want to change anything, but ofc without any performance benchmarks I can only guess the pros and cons :wink:

Also you might wanna keep in mind that you can use vertex painting for your static meshes instead of the landscape layer system (then you could directly paint on your meshes without the need to take images from your landscape). Ofc you would then store the data in the vertexes, and I’m not sure what that would mean for performance.

And yeah assuming you did this swap with an 4kmx4km map the benchmarks would be really interesting to see, but of course any landscape size might be interesting too.

Added it above into my first comment here.