UE5 Minimap from World Partition Tutorial for use in-game and in-editor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I'll go over how to generate a mini map texture from your world partition levels this can be useful for iname and it's also very useful for uh an editor just to make sure that you don't always have to have everything loaded and you have a visual representation of where you are I'll go over details of how to set up the bounds of your mini map and how to exclude certain data layers in this tutorial I'll just be excluding gameplay and also which type of capture we want so with shadows a final pass depth pass and in this case just diffuse the texture that's generated um you could take a screenshot and then you can modify as much as you want in Photoshop or Affinity designer and then it can be useful for maps in your game or mini maps for this tutorial I'll be using the lra sample project and I'm using the 5.41 you could use your own project as well and as long as you're implementing or using the wall partition in some of your levels you'll be able to generate a mini map from it and if you have a level that you're interested in converting to a world partition level you can always navigate to uh tools and then convert level and this will convert your level to uh use World partition World partition has been incredibly useful for me for my project because the world can get quite large and it makes sure that you don't always have to have everything loaded and also it has this really nice feature called one actor profile where they're all saved at separate U assets so you can modify some actors in the level push or submit that change into uh Source control and you can do all that without checking out the level uh so there's less toe stepping and it's just really nice to work with all right so I'm going to go ahead and open up the map called Lore expans so this is a map that's already using World partition and the first time you open it you'll see that there is pretty much nothing in the level or it seems like there's nothing um so that's because it's using the world partition and to be able to see it uh let's go ahead and navigate to window and then I'll go ahead and open the world setting cuz we'll need that at some point and then window World petition and then the world petition editor so we can sort of see we can see that there's already a mini map it's not the clearest mini map um and this is this is what we're going to play with if we want to load actors inside of the world petition we can just uh click drag to select what we want to load and this is where the mini map comes in very useful because we can sort of preview what's over there and and what we actually want to load in we could always just select that bounding box uh and then I'm going to right click and then click on load region from selection and then depending on how huge your map is it will load it'll just take a little bit of time okay great so uh now that the assets have been loaded the you can see all the assets that exist and yeah if you select an an asset or let's say I'll select these stairs uh and I zoom into the map I can see exactly where that object is and when I play what's nice about this is that it keeps a cursor to where your camera is so at first I thought it was where the player is uh but I looked at the code and also you can see uh I'll just zoom out oh and then right click is to move around um so if I if I rotate around the player uh I guess I'll try to zoom in so if I rotate around the player uh you can see that the cursor is not exactly where where the pawn is uh because it sort of rotates around them um so it's it's the location of the camera or the player Viewpoint if there's nothing showing up here for you it might just be that you haven't generated the mini map yet uh so to do that what you can do is you can either press on build and then build World petition editor mini map uh or you can go to the build menu and then it's under the world partition you can uh build the world partition editor minim map uh so I'll go and do it over here and it'll take a little bit for some reason in Lyra it just turned into gray or just dark and I looked into it and I noticed that the problem was that the it was the sky the sky don't mesh it was it's blocking uh whatever Trace that the the mini map is making uh so I'm I'm not too sure about the Collision presets and whatnot uh but what I did for the sake of this tutorial is I just deleted it and then I just replaced it with the sky uh so I'm going to go to adding or place actor panel and then I'm going to search for Sky okay I'm just going to drop in the BP Sky sphere okay so it's it changes the mood but I think this one has different collisions um if anyone has any idea why that one was blocking the mini map traces uh then please comment I'm going to try this again okay so build and then editor mini map and after that change now I can actually see my mini map if you actually have a really really huge world and you have some sort of skirt I think is the term uh or some mountains around or you just want to choose what you want to show in your mini map uh there's some called the mini map volume uh so again I'm going to go to the the place actor panel and we're going to drag in this world partition mini map volume and essentially in the code if there's no mini map volume it will use the balance of your world uh so if you have a gigantic world then it will take a while um so I'm just going to change the location zero okay there you go all right and then I'm going to just make it fit uh what I actually want to see in my map uh so I'm going to make it bigger and you can notice that there is also uh a world underneath the world and I think it's just a a sequence for the background of the Lara menu so it probably helps if I have the perspective on top but I actually want it to be lit so I can see what I'm doing okay so I'm going to make it a little smaller and this seems pretty good and then maybe I don't actually want to see the roof or maybe there's a certain Z value that I don't want uh so I'm going to do I'm going to switch over to the front oh boy okay so there's a basement also so I'm going to make it tall enough it's bit hard to see uh but here's my line maybe cuz I can see the Grid it's making it a little hard to see okay there you go okay and then perspective maybe I don't want these gray spots or maybe I do want them so i' I've tried to have multiple volumes just to see if I can include specific things uh but I have been unsuccessful because it'll just take in the total bounds of every single volume that you add I'm going to regenerate that map for a while my build kept failing and I look into the details and by the way this was the error that I got so if you ever have this error it doesn't really tell much uh but I looked into the code and it seemed to be something about maybe something that's too small I more or less stumble upon the the solution uh so H this is the result that I got in the end as you see you you can't see the roof you can see the roof over there uh it's nice you can Define what your mini map is um but yeah the solution included just making a bigger image um so if you want a clearer image uh that was part of my video anyways it's it's funny I just ran into this issue right when uh filming okay so how to fix this it's funny that this issue only happens when you have a mini map volume and so it's not taking in the whole world so for the solution uh you can scroll down into your your outliner and then get to the world partition mini map actor uh so this actor only exists in editor by the way uh same with the volume uh so in your mini map actor in the details panel uh make sure to uh change the WHL units per pixel to something smaller uh so it used to be 50 so ESS there were 50 World units per pixel uh so there was probably some calculation where a mid map bias was smaller than zero U which is I think uh onreal units which is 1 cm uh please correct me if I am wrong yeah so this is also the the place where you can set what kind of capture Source you want um so this makes for a bigger image and then here you can choose all these options as so the final color includes shading as well so depends on what you want out of this uh it even has a scene depth so maybe there's some textures you can use out of this so just for for fun I'm going to choose the final color in HDR that should be okay and I'm going to go ahead and or I'll use the other one I will go to build build World petition editor mini map and I'm going to save this cuz I changed this actor all right so that capture is done and now you can see all of the even the weapon pads the jump pads and all that and you can see some shading also and as you can see I keep pressing the middle Mouse button to navigate uh but the middle Mouse actually shows you the distance between uh or the distance of this line in World units which is pretty cool and might as well go through this here um so you can also see the coordinates of Your World petition and your grid uh so one world petition it's about 12,800 um and if I go to my world settings you'll see that this is exactly it so 12,800 are the sell size uh so if you ever wanted change your the cell size of your world maybe your world is a little smaller but more Compact and you need more streaming in streaming out control uh and if you want to preview your grids it doesn't do much in this project because it is smaller than even uh one partition cell uh but you can sort of see the faint outline of the gray and if you have a bigger World you'll see all all the lines all over the place and they will correspond to each cell back at your world partition mini map I'm going to click on that and let's just say that we don't actually want anything of the gameplay to show up on the map uh so the world is set up really nicely in this project uh that it uses data layers and in your world petition mini map actor uh you can actually set some data layers to exclude from the capture of the mini map um so I'm going to add an element and then I'm going to choose the gam playay so I'm going to exclude the gameplay data layer so what is this this is the data layer called gameplay going to go ahead and click on window and then World petition and then the data layers outliner I haven't even looked into the content bundle outliner curious about what that is uh but let's go ahead and click the data layers outliner and I'm going to drag it to the right of my outliner all right so all of these are our ways of organizing your world partition actors into some groups uh so for example if I toggle the gameplay off I can't see any of the gameplay actors uh and I think the ground is also part of the gam playay interesting okay uh layout Model A is different than um also getting rid of the lighting oops oh yeah I guess I can also just select the ey to see or to and there's also some extra spawn which I'm not exactly sure what it is uh if you're not sure what stuff is you can always right click on it and then select actors in data layer uh I guess I also have to include them so right click select actors and now press F just to see ah okay there's extra spawn points interesting I guess if you have even more than however many characters or players there are in this map uh so I'm just going to turn that off for now leave it how it was so yeah if ever you wanted specific things that you want to exclude from the mini map I think you can add actors to multiple data layers uh I might need to double check that uh but that's how that that's one easy way to exclude specific actors from your mini map capture uh so now if I do the mini map capture again all of this nice color will disappear uh so I'm just going to build okay so this is the result you can't see anything that is in the gameplay data layer but so you can put a bunch of different data layers that you want to ignore or exclude all of this what it creates is this virtual texture which is virtual it's not saved on disk and it also itself is editor only because it is part of an editor only actor so it's useful for editor uh but if you want to use it uh to create a mini map or a gameplay mini map you can't use it directly unless we have some some sort of script or plug-in uh where we can just save this inside of a u asset or a texture sort of like my uh thumbnail to texture plug-in tool so it's it's possible but at the same time maybe you want to just add some flare to it give it some style in in some other editor like Photoshop or Affinity designer which is my favorite so far I've used it to update my steam capsules and it was awesome but yeah so this is the mini map texture that it generated and it's alligated it's because it uses this it pads to the power of two uh so I'm going to select none okay and then we have our texture so what you can do is you can try to uh full screen it put it on a 4K maybe and where the wide Bard is is where it ends and this is your world accurate mini map and if ever you want to use it in your game and I might make a follow-up tutorial about this uh but you actually have your mini map volume and your position will correspond uh to the player location so you can always keep that ratio and then have it in a a map somewhere in your in your game for now because this is purely a virtual texture and it only exists as a actor uh there's unfortunately no way to just straight up export this to a texture you can use print screen green shot or whichever tool you prefer if it's useful I could probably make a tool to export it to a texture uh but for now I think even for myself this is sufficient uh just doing a screen capture and then adding some Pizzaz and some some other software one more thing I'd like to share for the usefulness of this in editor is that if you have a really big world and you are only working on a spefic specific area or you can add these actors that are called location just location volume and as the comment says they represent a location of the world used for World partion loading regions so I'm just going to drag this in and let's say that this is just one of the lobbies and you're you're an artist that is aring up this area and let's say that this is a huge world and your computer's already sweating uh so you might just want to load this little area okay so I am actually looking at it from this way uh so I'm going to name this one lobby maybe blue players so maybe what you want to do is you want to unload everything and then what's nice about this is that you could have multiple of these uh so I'll just duplicate that Alt and drag and then this one I'll call it Lobby red players okay and then now with this nice detailed map I think it' be probably more helpful to have the diffuse only maybe I'm finding this interesting because it's not accurate okay so after rebuilding it it has the proper transform and location maybe I did something weird probably just because I changed it from the power of to H so it was fitting all weird um so yeah okay so now back to this if I select everything and I I will try to just unload everything and I don't actually need to see the coordinates anymore um yeah so if I'm just working on the lobby for blue players or maybe a a Garden if you're making uh an awesome chill game uh you can right click or select this particular location and then you can load just this region yeah and then you can work and your computer will be less taxed and it's nice because you can you can see through the the mini map where you want to load things you know you can you can gauge distances and you can also shift double click to play from from a certain location uh it doesn't exactly work with the expanse level or oh well that seemed to work fine so I'll stop that nice it'll be easy to just start from any location on on the mini map if you want to quickly test a certain area you don't have to move around in the map um you can have a oh there there's the problem okay so some of the spots you can still uh land on the top of the building and then you can't really do much uh but yeah in your game if you have if you don't have those invisible blocking volumes then you're probably fine uh I'm going to stop this uh but yeah I'm finding the mini map incredibly useful um in my own in my own game I have used it as just a map uh because I am not personally a fan of maps in games uh it can be useful for like Metras for sure uh but let's say I'm I'm really enjoying life of p and that one does not have a map and I feel way more immersed um yeah I'll show a little tidbit of how I'm using the mini map in my game okay so the world or the Hub world of my game is actually really big so I should follow my own advice and make a mini map that represents where the player can go but yeah that's what it looks like an editor and then when I play and I have everything loaded even though I I don't need to load every single area uh but I have a really strong computer okay so in my game I've implemented a very simple map it's not it's not too pretty yet um but there is uh her location is marked by a little mushroom and then the location of her teleport station or umbrella stations is marked by an icon and I haven't implemented the back action on keyboard and mouse yet uh but I have it on the gamad uh I have a cheat to activate all my stations and it's nice because whenever I have a gameplay object I can easily set its position relative to uh the world and to the the 2D representation of the map or the world uh so in this case it's nice to use for uh teleporting yay so this is just uh how I implemented teleportation and maps in my game if uh if there's a want for that I might it might be fun to try to make a tutorials about uh mini maps in the HUD uh if not then I might just do one for just showing the player location because that that can be useful if if ever you're lost in a game as always thank you for watching and see you in the next one [Music]
Info
Channel: NanceDevDiaries
Views: 643
Rating: undefined out of 5
Keywords: Mini map, minimap, world partition, UE5, UE5.4, mini-map, Unreal Engine, Unreal Engine 5
Id: RMZpM7ztcxY
Channel Id: undefined
Length: 24min 20sec (1460 seconds)
Published: Wed Jul 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.