World Composition Foliage LOD

I’m creating a large map using world composition. I have the LODs set up for the landscapes and that is working fine. I am using the Procedural Foliage Tool for trees, rocks, random flora, and the foliage painter for grass. My individual landscapes are using heightmaps which are 505px (so roughly 500m wide). My problem is as follows:

All types of foliage load and render fine with LODs on landscape tiles which are loaded as landscapes, not static mesh LODs. Since I am using the default Streaming Distance of 50,000 (which I want for performance reasons), foliage pops into existance when a tile changes from a static mesh LOD to a landscape. I have tried using the Bake Foliage to Landscape and Bake Grass to Landscape under the LOD settings in the level details for world comp, but all that does for me is change the texture, which looks odd.

I would like to know if there is a way to set up foliage LODs on the landscape static mesh LODs so they don’t pop into existance, but rather stream from a low poly model to a higher poly model as you get closer without increasing the streaming distance or creating custom static meshes based on the generated static mesh.

Below is an image showing the problem.

If you are not using Simplygon, the not-yet-loaded landscape will have LODs encompassing the landscape itself but not the foliage or static meshes inside it. This is why foliage doesn’t appear on the distant landscape and suddenly pops when the distant landscape is being loaded and populated with actual geometry. So you have two options to work around this:

  • either you enable Simplygon (get a license and enable it)
  • or you bake yourself your distant landscape texture with mesh and foliage population. In order to do this, you can use a camera on top of your landscape and take a hires screenshot of it, this will be your diffuse texture. You can apply the texture in the material that is created for your landscape LODs.

Hi,

How did you go about solving this? I am faced with the same issue myself!

Thanks,

Edit: found a solution shared by a dev by the name of Iacopo:

  1. make the LOD level like you have been doing, with the automatic generator
  2. Find the LOD level (it is in a subfolder) Rename the generated LOD level to something else, remember the old name
  3. Make a copy of the actual level with the real foliage, name it to what the LOD level name was and put in same folder as the LOD level
  4. Open that new level, delete the landscape and other things you don’t need, but keep the foliage.
  5. Open the old LOD level you renamed, and copy and landscape static mesh, paste it into the new LOD level you made and position it correct (copy and pasting world position works)

Done! You will need to do this every time you tweak your foliage though…