Improve UE5 Performance with LODs - AUTOMAGICALLY!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back to Game Dev Academy I'm Shane and in this video we're going to be taking a look at lods inside of our mail engine 5. specifically how we can have Unreal Engine 5 create them for us so as you can see here I've got this model of Leica cable reel that I brought in to work with and if we open that up we can take a look at the triangle count so if we look up here this is currently costing us 25 000 triangles which is a bit high for what is essentially just a level prop so we can do some work on that to bring the triangle count down and more importantly to manage that with LOD so at the moment if we look up here LOD Auto we only have the option of lod0 which means there are no other lods here so we need to look at what we can do to create some to get us going so here we are in the static mesh editor and on the right hand side of the screen we've got some things related to LOD so I've just um closed the nanite settings because we're not using that and then we're going to go to the LOD picker and if you go to underneath the LOD settings we've got LOD group and this is where we can have Unreal Engine just create similarities for us automatically so or automagically so let's go from none and we can change this to whatever we want now I think this is actually going to be a large prop in the level so it might be scaled up quite large you could also try small prop these all do slightly different things they're just different presets but we'll go for large Pro now it's going to give us a warning telling us this is going to overwrite any other LOD settings if you had any that you'd brought in yourself this would now overwrite them but I don't so I can just click on yes I'll do a little bit of thinking and now that's done I can see that my triangle count has gone down to 12 500 which is nice uh the LOD pick is still an auto but now if we click on this we can see that we have 0 1 2 and 3 different lods they always start at zero so this is going to be our nearest or our highest quality LOD if we click on that that's still the 25 000 that we started with but now we can work our way through to lod1 which is a 12 000 lod2 which is cutting 6000 and lod3 which is just three thousand as you can see as we swap through each one there's not much between them Unreal Engine does a really good job of keeping a good silhouette and having it look nice and what we'll also do is we'll just zoom out and we'll see these change so if we now go back to LOD Auto up here it's telling us that we're on lod1 so let's just zoom in a little bit so that's when we are on lod0 so when we're right on top of it it's showing us all the triangles let's just slow my camera speed down and we'll just pull out slowly so that's where the transition between zero and one takes place and you can hardly see that happening let's go up a bit further that's between one and two and then again there's a little bit here that we can see but very little change and then we zoom out a bit further and that gets us to lod3 so that's how we can tell that these are changing what I often do to see how the transitions are going as well so I'll just change some lit here to wireframe as you zoom in you can actually see the wireframe changing there you go you can see the extra triangles are kind of popping in and how that affects your mesh there we go so that's all of them like that we'll just go back to lit you can if you want choose to have more or fewer lods so this setting here number of lods is set to four that's zero one two and three but let's say that I wanted six I could move that up to six apply changes it'll think about it again there we go and now we can see that we're currently on now D3 which appears to be the same but we can go all the way up to four which gives us 1500 triangles and now 5 which gives us 700 and you can see that this actually looks quite a roping our close but again let's just go back to Auto and we'll see when the LOD kicks in and whether or not we can tell the difference so let's pull out so we're still on three there's a change to four just happening there I can't really see the difference in that transition let's see when it changes to five and if we can see that one and this is actually happening at such a distance it is visible but really only just visible and again that's kind of the magic of lods because these transitions should always happen at a large enough distance that you can't see them happening but what if you're not happy with some of these LEDs so let's say that I'm not happy with this lod5 I think that actually the number of triangles is too low and I'm not happy with it well here's what we do over here we can go from LOD Auto to lod5 it gives us some of the settings for it and there's this reduction settings here so we can open that up and that's now saying that it's giving us 3.125 of the original number of triangles that we started with but let's say I want to have four percent so I can just type that number in there and then click on apply changes so that's now going to take us from 784 triangles up to 1004 and that actually is now a much nicer silhouette than I had previously so that's one thing you can do and you can do that for any of your LOD so if I decide the LOD well I can't do an LOD zero I don't think I can anyway I know I could so I could make lod0 lower if I wanted to but generally you don't want to do that because that's your original model but let's say the lod1 is too high for me so let's just see what lod1 is that's 12 000 we don't want twelve thousand so we'll go into the reduction settings it's saying 50 but I actually want this to be more like 30 and then we can just apply that change and then I would probably go through and reduce all the other ones to make a similar sort of change so that everything is lower than the one before it one other setting that you might want to change so um let me just reduce lod5 right down so let's bring this down to two percent first so let's just apply that quickly change my mind let's try one percent I want this to be really low I kind of want it to look like ass because we need to try and disguise this by making it far away wow that's holding up quite well let's try 0.5 Jesus so this should only be about 125 triangles yeah there you go so now this looks very boxy that's kind of what I was going for so let's just have a look at where this change happens so when it goes back up to four oh that won't happen I should be on a lot of Auto so we're currently looking at four let's just zoom right out and see where this transition takes place and it should now be quite noticeable do you know what I think it turns out that Unreal Engine has really outsmarted me I think it's now changing where this transition happens because I made it smaller and which was the point that I wanted to show you anyway so we'll still go through it so let's say that um this transition starts closer in so let's just speed this up a little bit so let's say the transition happens here so we're gonna go um whether it says Auto compute LOD distances we'll turn that off and then we're going to change to lod5 and let's say So currently we've got the current screen size 0.64 so I'm going to set this to 0.64 here 0.64 and then we'll just apply that change so I got that wrong it should be 0.064 which is where the current screen size is and then this should now change based on that distance so now let's go to LOD Auto and we can now see that transition is happening too close and this can happen to you and it can become really noticeable so what we do is we work out roughly where we want that transition to take place so let's now zoom out a little bit and say I'm probably not going to be able to tell here 0.03 so now we go back to five and we set this to 0.03 like so and then when we go back to auto that's now where the transition is happening it's much further away and we can't tell once again and as we get closer those lods work their way back up so let's save that we've now got some LOD data there's just one other thing that I want to show you that you can do if you choose to so here's that same asset in our map and you can actually scroll down in your details panel here and there is an LOD section when I can find it here it is LOD and what you can do is force an LOD model so let's say that I want to force lod5 or maybe lod6 there you go that's oh my goodness that's what that one looks like so you can force it to show one if you want to keep the polygon count low forever uh we can set that to four or what you can do instead so we'll just put that back to zero now was that set to one no back to zero there we go what we can do is override the minimum LOD so let's say that we never want this to use lod0 and in fact we want this to always start at LOD too what that now does is reduces the quality of that and if we just go to um show Advanced and mesh edges I can show you that changing so here's what it looks like now and if we change that minimum LOD back and that's the triangles we started with so we can set that to one and what's good about this is the LOD system still works so if we zoom out you should be able to see that that's changing there you go but it won't show anything higher than that LOD let's Now set that back to zero as we get really close up we can see that it does make that difference and that is everything I have to teach you about lods today so hopefully you found this video useful if you did you know you need to hit that Thumbs Up Button tell YouTube about my channel give the algorithm all those good signals apologies for my recent Hiatus in getting videos out what was happening is I was giving myself projects that were too big that were too daunting and I was not really able to get into them so I think what I need to do just for a while is some smaller scale videos just get some out there share my knowledge with the world get back into the groove and then hopefully those bigger projects won't seem quite so daunting anyways all that's left for me to say is thanks for watching and hopefully I will see you in the next video which shouldn't be too long all right bye
Info
Channel: Game Dev Academy
Views: 23,407
Rating: undefined out of 5
Keywords: LOD, Level of detail, Unreal Engine, UE, UE5 Unreal Engine 5, EU5, optimize, performance, frame rate, settings, manual, manually, transition, distance, reduction, change, epic games
Id: NqotFqrRWeo
Channel Id: undefined
Length: 11min 12sec (672 seconds)
Published: Mon Oct 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.