Landscape foliage performance - Grass vs Foliage

Hello all

i am in the process of making a mid-to-large map for a first person shooter trying to achieve as much realism as i possibly can, whilst also trying to keep up the frame rate to something sensible. now, i will point out i am a seasoned veteran with UE4 so its not like i am totally inexperienced, however for the life of me i have had so many pitfalls with the foliage system given that there is always 4 different ways to do the same thing when making games, and they alll have pros and cons.

where i am at the moment is comparing the landscape layers + grass tool, vs hand painted foliage for speed of production, quality and most importantly, performance. i want all 3… but… i mean, lets face it, that is abit of a dream but i will settle for 2 of them

in everyones opinion - what would the best way to approach said problem.

OPTION 1) landscape layers/grass approach

multiple material functions of grass. mud etc… driving where say long grass, field grass, no grass, wheat field, flowers go etc… sitting in a landscape material with layers, layers driving grass placement.

PROS :

  • fast to implement, pretty much just paint what you want where
  • easy to change density/scale/parameters - change multiples at once in grass file

CONS:

  • even when using the same grass base material to drive 4 different grass types, still gets treated as 4 landscape layers which even though is technically using the same textures/material each time for the ground, gets more expensive on the landscape material very quickly
  • does not seem (from what i can tell) to be grouping anything for performance
  • does not seem to - despite it being the same textures/MF - be able to tell itself "oh, i am the same kind of grass i will treat this as the same performance lookup instead of rendering it again just to tell the grass how to behave

Option 2) Paint your landscape, then paint on your foliage

Same as before, material functions for grass. mud, water etc… sitting in a master landscape material, only we do not use this to drive the grass.

PROS:

  • can reduce landscape layers (just have 1 grass instead of one per grass type) which makes it a lot cheaper on the material/landscape
  • from the documentation has the ability to clump similar assets to reduce drawcalls good for performance
  • more artistic freedom

CONS:

  • a nightmare to manage the entire landscapes foliage, having to hand paint/delete by hand/change
  • not as consistent placements
  • longer dev time to paint the foliage in

i guess my big question that i feel i am asking is - am i missing something? what is the best way to do a mid to large scale map with landscape and foliage, is there some third magical option i am just not seeing? i have read the grass/foliage/landscape documents off my heart and i am not 100% seeing a solution there and i feel it seems like this side of the engine needs some serious optimisation both in performance and usability.

thanks all, i appreciate any feedback of course

Mark

1 Like

Since, you are looking for a larger area. I suggest going with the landscape’s grass output system with a grass type. Performance really depends on how much grass (or any static meshes) you render. Especially, setting the right culling distance.

Here’s how I did it: Improving Landscape Grass Performance in Unreal Engine - YouTube

With the wrong settings, I got 50 FPS & but after tuned them correctly I could get 100 FPS with the same visual experience.

Hi. I’m facing the same question.
I made 2 maps covered with forest. One using hand painted foliage, one using Landscape Grass Type. I notice that the map using the Landscape Grass Type uses more resources resulting in a very low FPS.
I wonder why the Landscape Grass Type is heavier to compute

Just stumbled upon this thread as I have been doing rounds with the same questions.

I have decided to try out the Procedural Foliage Volumes with hopes that the foliage will get treated the same way as directly painted foliage. I’m just guessing that statically placed foliage will get instanced in groups, culled faster and so on. There are memory concerns here, so probably I will need to go for just landscape layers though.

If there is someone out there who took his time to check out the UE source code and how it is working internally, please bump this thread.

The answers I hated the most were the usual: use culling, disable animation and such. Well - those are obvious general ways of tweaking the foliage, but they are parallel to the problem with within the question: what is the most performant way of putting the grass on the landscape.