4.7 foliage placement shader complexity

Not sure if this is a bug or what but the 4.7 update my the shader complexity of my foliage go nuts. My foliage was placed with the foliage tool and I’m using dynamic lighting. I made the foliage with a lot of polys to cut out the shader cost. 4.7 seems to render them as completely transparent.
here’s a pic 4.6 is on the left and 4.7 is on the right.
Imgur

same tree but the one of the left is placed with the foliage tool.
http://imgur.com/qmKsCsi

Hi, I fixed this yesterday and will be fixed in the 4.7 release. It is a problem with the visualization mode; the foliage cost is not that of translucent. If you’re using code, the fix is here:

https://github.com/EpicGames/UnrealEngine/commit/d3361b5022bf7bdf16b43375f14110ffe0f0ad58

You’re saying it’s only in the “shader complexity” visual mode? I’m getting frame rate drops in “lit” mode too.

The rendering cost for the foliage itself in lit mode shouldn’t be significantly higher than in 4.6 - in most cases with large numbers of instances it should be much faster. Do you have LODs on your foliage? What kind of performance difference are you seeing?

(see
Unreal Engine 4.7 Preview - Announcements - Epic Developer Community Forums for an example of it being much faster)

I’m not using any LODs and I’m getting about 20-30 fps in 4.7 where I was getting 120+ in 4.6

That sounds bad. Can you tell if this is GPU cost or CPU cost? If you turn on “stat foliage” what does it say? How many instances, verts, etc?

Is there lots of foliage culled out in the scene?

Can I see the spew from these commands
stat dumpave
profilegpu

With 4.6 and 4.7

Sorry this is giving you some trouble. We fully expect this provide a great performance boost, in all cases. If that is not the case, it is something we really need to track down and fix.

It’s definitely a gpu issue.
4.6 takes about 15ms
4.7 takes around 22ms
the first is 4.6 and the second is 4.7
Imgur

not sure about the “stat foliage” command doesn’t seem to exist.

Turn on stats in the viewport options. Also stat foliage will not work in 4.6. I would like to see those stats in 4.7.

On the GPU side, those numbers do not indicate a change from 120+ fps to 20. 70 to 50 maybe…

My guess is that it is occlusion culling. The new foliage is not occlusion culled; this is by design. It is unfortunate. Occlusion culling is possible, but it is not trivial and certainly won’t make it into 4.7.

Can you repeat the test from a vantage point where mountains do not block any foliage?

I strongly recommend LODs. You should be able to render hundreds of thousands of trees if you have LODs.

Sorry for the performance loss.

The frame rate was pretty erratic and I was kind of low balling it. If I understand correctly your saying it is the trees not being culled behind the mountain. Here’s a picture behind the mountain and another one similar to the others but with the “stat foliage” on.
Imgur

Thanks for getting on this so quickly. You guys have really surprised me with your response time and knowledge.

When you recommend LODs are you saying to go all the way to a billboard? I only ask because I kind of lied about the LODs. The pine trees have 2 Lods but the grass doesn’t it’s all very low poly(relative) to begin with about 400-600 poly’s per tree.

The last LOD should hopefully be something 16 verts or less. And this applies to both your grass and trees.

Depending on how big that world is hopefully they are also culled entirely at some distance. That tree would be visible for miles, the grass, not so much.

There is an “end cull distance” on the foliage tool. That should be tuned carefully. Before you do that though, you can see what effect that would have by adjusting the foliage.MinimumScreenSize console variable. That is screen area percentage, so like .5 would cull most everything and numbers like .0001 are more reasonable. After getting a feel for that, I would set it back to zero and go adjust the foliage end cull distance to get a similar effect for each foliage piece.

Those frame rates look ok to me and the vert counts coming from foliage look reasonable too.

It does seem like the lack of occlusion culling is hurting you and that does concern me. I am going to think about if I can support occlusion culling.