Instanced painted foliage disappear when too much instances on screen

I’m actually using painted foliage on a static mesh.
I’ve got a hug amount of instances : 4 different meshes from 3k to 650k instances each. It’s not for real-time using, but cinematic rendering - so fps doesn’t matter a lot.

I’ve got an issue with my foliage : depending of the camera view, some elements disappear : an entire mesh (all instances of if in the foliage actor) or just part of the mesh (all parts of the samed ID). See attached pics :

The only difference between both images is the orientation of the viewport’s camera - showing more elements in the second view : All of the tiny instances have disappears, as well as the purple part of the big ones ans the leafs and flowers of another big element. Yellow ones are unchanged (but the yellow part disappears if I turn much more).

Is there a parameter to change that ? I’ve tried the opacity mask clip value in the material, it doesn’t affect this issue. I tried tweaking the engine scalability levels but it doesn’t correct the problem either.

From my own experience, Instanced Static Meshes in general seem to be buggy sometimes and some functionality was simply broken for numerous engine versions. Even in the latest version I couldn’t update them in realtime on my AMD graphics card. At some higher number they just disappeared. Now I got an 1060ti and everything works fine.
There was another issue similar to what you describe some versions ago and I was pretty sure it was resolved already though.
I know it’s not really an answer, but keep in mind if this doesn’t get enough awareness, Epic simply won’t care.

The only thing you can do is writing a bug report to the new bug submission form. But I already sent my problem and never got a respond, probably because they couldn’t replicate it on their hardware.

Thanks for your answer !
Actually I’m working with a 1070, latest drivers and UE 4.20. After some tests with stats displayed, it looks like passed 100M* triangles in view some parts start to disappear. But it seems to depend of many parameters (what’s seen in background, shaders, lighting…). So I guess your answer sounds right, and I’ll manage to submit an issue and wait for some answer…

  • I edited… not 1M but 100M. That’s quite a difference :slight_smile:

What you’re looking for is actually the console comand foliage.MaxTrianglesToRender set it to value about 200000000.