 Hey everyone, welcome back to GameDev Academy. I'm Shane and in this video We're going to be taking a look at LODs inside our Unreal 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 like a cable rail that I brought into 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 LOD zero, 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 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 some LODs 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 prop 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 brought in yourself this would now overwrite them, but I don't so I can just click on yes It'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 The LOD picker 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 LOD 1 Which is a 12,000 LOD 2 which is costing 6,000 and LOD 3 Which is just 3,000 As you can see as we swap through each one There's not much between them on real 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 LOD 1 So let's just zoom in a little bit So that's when we are on LOD 0 so when we're right on top of it It's showing us all the triangles. Well, 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 out a bit further That's between One and two happening 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 LOD 3 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 just change from lit here to wireframe As you zoom in you can actually see the wireframe changing there you can see the extra triangles are kind of popping in And how that affects your mesh There we are. 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 LOD 3 which appears to be the same But we can go all the way up to four which gives us 1500 triangles and now five which gives us 700 and you can see that this actually looks quite ropey now close But again, let's just go back to auto and we'll see when that 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 LODs? So let's say that I'm not happy with this LOD five 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 LOD five 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 given us 3.125 percent 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 seven hundred and eighty four triangles Up to one thousand and four 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 that LOD well, I can't do an LOD zero. I don't think I can anyway Oh, no, I could so I could make LOD zero lower if I wanted to but generally you don't want to do that because that's your original model Um, but let's say the LOD one is too high for me So let's just see what LOD one is. That's 12 000. We don't want 12 000. So we'll go into the reduction settings It's saying 50 percent But I actually want this to be more like 30 percent 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 LOD five 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 Well, that's holding up quite well. Let's try zero point five. 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 of that won't happen. I'm I should be on a lot or two 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 the unreal engine has really outsmarted me I think it's now changing where this transition happens because I made it smaller Um, which was the point that I wanted to show you anyway, so we'll still go through it So let's say that 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 going to go where it says auto compute lod distances. We'll turn that off And then we're going to change the lod five 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've got that wrong. It should be 0.0 64, 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 we'll 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 lod's 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 lod five Or maybe lod six 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 We could set that to four or what you can do instead So we'll just put that back to zero Now what 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 lod zero and in fact we want this to always start at lod two What that now does is reduces the quality of that and if we just go to 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 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 It 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 lod 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 haters 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