I’m new to UE4 and game programming in general. I’ve come across a bit of a strange issue: parts of my terrain are disappearing when the camera through my foliage. This has the effect of creating a flickering when playing the game.
It only happens when the foliage is put in - if it is deleted, the problem goes away.
I’m not sure what level streaming is so I’m pretty sure I’m not using it. I looked up world composition and verified it is not enabled. For giggles, I tested with it enabled - no change.
Just to see what would happen, I updated my video card drivers - no change.
I created a new project, imported the landscape material and static mesh of the tree from the Content Examples and recreated the level - no change.
I also tried in the 4.6 preview - no change
Funny enough, if the landscape is selected when you move the camera through the trees, the problem goes away.
EDIT: It turns out that this problem only occurs if the trees are scaled above 1. If the scale is left at 1 , the problem does not happen. The higher you scale, the more pronounced the issue is.
I noticed these errors when I build - could they be relevant?
Info SM_Dead_Tree Lightmap UV are overlapping by 49.6%.
Please adjust content - Enable Error Coloring to visualize.
Error SM_Dead_Tree Object has overlapping UVs.
This appears to be more of a landscape issue than a foliage issue. Putting the tree static mesh onto a BSP does not cause any problems. Scaling the tree static mesh when it is placed on a landscape will produce the issue (even when not using foliage).
Are you using a custom asset? If so and you feel comfortable with it can you upload the asset to an FTP server and PM me the link on my forum account (same name as here)? I would be more than happy to take a look and see if I can see what is going on.
None of my assets are custom - they’re all imported from example projects.
I can even reproduce the issue in the Landscape level of the ContentExamples project. Just to make sure nothing I have is corroptued, I have reinstalled the Engine (4.5.1) and the ContentExamples - the problem is still reproducable.
If you want, I can upload the assets this evening, but they are just the ones from those examples.
If you create a flat landscape, then set your camera speed to 8 and zoom out with the camera facing directly over the landscape it should start flickering, is that similar to what you are seeing with the foliage?
That is expected and is a known issue, now, try altering the landscape with the sculpt tool and see if the sections you sculpted stop flickering. If so try this on your landscape with foliage and see if it stops flickering as well.
Unfortunately, outside of the flat landscape bug that is known I have not been able to get this to reproduce on my end. We attempted this on both Windows 7 and Windows 8 along with several different assets including the dead tree and speed tree models without any success. Do you have any other steps that we could take to attempt to see this on our end?