World Composition And Basic Level Streaming - Unreal Engine 4 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys and welcome back to another engine 4 tutorial in today's video i'm going to be going over world composition so it's not much to look at straight away like that it's more about what's going on behind the scenes and optimizing your game and stuff like that and also be showing you kind of basic level streaming as well the level streaming isn't too much but obviously you get the basics of it in which you can adapt further on so you can see we have our landscape here again i haven't done anything really i've just made some mountains in the corners to show you loading and unloading and you can see we have our mini map here of our watch composition so this one landscape is actually made up of four different levels and that is again to help with optimization so if we get in we can hit play you can see we're in the middle so all of them are loaded if i just start running over here that is going to unload over there so you can see we've got further away it's unloaded you probably wouldn't want it this close since we're still very close to it but i've just made a small distance just to show you in this short period here for the purposes of the tutorial but i say this is what we're doing today just setting up the world composition then i might do a more in-depth level streaming tutorial later on in the future but we are going to be setting up level streaming today as well so let me delete all this and i'll show you how i've done it so you can see here i'm just in an empty map so now you don't have to have it empty but you don't really want to have any other levels here so when we create world composition we can't have any sub levels we just need to have this one level so you can see here i'm just in mind called main map or persistent level anything like that but it's completely empty for me what we want to do while we're in here is you want to go to world settings over the right here now you might have details you just go to world settings or if you don't have it you go to windows up in the top left and then go down until you find world settings there hit that and you get to take the world settings here once it's here what we're going to do is we want to enable world composition so this is under world so we have enable world composition we're going to tick that like so again make sure you don't have any sub-levels already created because now we're going to create those sub-levels so you see here i have folders for my maps and i have my main map there and i have sub levels you don't need to do that but i just like to do it to keep it nice and organized so this main map is the persistent level which is what is always loaded so this is good for light sources collision stuff like that and then sub levels is the other stuff which you want to load in separately which is again good for the optimization part so to make the new levels we're going to go to window and then we're going to select levels there and now you can see we have it here what i'm going to do is i'm just going to dock it over to the right of world settings here so we have on the right of our screen instead of just the middle again you don't need to do that but it's just nice and helpful like so and once you've done that we're going to create a new one by selecting the levels there going to drop down menu and hitting create new and now you see i have mine on my maps sub levels i'm just going to call this one level one you can name this absolutely whatever you like but level one makes the most sense for me and you can see here the persistent level is blue because that is our current level that we are in level one is kind of grayed out because we haven't got it as a current level and it isn't loaded so we can right click and we just load that like so you can see in the bottom right we have level main map persistent as that's the level we have loaded but obviously nothing else is here because we loaded it but we don't have anything in it so what we're going to do now is we're going to actually create the landscape so to do that we're going to right click on our level 1 or the map you just made we're going to make that current as we want to put the landscape in this level here not in a persistent level so once you've got that as current so it should be blue like that i'm gonna go to modes landscape and we're just gonna make a simple landscape i'm gonna make mine about 15 by 15 so it's about 250 meters by 250 meters and you can see that in the overall resolution there that's the size of meters so i'm going to make mine this big i'm going to set it to the grass material and hit create and you can see we just have this very basic landscape here and what i can do is i can make the persistent level current again and if i right click on level one and unload you see we get this error here saying you're about to unload dirty levels from the world what this basically means is we haven't saved it so i'm just gonna press no save all by control shift s now if i unload it this should be a lot better there we go and you can see we unloaded it and that landscape is gone as the landscape was on that level so if we load it again it's gonna come back like so so when you load up your game and you don't see any levels don't worry you just need to make sure you load them in so again when you load up the engine make sure to load the levels as well now what we can do is you see here on our levels tab again we have the summon levels details and summons world composition if we click summons world composition you see we get this mini map here this is our map of our landscape and this little arrow here is the player so or the camera sorry so as we move around it's going to move in there as well so that's great so now a very easy way to just add more landscapes onto here and add more worlds and add more levels if we just right click on our level which i'll move it to here so i want to have four so that's another thing as well actually you can move this in here and we'll move it in the game like so so i just move around i can just move it in here like that so i want to move it here as this cross point here is the world origin i want to be here so i can have a square around it like so i'm going to right click on the landscape there i'm going to add adjacent landscape level i'm going to add it on the positive x so it's to the right of this landscape as you see by that arrow there hit that give it a name so level two save it where you want and you can see we have a new landscape there so that worked perfectly we now have two there like so very simple very easy to do there is no gap between them this is where it joins and it's seamless like so like i say i want to add four so i'm going to right click on this again add adjacent landscape level plus y level three and we have it there right click add adjacent landscape layer positive x and it is this simple this is how you add a lot more levels to your landscape like so so again you want to start off with well composition before doing all of your level design as this is how you would do it otherwise your landscape isn't going to be divided into the world composition and it won't work properly for you so this is how we've done it now you can see we have this very simple landscape here and this will still work perfectly with our landscape tool as well so you can see this is where we have the lines this cross here where you can't see it which is the point it's perfectly seamless and again i'll show you being seamless with that as well so we go to modes landscape i'm just going to create some simple mountains so we it would be here straight down the middle so i'm going to do is just put this up a bit here and you can see it works on both of the different levels so this is a level this is a level this is going directly across it like so and still working perfectly for us and it's smooth and it works great obviously this isn't a great landscape it's just very simple to show you how it works i'm just literally putting the brush on there like so again if we go back into our mini map this should update on here as well this hasn't updated just yet so what i'm going to do is just unload and load these levels so i'm just going to select them all by selecting the top one holding shift and setting the bottom one right click unload i should save first then unload them and again you'll see these will just disappear as we no longer have them loaded meaning the engine isn't trying to load them and lagging if you have a lot right click load we'll get them all back so that still works perfectly if we go back to our world composition map you see that's now updated we have this landscape on here like so you might not need to unload and load for it to update it sometimes just takes a while but that's a quick way to force it to refresh so again these are two different levels but we have it perfectly like so and now you saw i got a little error there that's just because i accidentally moved it up now that works so again you can select all these and move them all at the same time like so again two different levels but they work seamlessly like so and that is the basics of world composition done what we've done is just created new levels here and we can seamlessly merge them and put different levels on them and create new ones to expand the map as much as we want and a good thing about world composition is it allows more than one designer to work on a map at a time so normally if you just use one level only one level designer can work on it but you see here we have four separate levels so we can have four separate level designers working on each one now someone working here so i'm working here someone working here and someone working here obviously on a much larger scale this is more efficient but this is great for that so we can have multiple people working on it at the same time and one other thing i'll say is when we right click we can add new you might be wondering what's the maximum size well it's quite big if you scroll all the way out you'll see we have this orange box here this is the maximum size we can work on so you can see this is quite big up here at the top left we have a scale let's get this to six kilometers let's see what this is i forgot the exact number i think it's 20 but i can't remember so 6 12 18. yeah it's about 20 by 20 kilometers is the maximum size you can get up to which is very big and also if you want to go bigger than that you just scale everything down if you scale down the player then everything else becomes bigger relatively and you have more scale and you have more size more area to work with again you probably won't even reach that point of it being that large but this works perfectly for what we want to do so now i'll show you how to set up a basic level streaming so you saw at the start if i walked far enough away a certain area of landscape would unload i'll show you how to do that now and like i say i'll do a more in-depth level streaming video in the future so what we're going to do is we're going to hit the plus layers up here we have uncategorized i'm going to hit plus there and this is the streaming distance so i'm going to rename this to be sd for streaming distance and then i'll underscore and put 10 or 10k so sd 10k as i want this to be the streaming distance of 10 000. so i'll then also change the streaming distance to be 10 000 and then i'll hit create now you see we have that layer there if you go into it there's nothing in here as we don't have anything in this layer yet so go back into uncategorized which is the default streaming distance of 50 000. what we'll do is we can select all these levels by holding shift and clicking on them all right click on one of them i'm going to assign to layer sd 10k and then you can see they've gone out of here we go to sd 10k they are now in this level or in this layer sorry so now these will unload after the player has gone 10 000 units away so they'll only load in at 10 000 or closer so if we close this we can hit play to test it so you can see we're in here we have these levels we're walking between four different levels here perfectly which i've just upped my player speed just to walk around this bit faster by the way it's just for the purpose of the tutorial so this is level one level two or three level four there is no difference in the player going between them the world composition works perfectly and seamlessly there so if we go far enough away this should unload so there you go that's now unloaded over there just keep going far away that one might unload i'm not sure i can get far enough away there you go yeah so now we're only on this one here we keep going it will load back in like so so again this works a lot better on larger landscapes and larger areas and you wouldn't want it this close but this does work perfectly so we can unload and load areas depending on the distance player which again is great for optimization especially if you're working on really large maps so i'll just run off the edge there by accident again if you're working on massive maps you don't want it all loaded at the same time this is perfect for that so that is essentially it i've shown you the basics of setting up world composition and the basics of the level streaming distance in there as well so we have this mini map of all the different ones very easy to add to and just right click add adjacent landscape level put it where we want give it a name and now we have it in there and again we can easily see it there there it is and we can easily add onto this as well so we can paint our landscape and or anything we want on here like so very easy very efficient very good for us so that worked perfectly so i think that'll be this video if you don't have anything you want to do like i just went over we've set up our world composition and level streaming which is great for efficiency in your game and we've set up these different streaming distances here so you can see st 10k is this original 4 we made and this new one is uncategorized so we can just right click assign layer sd 10k like so so again i'll be doing a more in-depth level streaming video but if you have any queries on this let me know in the comments down below i'll be happy to help but again basics out of the way and done great for you to be setting up working with other people on level designs or just general optimization stuff like that i don't know if i'm getting a bit repetitive at the end here but you get the idea so thanks so much for watching i hope you enjoyed and i hope you found it helpful and if you did make sure to like subscribe down below so thanks so much for watching and i'll see in the next one [Music] you
Info
Channel: Matt Aspland
Views: 8,757
Rating: undefined out of 5
Keywords: ue4, unreal engine 4, unreal engine, tutorial, ue4 tutorial, unreal engine 4 tutorial, how to make a game, how to, 3d modelling, blender, unity, games design, graphic designer, ue5, unreal engine 5, world composition, level streaming, distance, distances, level, world, streaming, composition, volume, load, unload, un load, un-load, landscape, landscapes, persistent, levels, sub levels, sub, sub-levels, sub-level, sub level, set up, optimisation, optimise, optimize, optimization, level design, design
Id: xeJz26M2xn4
Channel Id: undefined
Length: 12min 30sec (750 seconds)
Published: Tue Feb 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.