From the course: Unreal Engine 5.6 Essential Training
Skeletal meshes - Unreal Engine Tutorial
From the course: Unreal Engine 5.6 Essential Training
Skeletal meshes
- [Instructor] When we have a lot of assets in our scenes, sometimes the geometry can bog down Unreal Engine. So to help correct for that, we have a technology called Levels of Detail, or LOD, or lod. And basically, it just controls how much detail an object uses depending upon its distance from the camera. So let me show you a quick example. I'm going to use Maya here, but you could do this in Blender as well. So here I have a tree, and I have it set up as what's called an LOD, level of detail, or lod. So this tree, as it gets further away from the camera, notice how that detail changes right there. And then if I get even further away, the detail changes even more. So as that gets further away from the camera, it's presenting less detail. Less detail means less rendering resources, and everything goes that much faster. Now I've exported this as an FBX, which also supports levels of detail. And let's go ahead and show you how to use that in Unreal Engine. So I'm going to go into Assets, and Tree, and that should be a blank directory. And then let's go ahead and import that FBX file. So I'm going to right-click, Import to Current Folder, and then under my Exercise Files assets, I should have Tree_LOD.fbx. Let's go ahead and open that. So for this, I'm actually going to turn off Asset Type Subfolders. And then under Static Meshes, I want to make sure I have Import Lods, or LODs, checked. And let's go ahead and import. And so this imports it directly into that Tree subfolder as Tree_LOD. Double-click on that, and there's all of my assets, a lot of materials, and then the tree itself. So I can left-click and drag this into the scene. And there it is. So now this tree has levels of detail. So if I select that tree and use my Move tool, you can see that as I move it away, there it is, it's changing. And then as it gets even further away, it changes again. Now this is changing a little bit too quickly for me. So let's go ahead and edit the lod in the Mesh Editor. So I'm going to just go into my content browser, double-click on Tree_LOD, and there it is. And again, as I move further or closer to that object, just by navigating in that viewport, you can see it changing. So let's go ahead and adjust this. Now there's a couple of different ways to adjust it. One is under LOD Settings. You'll see we have LOD Group. Now we do have a number of presets. Now typically these work with the assets that you bring in from the Unreal Asset Store. We can have, we do have one called foliage, which might work for this. But let's go ahead and set it up manually so you can see that process. So let's go ahead and make sure that's on None. And then up here, we have our LOD Picker. So if I want, I can click on Custom, and notice how that opens up a couple of different rollouts here. So I have a rollout for each one of these levels of detail. And you'll notice here we have a screen size on each of these. Now that screen size determines when that object switches. Now in order for these to be activated, you can see they're grayed out right now. We have to go down and make sure we have Auto Compute LOD Distances checked off. And when I do that, those open up. So let's go ahead and change some of the screen sizes here. So LOD 0, we're going to leave this at 1. LOD 1, let's go ahead and make that say 0.6, and then LOD 2, let's go ahead and make that say 0.2. So now, as I move away, you can see, there it goes. It changes when it's 0.6 of the screen size, and then we can go even further away. Maybe that's a little too far. There it goes. Okay, so let's make this instead of 0.2, let's make this 0.3. So 1.0, 0.6, and 0.3. Now, once you've got that, all you have to do is just close that window, and it should save out. So now as I move this away, you can see it's changing a little bit later, and then there it goes. Okay, so now I've got my level of detail set to work in this particular scene, and it should render those trees a lot faster, particularly if we're going to do something like maybe a forest where we have a lot of these. So levels of detail, or lods, are a great way to keep your geometry load light in Unreal engine.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.