High Resolution Heightmap Data - Building Worlds In Unreal - Episode 16

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in today's video we're going to go through the process of downloading processing and importing hi-res real-world heightmap data last week we took a look at two websites where we could download heightmap data tangram heightmapper and also terrain.party and we discovered that both of these give us fairly low resolution height map data at only around uh one pixel for every eight meters well today we're going to be looking at a method for getting data that's one pixel per meter so it's really nice and high-res data but unfortunately it's a little bit more complicated to get this data into unreal so i'm going to go through this process with you step by step so you can see exactly how we can download process and import hi-res hype map data into unreal so let's get started all right so first of all we're going to go to this website called opentopography.org and this is a site where you can access all kinds of hype map data from the world and it's available and free for anyone to download so we're going to go to opentopography.org and we're going to come over here and click on data and this is going to bring up a map of the world and you can see here there's kind of this color coding going on where we have green data red data and blue data and what we're interested in is the the red data the green data and the blue data aren't necessarily free and open for everyone to use but the red data from open topography is definitely available so one thing that you'll notice is that the red data doesn't show up everywhere it's only in specific locations and that's one of the limitations of downloading this hi-res data you can't just go anywhere in the world you want and grab the data from that location you have to pick a location that's already available and so what i've done is i've selected an area in new mexico that i'm interested in so i'm just going to zoom the map in here right into this region here the nacimiento mountains all right so once you've found the area that you're interested in remember uh unreal's maximum height map import size is about eight kilometers by eight kilometers and so we're going to want to select an area that's about that size now there isn't a good indication on this map how big things are and so we're going to switch over to terrain.party just for a second and i'm going to zoom in on the same area and i'm going to use this box that terrain.party provides and shrink it down to its eight kilometer size and look at that same area so i'm going to switch this map here to our usgs shaded relief and you can see what eight kilometers would be so now i can match this same kind of an area in my other map because i have a better idea of scale so if i switch back to open topography this is the area that i'm interested in and i want to come over here and pick this select a region button once i switch this button on it gives me the ability to draw a box around the region that i'm interested in so i'm going to start the box down here and just kind of pick this area here and i want it to be relatively square because that's the kind of terrain or landscape that unreal is going to create and once i'm happy with my selection i'm going to unclick and it'll bring me down to this new area here where i can select the different data sets that are available now if you are in a different location in the world the data sets that show up for you may be different and you might have to try a couple of them uh just to see which one works best but in my case i know that i don't want to have snow on my landscape and so i'm going to come over here and click the raster button and that's going to bring up a new screen here now the nice thing about this map on this screen is that it has this little uh two kilometer scale down here so i can check to see that uh this box that i've drawn is close to eight meter or eight kilometers by eight kilometers now mine is a little bit bigger than that but that's okay because we can shrink it down a little bit later all right so i'm going to scroll down and make sure all my settings are correct the first one that i want to look at is the data output format and there are a bunch of different options available but in my case i want geotiff this is going to give me an image file that's using the tiff format but it's not the same kind of tiff that photoshop can read if you try to open this tiff file in photoshop it'll give you garbage because photoshop doesn't recognize geotiff all right the next setting that we want to pick is the layers and types of additional srtm data and we want to use digital terrain model if you use digital surface model that height map data is going to include trees and buildings and other objects that are above the terrain but we want to use the digital terrain model so that we just get the height map data for the ground and nothing else alright next when we come down here to visualization i can uncheck generate heel shade images because i don't need images that are shaded i'm actually going to be building this terrain in unreal so i don't need a picture of what it looks like shaded or anything like that so the last step that i need to do is come down here and give my job a title and a description and if you have an account with open topography and you tag all of your batches with titles and descriptions it'll keep track of the downloads that you've made in case you need to come back and alter them later in my case i don't really care so i'm just going to give this job title test and maybe downloading high-res height data something like that i'll put my email address in here and hit submit and what it's doing now is it's processing my request it's taking all of the data that it has and cropping it down to just that area that i selected so that it can give me exactly what i was looking for and once it's done processing here i'll be able to download a zipped file that contains the data all right so it's done and you can see here it's giving me this file called rasters tar dot gz and this is a zip file so i'm going to right click on this and pick or i'm just going to left click on it actually and it's going to download it for me so it's done loud downloading i'm just going to click on it to open it in winrar and now i get this file called output underscore be.tip so i can put this anywhere in my case i'm going to save it to the desktop and now uh i need a way to process this data to get it into the format that unreal needs if you'll remember from last week's video we discussed how unreal needs a 16-bit grayscale ping image that's in one of uh a set of very specific uh resolutions and so we need to take this geotiff file and convert it into something that unreal can use and that's what we're going to do next all right in order to convert our geotiff file to something that unreal can read i'm going to be using this software called terra sculptor and i really like tara sculptor because it reads in tons of different height map formats uh allows me to change them around and then export them in exactly the kind of format that uh unreal needs now you can download terrasculptor for free however it is patreon supported so if you do use it i'd recommend uh donating to the patreon for this software because it's really useful so when you first open it up you get this welcome screen and what i'm going to do here is pick import terrain and it's going to ask me to give it a height map so i'm going to drop down the file format window and scroll down here until i find geotiff and here it is now i've saved my output be file on my desktop so here's the file that i'm looking for and i'm just going to go ahead and hit open here and it automatically detects that i have a 32-bit grayscale float image so i'm going to hit ok and it's going to create the landscape for me now right away you'll notice that this is really flat looking uh it didn't actually bring in the correct scale for the height map but the data that i downloaded from opentopography.org is in here and it's all correct so if i want to scale it i can come over here to terrain and pick properties and then i can mess with this scale value here i'm just going to give it a scale of 1000 this isn't actually modifying the data the the height map data at all it's just changing the way that it's displayed in the software but once i do that once i scale it up you can see that this is some pretty cool looking height map data that we got from opentopography.org i'm pretty happy with the way that this looks uh if i kind of want to if i want to go crazy i could give it a y scale of 2 000 and then it becomes really steep that may be a bit much but it does give you an interesting idea of what this height map data looks like now one thing i will mention is when you get to this stage if you don't like the way that it looks you may need to go back to opentopography.org and try some different settings or some different areas to download it doesn't hurt at all to iterate in this process until you get something that you're happy with okay now i need to change the resolution of my height map data to something that works better with unreal so i'm going to come over here to the modify menu and pick resample and you can see that right now my height map is 9991 by 98.27 and this is not a size that is very friendly with unreal so i'm going to hit this udk button here to bring up sizes there's a specific chart of the sizes that unreal likes to use that's pretty cool if you don't have this udk button here you can change the settings of the software to turn this on and let me show you how to do that really quick so i'm going to come here to the tools menu and pick settings then i'm going to come here to the dimensions tab and i'm going to click udk landscape once i turn on that feature then if i come here to the modify menu and i pick resample this udk menu is going to be available so we want an 8k by 8k terrain that is one pixel per meter and so i'm going to pick 81.29 by 81.29 and i'm gonna get i'm gonna hit okay here and then back on this menu for quality i'm gonna use the best quality for resizing available and then i'm gonna hit okay and so it's going to resize my height map data so that it matches the resolution that unreal is looking for and there we go now there are some other things that i can do in this software and we'll talk a little bit more about that in next week's video but for now what i want to show you is that if you come under here under materials and drop the material type down you can pick color set and then choose a color set that matches the kind of terrain you want to create so in my case i'm going to pick canyon river and you can see that it kind of adds some coloring to the landscape to make it a little bit more interesting now that has nothing to do with getting it into unreal it's just for visualizing it in terrasculptor but it does make it look a little bit nicer all right so the last step that we're going to do in terra sculptor is export our heightmap data so i'm going to come over here under file and pick export terrain and remember that unreal needs a ping file so i'm going to scroll down my format drop down here to a ping image and i'm going to save this to my unreal projects folder and i'm going to give this a name that makes sense like uh hi-res height data and it's going to save in ping and when i hit save it's going to ask me what kind of ping i want unreal needs 16-bit grayscale ping and so i'm going to choose that and hit ok so now it's writing out my height map data and it's ready to be imported into unreal so let's jump over to unreal and do that all right so here we are in unreal and i have an empty map here that i've created and in order to bring in my terrain the first thing that i need to do is come up here under modes and select the landscape mode and now instead of creating a new landscape i want to import from file so in order to do this i'm going to [Music] browse to the file that i just exported out of terrasculptor and so here's my hi-res height data and so i'm going to hit open and then i'm going to hit fit to data and it's it's detected all of the settings that i need to use based on the height map that i created so now i'm going to go ahead and hit import before i do that what i want to show you is that it's created this blue grid or green grid that shows my height map and so when i import that that's the height map that it's going to create so go ahead and hit this import button and there it is there's the height map data that it's imported now again it hasn't set my height scale exactly the way that we want it to be and so in order to fix that i need to come out of landscape mode and go back into select then i'm going to select my landscape over here in the world outliner and for scale i'm going to set my height scale or my z scale to something that may be a little bit more representative of what this data actually looks like so i'll set it to 250. now this is something that you could play around with so you can make it a little bit higher maybe a little bit lower um depending on what your needs are but you can play with this value to get your height data looking a little bit more like what you want it to be and here we go so i've imported my hi-res height map data into unreal and i have now height map data that is one pixel per meter in resolution and so this is the landscape that we're going to be editing from going forward so starting next week you can see it's pretty boring looking right now but starting next week we're going to work on a landscape auto material that will apply nice materials depending on the height and the slope of the surface and we'll also be using terra sculptor to generate some masks that also determine what types of material go where on the landscape so i hope you'll tune in for that so today we took a look at a method for downloading hi-res height data for processing the data and then for importing it into into unreal it's a little bit more of a complicated process than using uh terrain.party for example but it does create much higher resolution results so now we have a pretty cool looking terrain i hope you enjoyed today's video uh if you did be sure to subscribe to the channel and we'll see you next week [Music]
Info
Channel: Ben Cloward
Views: 37,502
Rating: undefined out of 5
Keywords: UE4, Unreal, Unreal Engine, shader, material, material editor, game development, real-time, tutorial, training, Unity, graphics, 3d, GPU, tech art, computer graphics, fundamentals, basics, beginning, learning, landscape, topography, satelite height data, heightmapper, Terrain.Party, EarthExplorer, USGS, OpenTopography, GDAL, TerreSculptor, L3DT
Id: RjwyFIUo5p8
Channel Id: undefined
Length: 18min 13sec (1093 seconds)
Published: Thu Jan 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.