Importing Real World Locations Into Unreal Engine 4 - Beginners Tutorial UE4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good afternoon ladies and gentlemen you boy virtus here and welcome to a video where I'm gonna show you how to import terrains based on real-life locations and the way that we're going to be doing this is by taking a height map a height map that we're going to be generating using open topography and L free DT and bringing it into Unreal Engine 4 as a height map so this is some really cool stuff and I hope you guys enjoy it just as much as I do there's a whole bunch of complicated stuff in here so just stay focused just follow along and you will get it in no time also there is a companion guide for this in the link in the description all the software and all the websites I'm gonna use in this tutorial is also free and you will find the links to those in the description so the first thing you're gonna need is open topography now if you click that link in the description will take you straight to this website this little map that you can see on my screen here is going to allow you to select a region or select a part of the world and then take that landscape information and turn into a height field that height field we're going to be bringing into l3 DT later on and converting it into a height map ready for importing into Unreal Engine 4 now the bit that I'm going to use orbit arraign that I'm going to use rather is this little island called Cape something I'm not too worried about it but I'm just going to go and zoom in and select an area now I'm gonna take this little island here now for selecting it you just press select a region and then you click drag and just get a nice little region just like this and you want to try and keep it nice and tight to the island as well that way you don't have any loss of quality or anything like that also one thing I do want to note is try not to cut off parts of the islands like you can see I am doing here just get the water and also don't go outside of the red boundaries otherwise it's gonna mess up your height your height field as there's no information outside of there so I'm going to select this and now that I've done it I'm going to scroll down and I've got to find a way to export so and the way we do this is by first things first make sure you turn off that generate hillshade images as you do not need those and then moving down what you've got to do is send a request over to the server so just put a little job title in there it doesn't really have to be anything too complicated to suggest terrain terrain and then if you just chuck in your email address literally anything you want it doesn't even have to be your real email address and then if you give it a couple of seconds it is going to take you to a download manager where you can download this information so you can see here it's all done and then the bit that you're after here it's called rosters underscore SRTM and this is essentially just a little zip file that you can open up and get the data out of so give it a couple of seconds to download and then when it has been downloaded just open it with what if we use for file management so 7-zip when rar when rails probably the easiest way to do it and once you've got this what you want to do is simply drag and drop and just place this on your desktop ready to import into l3 DT so my WinRAR just stopped responding there you go click drag and drop and we're good close this and now with my l3 DT I'm just going to open this up and it may take you guys a little while so I've already opened it don't forget that it is completely free make sure you download it in the description below and then moving on from here we need to import that information so what we're going to do then is start off by importing this so go to file import and import your height field give it a couple of seconds and then just navigate to wherever you have puts your output underscore SRTM and then open this up press ok give it a couple of seconds to load and it should give you your little island or your region of terrain that you have selected now bear in mind there is a couple of things that you need to do before this can be used inside of a height map and what I mean by that is it to be slightly better quality we need to merge in another image in a few other bits but let's just stick with it and carry on so first thing you want to do is go to operations height field and then resize your height field now what we need to do with this is set our width to 8,192 and then just leave the bottom one to whatever it generates as we want to keep the ratio and then just press ok and it's going to ask you do you want to retain the physical size yes you do you don't want to change the size of this thing the island should be about 20 meters or 20 kilometers across which is right so I'm gonna press Yes and that's gonna keep it now what it's going to do here is it's going to pretty much just resize it ready to go into a height map now we also need to export this in a second but to do that we just need to wait for this to finish I'm going to pause the video for two minutes and then we'll get straight back into it okay so this is just finished and we are good to go from here so what we need to do now then is just export this out into a terrain file that we can use a merge in a moment so what I'm going to do is go to file export and export to your active map layer and then select where you want it to go so for me this is just gonna go on my desktop and I'm gonna give this the name terrain and I'm gonna save it and then just press ok so now that we've done that it's gonna start exporting this out what we need to do now is just generate a black image which is 8192 by the same thing just so we can merge it with this and the reason why we're doing that is because inside of Alfred DT the only information it has is the bits which have raised ever late a raised have raised evolute I'm not even gonna elevation you know it's got raised a valachia I'm not gonna try anyway so the bits that are highlighted in green are the bits that actually has information for the black bits it's got nothing and the game engine does need those so what I'm going to do is go inside a photoshop now it doesn't have to be specifically Photoshop that you do this with you could do a paint net or anything like that but you just need to make an image that is completely black and uses the same settings as I'm going to use in just a second so for the most part these settings are pretty straight forwards give it a couple of seconds my computer's a bit slow and then we will get into it so the settings that we need here is 81 92 by 81 92 and make sure you set your color mode to grayscale as Unreal Engine and height Maps only take information regarding black to white values and sort of anything in between anything with color is just going to completely break it and stop your height map from working now once we've got this canvas fill it completely with black and then what you want to do is just save this as a PNG on your desktop or wherever the rest of your files are that you are working with so press ok and then we're good to go so moving on from there we can go to the next step which is we need to take some information from this so that we can use it later on because we're going to close this and start working with our terrain file in just a moment so the two pieces of information that we are after is the horizontal scale and the vertical scale so what I'm going to do is go to operations height field and change my horizontal scale I'm going to grab this value and then I'm just going to chuck it into my sticky notes as we're going to need it later on once again go to height field and then we're also going to get our vertical range and the one that I'm after is our altitude range which is one three three nine and once again I am just going to paste this into my sticky notes as we're going to need this later on I'm just going to press cancel because we're not actually going to be changing anything so now that we've done this we need to import our terrain that we just created so I'm going to go to import and then I am going to import a height field Save Changes no we don't need any of that and the file that you're looking to import is this one here your terrain do not import your output to underscore srtm and then once we've done this leave the file name - exactly what as it is already give it a couple of seconds to load up and then we are going to merge a few things so give it a second ok so now that we've got the information that we need we have got to do two things first we've got to import our black image and then we have got to dump our terrain on top of that so what we're going to do is go to imports and then import a height field choose no and then just select your output and just press ok and give it a couple of seconds to do that and then this is going to dump our blank image in this sorry no what am i doing I don't want to import my output I want to import my black image now we've got lots of files in here so sometimes mistakes do go wrong just keep an eye on things and everything will be perfectly fine so with the black image selected horizontal scale needs to be what we put in the sticky notes so for me that is 7.1 - 8 paste that in and then once you've done that just click OK give it a couple of seconds and then from there we should have a pretty much completely black image which is perfectly fine because we're going to be importing that terrain file that we just made straight on top of that and that is pretty much going to give us our height map so it's completely black that's all good and now what I'm going to do is go to imports and then merge height maps and select your L free DT file and one thing you want to do is make sure to disable stretch to fit otherwise it's going to stretch your terrain it's just going to bring it out the proportion and we just don't want that so give it a couple of seconds and then after that we should have something that looks similar to what we had before and then from there we can start to worry about bringing it into Unreal Engine 4 so I'm going to pause the video let it do it stuff and we'll get straight back into it okay so I've got my merge type map and it is looking good so what we need to do now then is export this out in a way that Unreal Engine can understand so what I want to do is go to file export and you want to export your overlapped files and then on your desktop just create a new folder as it's gonna be quite a few files and just call it terrain files just like that open it up and then just press save and just dump it into here or you know just do what you gotta do give a name terrain press ok and then for the tile size and stuff like that just set this to what I've got here which is going to be our 16 and then the tile size you are gonna want to set this to 2017 and format your file names for unreal that just means you're formatting it for Unreal Engine 4 and then just press ok press ok again and then it's going to resize everything and package it in a way that you can bring it into one real Engine 4 and having said that at this point you want to open up the Epic Games launcher wherever that may be and then from there open up the engine and we're gonna create a new project or you can put this into a project that you've got already it is entirely up to you ok so I've got my project open and I'm just going to go and start a new level and the level I'm just going to use is just pretty much completely empty default and that's perfectly fine for me now you need to do a couple of things before you can do this open up your world settings from the windows panel and then within here just enable your worlds compass composition which is going to allow for a tiled you know projects and sometimes it's going to ask you please save your level to disk before enabling this so I'm just gonna save this untitled level just do safe and I'm going to give this the name terrain test and press ok give it a couple of seconds to do that and then from there enable your world composition and then it's going to say also discover sub levels that's okay and then now that we've done this we can start to bring in our game or bring in our terrain rather so what I'm going to do is from here I need to get some scaling values and the way I'm going to get these scaling values is I've got to quickly go onto Google Maps so I'm going to go to Google Maps and literally it's going to Google that in and then open it up and I've got to find that region or that terrain that I just tried to get because I need to get the distance across that island so I can input that information into Unreal Engine 4 so for me my little islands were down here I'm going to zoom in and the way that I'm going to measure across this is right click and then add meta or just measure distance and now click on the map and over here and it's going to measure it and I'm looking for about 35 kilometers so now now that you've done this open up your calculator any calculators can be on your phone community computer but we need to divide this number by 8 and use that to input it into Unreal Engine 4 and the reason why we're doing this maps is to convert from kilometers to our unreal units value that it works with so I want to do and that was 35 divided by 8 and that's 4.3 so we're gonna go back into our engine and then we are going to write that down which was 4.3 and then what we're gonna do is open up our levels so if you guys remember where that is cool so to get open up your levels just go to window enable your levels and then from here you'll get this little window that is gonna pop up and what you want to do is click on this little button here at the top left and just press import tiled landscape and then what you want to do is just press select type map files go to your desktop and you need to make sure that you select your folder where all your terrain files are so go into here and then press ctrl a to select all of these and then press open and from here you've got to put in some values so for your X that is gonna be where you get your value in a second which was four points free civics finder 4.3 and that is good for there and then for our Y actually I want to put that in both for these so four point three or four point yeah it is four and four and we're good and then for this for the said value down here you need to do something and that is just take your vertical range which we had in our sticky notes before and if you broke that was one free free nine you want to do some math to this and just multiply this by a little number and the little number that I am after is over here so I'm gonna do that so I'm going to clear that one three three nine x zero point one nine five three one two five and then I am just going to copy that if I can or I'm just gonna write it in myself even so just maybe move it off to your second screen or somewhere else and just hook this up into your Z value so okay so and then paste this in and sorry so the value for that is this is for me to 61.5 two three four three seven five and then from there we are all good and then there should be a little button here that says flip tile Y coordinates check this and press import and that is the last step of making your terrain now this is gonna take a little while to import your landscape so just give it maybe five minutes I'm going to pause the video and we'll be good to go from there okay so now that they're all imported into the engine we just need to do something real quick which is select all of our terrain files and then just tell the engine to load these and make them visible so select all of theses by pressing ctrl and clicking all of these and then just press load which once again may take a little bit of time so you might have to give it another couple of minutes these terrain files are absolutely huge so give it a couple of minutes and after that we should have a brilliant looking terrain which is exactly like the real-life location so give it a couple of minutes and we back with you okay so everything has just loaded in into our levels we are all good now if you've got a blank level you are not going to be able to see anything at the moment if you go to the unlit view you are gonna notice you have a terrain here now before we can see this properly we're gonna have to add in a directional light and also if we search all of the classes search for a sky sphere and jump and add one of those into your scene and now you will notice you have your terrain in your game now I have turned my camera speed all the way up so that I can see this sometimes your terrain might be off in the distance but the important thing is that I have got this real world location inside of my game and I've got my mountains here and it looks really really good and you can see the level of detail in here is just absolutely astonishing and when you get to paint this it's gonna be even better now this example is probably not the best of them because it is quite rocky it's like this volcanic island but it really does go to show the level of detail that you can capture with this anyway guys I hope you have enjoyed the video if you want any of the values from the math stuff make sure you check out the companion guide the link is in the description thanks for watching stay awesome keep creating you boys artists signing outs this video was made possible by my supporters on patreon if you want more videos like this check out my patreon page using the link in the description to stay up to date on new releases make sure you follow us on social media
Info
Channel: DevSquad
Views: 359,295
Rating: undefined out of 5
Keywords: Unreal Engine 4 Tutorial, Real Life Locations UE4, Unreal Real Life, Game Dev, World Composition, Real Life, Real World, Open World Unreal Engine 4, Import real wor, VirtusEdu, Virtus Learning Hub, Unreal Engine 4 Landscape, Heightmap, Heightfield, L3DT, OpenTopography, Map, Level, UE4, Beginners Tutorial
Id: 8Y3f-ntPQGU
Channel Id: undefined
Length: 20min 16sec (1216 seconds)
Published: Wed Nov 08 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.