x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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. http://imgur.com/j3k6Ir4

Product Version: Not Selected
Tags:
more ▼

asked Dec 17 '14 at 08:06 PM in Rendering

avatar image

sanford87
51 8 9 11

avatar image sanford87 Dec 17 '14 at 08:10 PM

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

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Dec 18 '14 at 01:59 AM

avatar image

JackP_oldaccount
1.3k 37 11 47

avatar image sanford87 Dec 18 '14 at 02:57 AM

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

avatar image JackP_oldaccount Dec 18 '14 at 03:00 AM

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 https://forums.unrealengine.com/showthread.php?54610-Unreal-Engine-4-7-Preview&p=194325&viewfull=1#post194325 for an example of it being much faster)

avatar image sanford87 Dec 18 '14 at 04:11 PM

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

avatar image Gil STAFF Dec 18 '14 at 05:03 PM

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.

avatar image sanford87 Dec 18 '14 at 07:15 PM

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 http://imgur.com/0M5PdbL,uzb1DOS#0

not sure about the "stat foliage" command doesn't seem to exist.

avatar image Gil STAFF Dec 18 '14 at 07:37 PM

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.

avatar image sanford87 Dec 18 '14 at 07:58 PM

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. http://imgur.com/HFOKykc,TlnicGL

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.

avatar image Gil STAFF Dec 18 '14 at 08:14 PM

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.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question