Blender, QGIS & Digital Elevation Maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to combine satellite data with blender to create 3d models that are accurate in both geology and and color so for example this is a 3d render of the san francisco bay area that i created using satellite data running it through software called qgis or qgis and then using that software to generate texture maps and bump maps and displacement maps that were then imported into blender to create this final scene so in order to do this project you're going to need both qgis qgis which is a graphical information system software it's free you need to go to qgis.org to download the software so just go here download it and install it if you don't have it and the other software you will need is blender which you can get at blender.org it is also free so go to their website download and install it and once you're done that we can talk about uh getting the satellite data which is also free there are lots of places to get satellite data and i have links in the description as to where you can get other satellite data but i'm going to use the usgs earth explorer website and this is what it looks like it's here at earthexplorerusgs.gov and you can see it gives us a map of the world you can scroll in and out using the scroll wheel you can pan by using the middle mouse button and that'll move you around and for this project i'm just going to look at the san francisco area all right because it's got some interesting water and mountain features the first thing you need to do is you need to choose your area of interest because right now the software doesn't know what part of planet earth you're looking at and you need to tell it there are two ways to do this you can just click on the map and that will give you pins and that will define a very area of interest and then the software knows that you're looking inside this area another way to do that is to kind of focus on the area you're looking at just kind of get it in your screen here and then go down here to this button that says use map and that will define the area inside of your current screen as the area of interest and you can use this plus and minus if you want to scroll in a little bit differently so use map and you can see that it create a little pin here in the corner a little pin there in the corner and if i scroll out you can see that it created pins that fall that fell right within my window originally the next thing we need to do is choose the data sets we're going to use and we're going to use data from two different satellites so going over here on the left data sets and then we want to look at the digital elevation maps now we want to look at this all right we want to look at the digital elevation srtm srtm stands for shuttle radar topology mission and we want to use the srtm one arc second global this is going to generate or it's going to give us the height information that we use for the displacement map it's going to be a grayscale map that shows us the topology of the area the other map that we want to get or the other data we want to get comes from landsat and there are lots of different landsat missions we want to look at landsat 9 and we want to look at the collection 2 level 1 because this is going to be the better data so we just want to check this landsat 8 9 box this is going to give us access to both landsat 8 and 9 but we can further filter what we see here with some additional criteria so click on additional criteria and you can see we're looking at landsat 9 now if i drop down i want to look at satellite i click the plus and i want to just choose nine so nine's the more recent satellite it's going to have the better data so we want to do that and when we go back to our data sets and we want to look at search criteria we want to look at we don't care about date range really for this we're just looking for data cloud cover is useful if you're doing some place that is arid so like maybe spain or north africa you can get away with not adjusting this because there's rarely clouds in those areas if you're doing some place like the pacific northwest the united states or scotland where it's always cloudy you might want to push this down to try to get clearer skies if you push it too far down in those areas you know places that are timely overcast you may get zero results so if i set this way down here and try to do topology for like seattle i might get very very few results because again they have few so few days have no clouds so just to be on the safe side maybe leave it 10 15 and then you can always manually exclude any images that have clouds that you don't want you might want to click on this results option the big thing here is you can change the number of items that show up in one page of the result so i'm just going to set that to 50 and i think that is it for this so now i can just go to results you see it was searching for it and it's going to bring up our results over here and these are all going to be specific to our area of interest and the results are actually separated within this drop down box so let me look at the digital elevation map first and select that one you can see these are all gray scales and you have some options here with these icons so this footprint is going to show you where on the map this particular swatch of radar information came from or topology information came from this next icon is actually going to show you what it looks like so you can see that's a gray scale with the rivers and everything so that's kind of outside of our area so i'm not interested in that one that one looks a little bit better right that one's kind of within the san francisco area and then you can see that they often are adjacent to each other no one's too far out to sea that one's a little too far northeast that one's good and then this one's probably good so you can see these four fields cover the area of interest that we're looking at so the next thing to do would be to download the data so just looking at the ones where i've got the icons that i like there's this download options button so click on that you have to do this for each map you want and you want to take the geotiff one arc second download you just click on that it's going to download that and you want to do that for each of the maps you're interested in downloading now i've already downloaded these so i'm not going to do it again by default they're going to go into your downloads folder and then when we're done this we're going to move those into some other folder so we can organize them all right so matt so assuming you've downloaded then all of your dems just by clicking on that download button you then want to go to the landsat option choose that we're going to do the same thing but this time we definitely want to look at the the thumbnail of the image because this is going to tell us where there are clouds so this looks like a pretty good image it's right in the middle of our area of interest and i don't see any clouds on it so that's a good one these black ones it means there's no data in them we're not gonna be able to use them all right that one's another good one we've got a couple clouds up here but they're pretty far north so i can ignore those and there's another good one you know the clouds are way off here in the mountains i'm not worried about them and i think you know if we keep our area of interest pretty much on the san francisco bay area these three maps will be good enough for us similarly you want to use the download button for each of these now this time you have a couple of options you really don't want any of these at least i haven't found a use for them but if you click on the product options you have some choices you can either download the entire set of data the landsat transmits data in many many bands so you've got 11 bands plus some other information in here so band 1 band 2 band 3 all the way up to band 11. if you want you can download the entire set um but just be aware it's going to be a gig or you can download the individual bands that we're interested in so if you're tight on disk space maybe not do that but we will need bands two three four and eight right so you can download the whole thing or you can individually just download band 4 band 3 band 2 and band 8 and then those files will also end up in your downloads file folder so i'm not again i'm not going to do it for all of them because i've already done it just to save some time but you can see you get a new tab up here it takes a second for it to load and then your download will start and that's it for downloading the data we can close these windows and the next thing i would do is i would move all of your data into some i move all your files from your download folder into a common folder that you're going to use for your project yeah i chose just to move all my folders into a file called usgs files and i chose to download the full data sets as opposed to the individual bands i know these are big but they're temporary once the project is done you can delete them and then these are the individual elevation map files so you can see that they're just black and white images these are actually zipped files that can be read within the program qgis so the next part is to go over to qgis all right this is the qgis interface and we're just going to click on double click on new empty project and hopefully your interface looks kind of like what mine does we got a browser panel layers and over here i have two tabs one for layer style and one for processing box if your desktop looks different than mine go to view panels and make sure you have the checks that i have here so you have the same panels that i do and then go to toolbars and make sure that you've checked the same ones that i've checked because you're going to be using some of these tools and panels and if you don't see them then this is how you put them up another thing we want to do is we want to make sure that your raster folder looks like mine so under this raster tab there's a miscellaneous option i don't think this is always turned on by default so if you go to plugins and then go to installed and just make sure that this processing is checked all right because if it's not checked then that raster miscellaneous menu item i don't think it shows up on your screen so it might be confusing if you don't actually see that there another thing we want to do is we want to make sure that you've installed some software that'll help you fill some holes in the data data so if you go and you type in gdal and you want to look for the virtual raster builder which is this last one here it's also called g down this is going to let us fill in holes in the data and i'll show you how to how to do that later but just make sure this is installed so i've already installed it but you would just you know search here for that find this one and then you know install the plugin and you should be good to go for that so the first thing i want to do is bring in some of that data that we got from our downloads and i'm going to start with the elevation maps so i'm inside i found my usgs files folder which has all the downloads that i did and these are the elevation maps i'm just going to drag these here and there we go we got our four maps the first thing that strikes me is there are seams right our seams in our data before we go any further i'd like to group these so we can keep things organized so i'm going to select them all right clip group selected and i'm just going to call this dem for digital elevation maps that's going to put them all in there so to zoom in and out you can either change the scale here right so zoom really far in and there's a difference between zoom and scale like there's magnification and there's scale and scale is important later when we actually export this data you can also use the scroll wheel to change the scale you can see how it changes the scale at the bottom if you hold the control wheel while you scale it's a finer movement you can use the middle mouse button and then i've got that clip down now i'm just panning and dragging my screen around i can hit shift control f to kind of zoom in to fill my screen and then if for some reason you you move your thing way off to the side you can't find it you're just kind of lost in this white screen you can always click on anyone anything over here right click and say zoom to layers and that will bring everything back to you so you see how that brought it right back to the center for us all right all right so let's talk about these seams we can get rid of these by using this raster miscellaneous build virtual raster option so i told you how to get that set up so you want to click on that and a couple options here we want to use the highest because we don't want to change our resolution i found that in blender the resampling algorithm that works best at least for me has been bilinear so i'm going to change that and then over here these little three dots this is going to let us check which files we want to use right now because we only have the elevation maps in here i could just say select all it's going to click them all and i can click run and it's done so you can see over here it created this virtual layer and i'm going to click and drag that and just move it out of the elevation map so we can hide those we're kind of done with those and you can see right away that those seams have gone away it's blended all four of those maps together and we have a nice seamless map all right the next thing to do is to bring in our landsat data so i'm going to click all three of them i'm going to drag and just bring it onto my canvas and it's going to ask me some questions and i'm just going to say yes i want to add this group to all these layers to a group and it's going to ask me some other questions i'm just going to click through and say okay okay add layers okay okay all right so now we have our landsat data all right so we can see our landsat data here these b's are bands so band 1 band 10 11 2 and if we open up one of these you can see that there's a number in here on a gradient this is the number of meters either below or above mean sea level on your map so if that was useful information to you that's what that means we're only really interested now in the bands two three four and eight so let me hide our virtual dem i'm gonna hide just make sure everything's set up here right so i want to rename this so i'm going to rename i'll call it virtual dem and just hide that so we're going to look at our bands here now band 2 so landsat gathers data based on frequencies of light so band 2 is blue light band 3 is green light band 4 is red light band 5 is near infrared light these are all 30 by 30 meter resolution scans and then band 8 is a panchromatic band and that's a 15 by 15 meter scan so it's got four times the amount of data in it as the other bands do so we're going to use the two three and four or the blue green red channels to recreate the color of our map and then we're going to use b8 to add some bump map detail later on so the first thing i want to do is i want to take the twos i want to group my blues my reds and my greens together you can see that in here this this map doesn't look particularly blue or green or anything and that's because these bands only measure the intensity of a frequency of light so on the blue band anything that's really bright would be a lot of blue frequency light anything as dark would be an absence of blue and then we need to combine these back together to create a true color image so i'm going to take the two from here and the two from here and i'm just control clicking on these so i can select them as well and then get two from there and i'm going to move them up to the top so they're here and i'm going to group these together i'm going to call it group and i'm going to call it b2 blue and minimize that and i'm going to do the same thing for the green band which is 3. and the red band 4 and the pan chromatic which is 8. now these other bands do have some value for example band 5 is near infrared you can actually use this to artificially enhance areas that have plant life since the band 5 data is good at picking up green leafy vegetation so if you needed to add some maybe extra green that was realistically placed on your scene you could use the data from b5 to do that but for this tutorial i'm pretty much done with these data sets we're not going to use them really just going to focus on these three layers now if you were only doing a single tile if your area of interest only covered one area your life is a lot simpler because you don't have to worry about blending these pieces together because you don't have to worry about you know an obvious seam here with your colors so but since we're doing a composite we're going to have to do a little bit more work so let's start with the red band and if i open this up and the blue bands are off so we're really just looking at the red channel it doesn't look particularly red and i want this one here to be on the bottom since it's kind of this is the area of interest here i think if we look at our elevation map i'm going to move that up i want the dem or the virtual one move that up to the top so we can see it so you can see that the intersection of these two sets of tiles is is kind of in this area so this is where we're going to be taking our composite data from we can't take all of this data because the elevation map only goes so far and only overlays you know this middle section so we're really only interested in this section and maybe just a little bit off of this one but certainly these two so i want that's why i want this this one here to kind of be on the back all right next thing to do is add some color to these and we do that using layers so starting with say this one i go over here to my layer styling and i want to change to a single band pseudo color and i can double click on my gradient and it's already set to black here so that's fine but i want this end to be blue and i want it to be a pure i'm sorry i want this end to be pure red so i can either drag this around or better yet if i want to be absolutely certain that my values are 100 percent so f 0 0 0 is pure red so i have a gradient from black to pure red i can say ok and that's going to colorize this if you like you can right click and save your color ramp and i've already done that for my blue greens and reds so i don't have to keep doing this you can see i've got a blue band a green band and a red band and that's how i created them i just created that black to red black to pure green black to pure pure blue and then i named them so now if i go to another band and i change my thing to a single band i can choose red band from my list and it'll take it and we'll do the same thing here i'll just change that to single band and it but it'll use the last one by default so we've got three reds now you can see that these don't match up right right this one is much darker than these are we're going to fix that later we're actually going to fix it in photoshop so let me do the same thing with the blue or the green and the blue all right so now we have each of the bands turned to its you know appropriate color the next thing to do would be to change the modes of you know the mixing modes so if we go into select the green for example you can see down here there's normal i'm going to change that to screen and change this one to screen and change this one to screen all right you can see that we start to get some coloring in here the reason we need to fix is outside of qgis and not in so the reason i'm going to fix this in photoshop and not qgis is i haven't figured out a way to prevent this kind of i don't know what to call it but the different layers are bleeding through each other because they're overlaying in photoshop i can avoid that i can work on each of these individual layers individually and i'll show you what i mean later but at least you're starting to see that the colors are starting to come through and if we do something similar with the blues we want to change these to also screen and start to get our real color here all right so now you can see you know in this one by putting together the red the greens and the blues we get that real color information out of the three black and white images that's kind of cool all right so the next thing to do is to define another area of interest here which is the intersection of our scene so if i click on virtual dem so this is you know where this is and i want to pick an area of the map where all three all three of these color swatches as well as the elevation map all overlap and you know like i said we might get a little bit of that one there so what i want to do here is i want to go up to the top and i want to go to this v shaping v shape icon and click on new shape file layer and i'm going to call it crop and i'm going to call it geometry is a polygon and i don't think i need to change anything else and it's going to complain when i click ok and i'm going to say yes and now i've created a crop layer and now if we go up here under tools and click on this toggle editing pencil and i want to click on this drop down and add a rectangle from extent right this is one of the toolbars that i had to add at the beginning i'm just going to click and drag i'm sorry i'm going to click and then i'm going to drag down to the right and i don't want to go outside this this line here i want to stay inside i'm going to try to make it as square as possible and then i'm just going to right click to lock my my square and i'm just going to give it a number it doesn't matter what the number is it just needs an id number so there is our you think of this as like a cookie cutter that we're going to use to cut identical pieces out of the maps that we can then import into blender now i don't need it to be opaque i just need it to be there just exist all right it doesn't matter what color it is or anything so i'm just going to turn that off for now and the other thing i want to do is i want to just look at our r8 panels so those are our individual um 15 meter pan chromatic scan so we're going to export these as well so how do we export these i will actually want to export these not by color but by bandwidth so if i turn all these on and i'm going to turn off the second the second and third group so i just have really just the combination of the first group so we have our our true color version of this swatch all right so if i go to our scale and this is this is important for exporting because it's it's going to export your data with as much data as your scale sets i know that makes sense but you know this is going to output a kind of low very low resolution of your image and you know this is going to output a very high resolution of your image the downside is this file is going to be massive it's going to be quite a large file so you may want to find something that your machine can take you know it really depends on how how meaty your machine is how much memory you have we'll try at uh 1 100 000 scale see what happens so set your scale first and we have all three channels turned on so we have a true color version for this particular swatch i then want to go to project import export export map to image all right so here the order that you check these things is kind of important because they tend to affect things downstream so don't just kind of click randomly start with layer and you want to choose that crop icon that we had so crop and that's going to tell qgis that it wants to only output any portion of this map that lives with inside that square that we drew right that's how we're going to make sure that all of our images line up on top of each other so this is a color image 96 dpi is probably fine you can see it's already at over 4000 pixels we don't need any of these you can click on those and then we can just save it so you want to click save and you can see that i've already saved these out here i've already did this as a test so this one would be the b2 version um so yeah so i'm just i'm not going to actually resave over these things but you can see that you would just save this give it a name save it as a ping and save it out to your disk and then you would do the same thing for the others you would turn off the first one turn on the second one don't move your screen right for some reason moving the screen makes a difference sometimes go back to project import export and then do exactly the same thing you want to choose the crop you want to keep your scale the same you want to change your result keep your resolution the same and then again save it as a png file for this you know the second swatch and then do the same thing for the third swatch and then you want to do the same thing for the pan chromatic bands you want to just save these one at a time right because they're all just the black and whites and you want to do exactly the same thing so turn this one on go to project import export export map choose crop and then you know uncheck these and for this one because it's a grayscale map you might want to try 300 bpi and if you tab out of this it's going to tell you much how big your your new file is so a 13 000 pixel file isn't too bad if you had been zoomed in to higher resolution this this number gets crazy fast you can get like fifty thousand by fifty thousand or sixty thousand by sixty thousand um which is hard for a lot of machines to handle so just be cognizant of uh these grayscale ones uh both the uh band eight and the uh the digital elevation map you wanna save at a high bpi or dpi but it is going to increase your file size so i would save this and i would save all three of them just one at a time do exactly the same thing and then for the virtual dim we're going to do basically the same thing i'm going to have the virtual dem turned on right so that's our merged elevation map and again you would go to import export export map to image choose the crop tool to make sure you're exporting just the area you want to and for this you would definitely want to set this to 300 because you really need that you really need that density to get a good a good grayscale image for your displacement in blender and then you would check these off and then you would save that and you can see that i've saved my r8 out here and i have my dem files also already saved off all right so that i think is it for most of the stuff inside of qgis the only thing i want to show you that's a little different is how to fix holes and data so i'm going to bring this whole example in and i'm going to right click because this hole isn't from california it's actually from alaska or from washington state canada border so this is a dem i was playing with earlier and sometimes there's missing data so if you look at this zoom in you can see these big white spots this is for because for whatever reason the satellite was unable to include data in the file and this is just holes and what's going to happen is if you bring this file into blender these white spots are going to be basically infinitely high you get these massive spikes in your in your terrain which is clearly not what's supposed to be happening there and they're just mountains or valleys but there's there's holes so blender's not going to know what to do i'm just going to have these massive spikes so to fix that you want to go to the processing toolbox and you want to look for that whole filling tool that i showed you at the beginning i mean i could actually look for no data probably better so this fill no data tool so i double click on that and i'm going gonna bring it over here uh not a lot of options here this one uh is just gonna how many times is it gonna try to run through the algorithm to fill these holes i know that on this particular one i wasn't able to get it to work until i got to like 40. but you can click run and it's going to try to interpolate based on the surrounding area just to kind of guess what really should be there so there it filled in those holes just fine but i know that further up on the map there's still spots that are missing and the nice thing is you can rerun it again so you can click change parameters and i'm going to click on i'm going to type 40 here and i'm going to click run and we should see the the holes disappear all right so maybe that wasn't all but i know that in previous tests i needed to actually get the 40 to fill in some of the gaps but now you can see looking at this map we don't have any of those those massive white spots we've got you know gray spots but we're not looking at any of those those gaping holes so anyways if you come across data that's missing if you've got some holes in your data you want to use this fill no data tool to fix that and you can see each time i ran that it created a virtual layer right so i don't need any of these these are junk get rid of them all right so here we are in the directory that has the bands that i saved so you can see here's one of the color bands there's another one there's another one these are the individual band 8 images and then we have the elevation map as well so let's open one of these in photoshop so open with photoshop and that's what comes in so i'm going to actually drag the other ones on there i'm just going to drag them over you know i'm going to move this one out of the way and i'll bring my photoshop up here and then i'm just going to drag these in from my other screen and just drop them on here so that's another color one i'll just place that and then before i'm going to place place that and the other the key here is to make sure that they're lined up on the background and they're just going to snap into position it should be okay because they're all going to be exactly the same size because we used that crop like tool that we made to make sure that they all line up nicely on top of each other so i'm just making sure they're all snapped good all right so the next thing i want to do is i want to get rid of this white stuff so if i hit w to get my magic wand and i can click there and then i can click here and i can hit the delete key and it's going to delete all that i don't need that so ctrl d deselect it turn this one on i need to change it to raster and i'm going to select this one and delete it and i'm going to do the same thing for this one and i need to rasterize that and i need to delete it all right and of course i want to change the order here because this piece up here really is just just a tiny corner here and and you know the bottom line seems to be the best one so next thing to do is to select these layers control m then you can use the curves tool to try to blend these together so if i just make this a little brighter and you can of course go in and adjust the reds the greens and the blues that seem to blend pretty well there and then do the same thing for this bottom one ctrl m to bring up curves and just bring that up until it blends nicely you know that one might be a little bit too much green so we can maybe pull the green down a little bit maybe not maybe the blues it's better to pull colors out than add them in otherwise they get over saturated all right i'm not going to fret over too much because it's just a corner so there's our full color image of our san francisco bay area and just doing it in photoshop with the curves tool just was a lot easier than trying to fiddle it with in in qgis i was not able to find any wayne q just to actually do what i just did in photoshop so i'm going to group these three together that'll be my color palette and now i'm going to bring in my band 8 images and we're going to do basically the same thing with these i just want to make sure they're placed properly so that one looks like it's okay that one looks like it could go up so it snaps up that's good and this one looks okay snap and just double check that one snap okay and then just rasterize these w magic wand delete selected control d all right now if we turn them all back on you can see we've got some blending issues i'll save it later um i want this one in the back because that's the least important one and we're just basically going to do the same thing where i use control m to change the brightness i don't want to change that one i change the one on top so ctrl m and just bring that up until it looks like they're seamless right so i'm pretty happy with that and then the bottom one as well ctrl m and just raise that up and this the the band 8 that i'm looking at right now we're really just going to use for creating a bump map because it has this really nice detail that we can use to add extra details to our terrain they're really fine all right so that is it for setting them up in photoshop the next thing of course to do would be then to save each of these so i'm going to group these and call it band 8. and then you would just save this is a tiff probably because you don't want to lose any of that data so save as and um so as a tiff and you can see that i already have a dem already saved out you can actually probably save this one as a png um you know i already see if i already saved a version of of the band 8 as a png and i already have a version saved out of the color as a png and then of course the um the dem itself is already a tiff and that really needs to be a tip so i don't have any data loss uh the next thing to do and this this next part's a little tedious but i couldn't think of any way to do it in the usgs software was to identify bands of water so this is a file that i've already worked on basically the same area but i have the water mask already worked on here so what i did is i just took a pen and i colored in a new layer of everywhere that i saw there was water and i did it in red to make it easy for me to see and then once i was done coloring in the water i hit ctrl j to duplicate my color um but that should i always had the black one select so i ctrl j to duplicate my water and then control u saturation and lightness change the water down to black all right now you notice that so this is the one i just showed you how to do and this is the final one that i did playing around you can see that some of these areas that i originally colored in as black are actually a lighter gray and that's because these lakes are higher up in elevation than other parts of the map so when we go into blender and we start using this water mask we're going to use it both for his material mask and to smooth out the water so i just had to adjust the height so imagine that this black layer is going to be kind of the lowest area of your map and you can figure that out if you bring in your elevation map let me go back to this one and i'm going to bring in the elevation map and place it and we know that the for example the water is is down here and we can take a sample of what this color is so if i go to my eyedropper tool or and you know select here you can see that it's o20202 it's not really zero right so this level of black on our water mask should be this in hex o20202 but we also have a lake up here and that's at a nine and a mask so just when you're making the water mask so like you know i was going through here you know i painted everything red that i thought i liked and then i converted everything to just absolute black but then i went in and i adjusted the basically adjusted the height of the lakes the altitude of the lakes uh just kind of playing with how how dark gray or light gray they were and then that just pushed them up or down on the map this hopefully will be more more apparent when we go into blender which is the next step all right so you want to save these files out you want to save your your water mask out as a mask so it would look like this and then you would save this as this could be saved as a png as well if you wanted that would work so you can see here i already have a water mask file created so we have a water mask our true color image and then we have as a tiff we have our our digital elevation map and those are the files we're going to use to create our topology all right so i can minimize this and next we go into blender all right here we are in blender i'm going to create a plane i'm going to scale it up apply rotation and scale go into edit mode f3 type subdivide and i'm going to hit shift r a couple times until i get about 16 000 faces now hit u for unwrap and we look here we can see that our plane is projected all the way to the edge of the uv space so i just want to hit s and i just want to scale it in just a little bit just to make sure that our uvs are inside that zero to one space just in case there's any noise on the edge of our image we don't want that noise next thing i want to do is i want to add a modifier a subdivision modifier and we'll say four because we're going to need a lot of polygons in order to make this terrain work all right i already have a shader created from a test that i did earlier so i'm just going to kind of do a reverse engineer of this thing we're talking about it so let me bring this over a little bit and we'll take a look from the top and bring this down try and get everything here so you can see it kind of alright so here is the shader and we'll just kind of walk through it over here we have the color image that we created in photoshop all right that's what this looks like here right that's our true color image and that is color space srgb we have the water mask right that's our black and white hand drawn image that tells us where the water is where the land is we have the dem the digital elevation map and i have a couple in here they're basically the same so it doesn't matter if i choose dem or dem default um but that's the grayscale image of our terrain that is non-color that's important and then we have the band 8 from landsat all right and that is our grayscale we're going to use this for bump mapping because it has such nice detail so going back up to the top of our shader you see i've got a couple of outputs coming out of the color one goes through a color ramp called land rough and one called water roughness and these are used to create the roughness areas for the land and the water so the land obviously needs to be very matte finish no no real reflection so it's going to be a very light color with you know maybe some light grays on it but generally a light color you know is going to create a very diffuse shader so here you can see the result of this land rough if we can zoom in you can just barely see the outlines of the land all that happened was i took that color image ran it through a color ramp and then you know one end of the scale gave it a you know 0.57 value so so lighter than mid gray and on the other end a pure white value so that's just going to create a very light color for our ground roughness and then similarly created one for water which is going to be these areas here but for this i chose 0.057 for the darker side and a 0.139 for the lighter side just to give it some variation and then those two are mixed together right in this mix node using this water mask node so here's our water mass that hand-drawn mask that we created so it's going to put this dark gray everywhere i have black or gray and it's going to put this light color for the matte or to very diffuse ground anywhere there's white so the output result of this looks like this over here and if we scroll out you can see we've got dark grays here and then light grey so this is the roughness map and then this gets run into the roughness on the pbr shader and the color itself just gets run directly into the pvr shader all right so moving down we're going to reuse this water mask over here with the digital elevation map so the digital elevation map has some noise in it where the water is so i don't want the water to be bumpy at all i want the water to be smooth and the way i did that is i ran the digital elevation map non-color into a mix node and then i use the water mask as a factor to add just a very very almost near black color to the elevation mask and then that's going to generate just kind of a uniform smooth area wherever there's water so any of these black areas here that are defined by this mask no longer have any of that digital elevation noise so if i take a look at the the dem again you might be able to tell that there's some like gray cloudy stuff it's kind of hard to tell but it's because it's such fine data there actually is noise in here and it makes the water bumpy so we're trying to avoid that so that's what this little bit here does we just kind of make a uniform color um which means that when we go through the displacement node anything that's this color is just going to be absolutely flat smooth right so we we've combined the elevation data which is this raw bumpy stuff uh with a solid color for where the water is and then it goes into our displacement node which is set to 0.5 in my case but depending on how high or short you want your mountains to be you can certainly adjust that one thing to note while we're in here talking about the displacement node is under options you want to make sure that under settings you have it set to displacement only you have other choices here you want displacement only if you have displacement and bump or bump it's not going to look right this is going to these are going to create all kinds of noise on your thing on your terrain you don't want that so just leave it as displacement only otherwise you actually won't even see the displacement work if you don't if you don't pick some kind of displacement option all right uh moving on down we have the bump node which is going to give us some extra detail and i'll show how these things look in a second i just want to talk about them so the bump node or the bump yeah the bump node setup reuses the water mask it comes down here and in this case what i'm just trying to do is again smooth out the bump for the waters now the difference between smoothing out the water here versus smoothing out the water for the elevations as this is actually because it's running into a displacement node it's going to actually flatten physically flatten the um the model or the the 3d model it's going to make sure that these are absolutely you know flat not just smooth from a bump perspective but topologically flat so that's what this one does and that's the difference between these two this one's going to physically alter the shape of the model to be flat in these dark areas this one here is just going to make sure that these areas don't have any bump map because if you look at our r8 data it might be hard to see but you can it's not that hard to see you can see there's lots of noise in here from water ripples and stuff like this and then if this was used as a bump map right this r8 data this is used as a bump map we would have not just bumps on our s on our mountains but we'd also have bumps in the water which is now we don't want so that's the difference between this darkening and this darkening and then this these two just get mixed together so that the the bump map has smooth areas where there's water and bumpy areas where there's not right so that's the output of this set of nodes and that gets run into the bump map so how does this stuff look in 3d when we look at it so we can turn on our displacement and i can turn on our color so by connecting that displacement node it's going to actually start pushing topology around all right and there's our scene just so you can see the effect of that bump map that we added as extra detail i'm just gonna see you can kind of see it in here let that render out you got these fine details on the fields if i take this off of our shader just give an idea of how much nice detail that adds i'm just going to cut that connection let it re-render you can see how washed out all these features are now just the mountains are all kind of rounded off and smooth there's no real detail in the fields but by using that band 8 data as a bump map i think it just makes everything pop it gives the fields definition you get like actual definition of rocks on the mountains so kind of cool all right so i think that's it for the tutorial um i hope that was useful i know i had trouble finding information on qgis and how to get the data out and make it something usable for blender if you have questions leave them in the comments if you know more about qgis than i do which is easily done and you can think of an easier way to do what i did please leave a comment so that everybody else can learn from my mistakes all right i hope that was helpful thank you for watching
Info
Channel: Mark Alloway
Views: 30,803
Rating: undefined out of 5
Keywords:
Id: -ubDqXZtdJE
Channel Id: undefined
Length: 49min 35sec (2975 seconds)
Published: Wed May 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.