Procedural foliage disappears/flickers when camera turns? (video)

Why does my foliage do this? Sometimes it flickers like crazy as well :frowning:

https://www.youtube.com/watch?v=6O6YamYWs-8&feature=youtu.be

Still stuck on this! My foliage is in a sub level of a large tiled world. I don’t get this problem if it’s in a basic map with only one level. Could be to do with the world origin changing maybe?

Did you ever figure out what was causing this? We are seeing the same issue currently and can’t figure it out. We are also using sub-levels with world composition.

Hi sbounds, yes I did work it out!

Make sure the procedural foliage spawning volume is placed in the correct sub level and it does not go over the edge of the level bounds.

Never place foliage in the persistent level!

Hope that works for you :slight_smile:

This did not fix it for us.

We have the following repro steps to confirm it is world origin related.

  1. Create a world composition world with a single tile (about 1km x 1km)
  2. Place down a foliage spawn volume, doesn’t matter what foliage it spawns, just make it fairly large over the tile
  3. Play in editor, and walk away from the volume.
  4. In the console, call SetWorldOrigin
  5. The foliage will now start flickering based on camera orientation

At a guess, the instanced foliage hit box transforms are not being updated correctly to reflect the world origin change

Thanks,
Ben

This hack is what ended up fixing it for us, placed in the BeginPlay event on the player character. I can’t remember where I got it from though to credit who figured it out, either here on answerhub or a forum somewhere. Would rather have a real fix though.