BOOST Foliage Performance In Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I've just been running into an issue with foliage and Unreal Engine where I'd get a massive frames per second drop let me demonstrate it for you and we'll get to the fix in just a moment let's go into the foliage painting tool and I'm currently using European beach from Mega scans which is their tree pack they're currently set to nanite so let's drag one of these trees into our foliage painter so you can see my frames per second here pretty much almost maxed out let's see what happens when I start painting paint along the horizon paint paint paint after having painted 466 trees our frames have dropped from north of 100 to 18 frames per second which is drastic what's going on now in the foliage Tab and with my tree selected I can go down to my shadow settings now if I turn off cast shadow which you wouldn't want to do really you want to raise the cast Shadows but you can see that there's a small performance bump to up to 32 frames per second not really the increase I'm looking for here so I went looking for other answers it is in fact the world position offset part of the material for the trees that's causing the problem let me show you what I mean if we open this tree you can see that it's blowing in the wind which is lovely but this is what's causing our problem so let's go into the master material which is uh all the way at the bottom of two materials M A foliage okay so in MA foliage there's our world position offset pin I'm just going to delete that connection like that destructive but needs to be done that has bumped our performance up considerably now we're getting North of 60 nearly 70 frames per second and you'll see when I turn Shadows back on we're still getting that performance unfortunately now we have a whole Forest of trees that are not moving so what we're going to do is we're going to make sure that we can have some trees in our foreground that move while the rest of the forest is static for performance reasons to make this work what we're gonna have to do is duplicate this mesh along with three materials simply right click on it and select duplicate and I'm just going to give it a wpo extension to distinguish it from the original mesh so now we're in the mesh viewer here and you can see on the right hand side there are five material slots and as I say we only need to duplicate three materials the first one we need to duplicate is the first one which is two-sided European beach field which is the foliage mask so we're going to reveal that in the content browser is right here right click on that and duplicate same as we did with the mesh wpo now double click on that material to find the next one we're going to duplicate we're going to scroll to the bottom you can see the parent material is called Mai European beach field this one will also reveal in the content browser so right click on that one as well and duplicate same again wpo double click on that one it wouldn't be Mega scans without materials within materials so there you find ma underscore foliage the master material where we disabled the world position offset we reveal that as well that one did a completely different folder it's in the MS presets where they keep all the master materials for Mega scans and once more we're feeling duplicate wpo so this duplicated Master material is going to need the world position offset pin reconnected so we've done that and now we're going to add these materials to our duplicated mesh there's our duplicated mesh we'll go inside there we've duplicated our two-sided so we can just select the wpo version of that done now go into that one and replace the European beach field m a i material with the wpo one and finally go into there and replace the master material in a foliage with ma foliage the wpo so now that we have the two kinds of trees I'm just going to add my copied tree into the foliage type make sure it's selected and that my other one is deselected and we're going to paint a couple of the ones that do move into the foreground here we go just a couple of dabs with the brush so now you can see these trees are moving you still have a whole Forest as well now one thing to bear in mind is that this is not a mega scalable process if you want to do a lot of trees we just did one but each of these trees has got a unique material for its leaves and a parrot material as well but if you just want to do a few for the foreground then it's totally fine and it's not going to help performance at all so if any of you do know any more workarounds for World position offset that doesn't eat in the performance as much as this I'd love to know so please pop a comment below thanks for joining me and I'll see you on the next one
Info
Channel: Joshua M Kerr
Views: 102,812
Rating: undefined out of 5
Keywords: unreal engine virtual production, foliage unreal engine 5, foliage unreal engine 5.1, nanite foliage unreal engine 5, nanite foliage 5.1, nanite foliage ue5, nanite foliage performance, nanite foliage wind, nanite foliage ue5.1, nanite foliage unreal, nanite foliage shadows, nanite foliage optimization, nanite foliage not working, ue5 nanite foliage performance, ue5 foliage performance, unreal engine 5.1 nanite foliage performance, unreal engine, unreal engine 5.2
Id: fjuLE3Artic
Channel Id: undefined
Length: 5min 8sec (308 seconds)
Published: Thu Apr 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.