How to Capture World Terrain with Buildings in Blender 2.81

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay to start out make sure you've downloaded blender osm premium you could download it in the description down below once you have that go ahead and open it on Windows 10 or whatever operating system you're using and then you have the zip contents and let's just go ahead and extract those to the desktop and once they are extracted then we're gonna want to also extract the assets contents and it could be any directory that you prefer alright now that they're extracted let's go ahead and open a blender we're using version 2.8 1a and when you open up blender go ahead and click on the edit and then preferences and then under preferences you should see add-ons right here and click on add-ons and then in the search box you could type OS m and you'll see that it doesn't exist right now so let's go ahead and click on the install button navigate to your desktop or wherever the extract the contents are and click on that and then open it and then now you should see that it's the OS OpenStreetMaps is now an add-on inside our blender and if we click on the check box and that activates it and then we got a set through some preference setting up so if we click on the directory to store downloaded Open Street Map terrain files we could just set that to any directory really but for the purpose of this video I'm going to set it on my desktop ok so that's where our terrain files are going to go and then we want the directory with the assets that we extracted so let's go ahead and locate that which is on my desktop there it is hit accept ok and then now the last thing we need to do is set up the token so if you click on the Get It button it should bring you to this webpage and if you don't already have a map box account you're gonna have to create one and once you get in you could go ahead and click on the create token button and give it a name we're gonna call it plunder LSM and the default public scopes and secret scopes should be fine and we don't need to add a URL or anything so just go ahead and click create token and confirm your password okay then we should see that token we just created down here under the access tokens let's go ahead and copy that by clicking this button then if we go back to blender we can paste that token directly into here and everything should be working now you've done that and so now you can just close all the Preferences and I should store that okay so once that on then you can see that there's some items that we don't quite need in our workspace so if you just go ahead and follow along the keyboard and mouse commands that I have down here you shouldn't see this in blender this is all for my video recording so you could just copy what I do so we want to left-click and drag make a selection box and select all the three items currently in our scene and if you push the delete button on your keyboard then it should delete everything because we don't need those and then if you click on this arrow right here it's going to show you have some options and if you click on the OSM tab this is the basically every option that comes with the OSM add-on so let's start off by selecting a region and we also want to make sure that we're importing the terrain to start out with okay and then if you click on the select button it should bring you to a web page where you can navigate around the world and create selection regions so for the purpose of this video we're gonna go ahead and do Tokyo and this whole harbor right here so let's go ahead and put that in our screen view and then click on the show selection rectangle and that will give us an area that we can capture so I'm going to drag it kind of around like this I think that's pretty much everything I want to capture and maybe I'll make that a little smaller that should be good and if we see over here it's gonna say your area is too large so there's like importing issues when you're trying to capture like a lot of buildings it's just too much data for the server to handle but uh for terrain blender osm the importing server usually handles that pretty well so you can do like pretty large areas for terrain so we're just gonna go ahead and copy these coordinates just manually but when it when the area is like small enough and it's fine then it should just give you a copy button to make this process really easy so we're just gonna have to manually do this so copy that coordinate and that corresponds to the top coordinate right here and then let's go ahead and open up that page again let's go to counterclockwise and just match the coordinates the coordinate areas with these areas or text inputs okay and then click on import now this should take a few minutes or a few seconds and if there's any issues with your coordinates then you should see an error message down here so you'll know it's finished when you see a terrain orange selected object appear in your scene collection okay once you have control over the layout again that means your terrain is pretty much finished importing you could tell that your turn is finished if you also see it right here in the scene collection and you're probably not going to see it in the layout and that's because we're zoomed in really close so we could only see like thousands of meters right here but we need to see like millions of meters all at once so to change that if you click on the View tab in the upper right hand corner then you can see the view end and let's change that view into something really large something like a billion and now if we start scrolling out keep scrolling out keep scrolling out and you'll eventually see all your terrain so there's mine and that's how you know the terrain import is successful now that we have our terrain and we're gonna want to reduce the geometry so currently it is really complex and there's equations that will happen with this with the future operations we're about to perform on it so to simplify it let's go ahead and select it and we know it's selected when it's orange up here and then if you look on the right side you should see a wrench click on that and then we're gonna add a modifier and that's going to be the decimate modifier and by default it should be on the collapse tab and we want to make sure that the ratio is well I guess it just depends on the project but I'm gonna try doing something probably around like point zero five for the ratio and if I click away it's gonna start processing and we can notice that currently I'm at nine million seven hundred sixty two faces and it's just a really large large computation that it needs to work on real quick so give it a few seconds all right once it's finished you should have control over blender again like this and you can see now the current face count is pretty close to a million so we greatly reduced it and you just want to make sure you check off this triangular option right here that will help out with future operations you'll do on on this terrain and this should also take quite a few seconds okay and once you have control on blender again just make sure you apply the modifier by pushing apply right here and I should also take quite a few seconds currently it has been taking me about like three minutes to do this size of the landscape but it should vary based on your project and finally once you've finished your modifier go ahead and save your project so far all right now that we simplified the terrain let's go ahead and level out this ocean so we can see that the OpenStreetMaps captures like the depths of the ocean and if we look closely around the mountains there's it's a little choppy and a little like squarish around certain regions so we just want to level all that out so it'll make the rest of our project looks look pretty good in the future so let's just go ahead and start out by changing our mode to edit mode in the upper right hand corner by clicking on the drop-down and just going to edit mode or you could also push tab and that will take you back and forth between modes and you should see all the vertices are selected by default once you go into edit mode so let's just click away and I should deselect everything it may select one vertice if you click away but that's alright so now let's try to scroll in and find a reference vertex for the ocean height and what I'm looking for is just the vertex that's like right near the surface I want everything to come up too so I'd say probably a pretty good for Texas one like this it's kind of hard to tell you just want to find something right along the coast that's like at the the like beach height I guess and if you could find like like one of these like square shape areas then then you know it's a pretty good reference point so I selected this one and what I'm gonna do now is go ahead and hit the select tab up here and there should be an option called side of active so let's click on that and what it's going to do is select all these active vertices on the x-axis by default so if we look down here in the bottom left-hand corner and we click on the drop down arrow then it should give us more options we could play with right now and let's go ahead and change the access to the z-axis now it should select everything at a certain height so that's pretty much our whole landscape but that's all the mountains and we actually want to capture everything down below so just change a positive access to the negative axis and there we go we've basically captured everything for for the ocean so now let's go ahead and level it out and to do that if you push S on your keyboard that's the resize operation and if you just click your mouse immediately after you push as then you will see this these options on here and you want to make sure that you keep this scale X 1 and then the scale Y 1 but changes scale Z to zero without that'll do is just adjust the height for everything on the z axis to the same exact height so now we can see everything's like pretty much level but now we got to do one more thing so we can see that there's like a pretty big drop right around the the coastlines so let's just go ahead and bring our selected vertices all the way up to that coastline now a good way of doing this is if you push 1 on your numpad that should bring you to a front perspective of all the vertices right now another way to do that is if you click on the view up here in the upper toolbar and then you go to viewport then you should see these different views and I went with the front one so now that you're in the front view if you look up a little bit you can see here's all the edges and faces and the vertices are pretty far apart so we just want to bring these vertices up to up to the like baseline of all the other vertices so to do that if you push G on your keyboard is going to move all the vertices and you just move your mouse up really close to the other vertices it doesn't have to be perfect but uh as close as you could get it is better so I'm going to zoom in a little bit more just to bring it a little closer and you want to make sure that in the move options down here that everything stays pretty close to zero on the X and y axis but the Z access of course is going to be a bit different it's going to be whatever numbers relative to the amount of change you want to do okay so now everything should be pretty level around the coastlines and so we could go back to object mode and then we should see that everything looks pretty smooth just like that all right now that you've finished leveling out your ocean let's go ahead and move the height of the terrain to pretty much right next to the origin down here so you can see there's like just a pretty big gap and that's just because our ocean depths that we've captured earlier so again let's go to a front perspective and I'm going to push the one on my numpad to do that and I'm gonna zoom in quite a bit near so I could see the origin and the land I'm gonna click on the land and then I'm gonna go ahead and select this this move arrow direct manipulation tool so I can start dragging this terrain down so I'm just gonna pull it all the way down really close to this red line and probably another thing that will help you out at this point is if you push the magnet tool the snap up here I should look like it magnet that will allow you to start snapping vertices to certain grid positions if if they're close enough so let me zoom in a little bit closer let me grab my arrow which is now way down there and we can see the snap just kind of goes right past that red line so maybe we want to undo the snap for now I'm just going to bring that really close and then you're gonna go up here in this upper left hand toolbar and then select object or just hover your mouse over object and then hit apply or hover your mouse over reply and then click on location so right now that will reset the arrow modifier directly back to the origin and that now this is like the local reference point for for this object so I'm gonna go ahead and keep pulling it down and just get it real close and I'm just going to zoom in a whole lot just for accuracy purposes all right I think that's pretty good now see right now the terrain just looks a little weird from this this perspective and that's because in our view we have our clip start at point one meters so let's go ahead and just change it's a 1 meter that actually doesn't fix anything well later on the clip start at 1 meter will will really help out your your view perspective one other thing we should do real quick is uh with the front perspective let's go ahead and set the terrain let's apply it again at this height so I'm gonna go object apply location and then if I click over here on the item tab I want to move up the terrain just to meters now the reason I'm doing that is so that right around the docks and the the terrain that there's at least like a little little lip that everything could collide with and you can see it from a ship's perspective probably just one meter is okay - yeah I just you just want to kind of think like it most of the coasts coastal surface is going to be like a concrete barrier essentially from the ship's perspective so yeah just set it to one meter that should be good one meter above from that origin and we could just go ahead and finalize everything by doing that apply location one last time all right all right now we're going to want to import the coast lines and to do this it's going to enable us to cut out the ocean from the terrain and it's going to give us find our details around the coast and we're gonna want to open up the OSM add-on and then make sure you're on the OpenStreetMap tab and then with your import settings make sure there is no terrine selected here should just be blank like that and then you want to be on 3d simple and then make sure import water objects is selected and nothing else should be selected and then new settings below here should match mine just by default so go ahead and click on the select tab and if you've had your terrain selection window open from earlier than you could just reference this so this is the size of the terrain we captured but we want to capture smaller areas for this and you know the area is good enough when you see this your areas too large warning go away so I'm going to go down to something kind of like that and it doesn't matter if these regions are like overlapping in in different ways because we could just merge everything together later on so now that we see the areas there's no warning sign right here let's just go ahead and click on the coffee and it will copy it to our clipboard and then we could paste it in to blender just like that and you should see these coordinates change and then just go ahead and click import the import should take about 30 seconds to a minute you you once the import finishes you should see now there is a black outline it over the terrain and you'll see there's like some blue shapes in here which are like internal smaller bodies of water that we don't quite need and like rivers and stuff like that so that's the water right here and we could go ahead and delete that just by right-clicking and deleting it now let's go ahead and cut away the terrain from the coastlines and to do that we need to make the coastline a solid object so let's start out by hiding the terrain so you just hide it by pushing the eyeball in the upper right hand corner you want to do a top-down view on the coastline by pushing seven on the numpad or you can also go under view viewport and top and we want to go to edit mode so select the coastline and either push tab on your keyboard or go down to the edit mode and now see that this whole coastline is an open object up here so let's go ahead and fill it fill it in so I'm gonna go ahead and select the furthest vertice with no second connection and I'm going to extrude it up I have my magnet snap selected so I can go along the axis without having to worry about weird angles it doesn't have to be perfect either I could uh I could each piece couldn't overlap quite a bit so I screwed that up and now I'm gonna find the other open vertice which is this one and then when I connect it by holding shift and selecting both of them and then pushing F on the keyboard and that should fill in an edge right there so now there's another issue with this and that is if I do ctrl L that will select the link the linked Ferda sees and we can see these vertices and edges are connected but the whole outline isn't connected so it's a bunch of individual groups that are connected but the whole thing isn't so to fix that what we'll do you want to make sure you do these next few steps in order every time and what we'll do is select everything by pushing a on the keyboard or you can do select all and then click on the mesh tab up here and you're going to want to do a cleanup urged by distance what I found works pretty well these these numbers may be different based on new project but merged by distance with point 0 1 meters works pretty good so once that's finished you should see I've removed a certain amount of vertices down here and so that's pretty much finished once you click away and that dialogue goes away and now we want to fill in this area and you could do that by well before I fill in I just want to show you do select the vertice and then ctrl L now everything's connected now that we've merged by distance and even these outlines out here on these little islands are also merged so everything is pretty much connected and loops so now if you select everything and then push F on your keyboard that should fill in the whole area and you'll see it shades in like that and then now we want to do one other thing which is we'll do a cleanup and then a degenerate dissolve and what this will do will enable us to simplify this terrain quite a bit because right now there's just way too many vertices for our future steps so if we the generate dissolve and edit mode right now then our future operations should work out fine it may take a few seconds you okay so once it finishes loading a merge distance I've been using is around like five to ten meters it just really depends on your project so yeah it's kind of hard to test right now if this is right number but just just go with something kind of like big and I you should be able to see around your terrain that certain objects can like go away and get destroyed or just like simplified in certain areas just for our purposes that that level of detail just isn't too important okay so now that that's all finished let's go back into or before we go back into object mode let's go ahead and do a quick cleanup on this so if we go to mesh cleanup there's a delete loose option and that will just delete any extra edges or vertices that are not quite connected to any faces or anything so now that that's finished let's go back to object mode and I'm right now an x-ray view you could toggle that up here so you can see through objects so let's go ahead and solidify this object and you could do that by going to the wrench down here the modifiers and then you want to add a modifier which will be the solidify one and then I usually do a thickness of 2000 just has to be greater than the height of the terrain and they could be like way bigger it doesn't really matter too much and then I set the next property offset to zero so that way it goes like halfway in between the train goes halfway in between the the shape we've created and now we can successfully cut away the terrain from from this shape so I'm going to apply that modifier I'm going to add another modifier which is the boolean and then you're going to want to do the intersect operation and then select the terrain object all right and now if I hide the terrain you should see we have a cutout of just that one individual section so that's exactly what we need now let's just go ahead and buy that operation and now you could do the same steps for the rest of the whole terrain you now if you try to do that boolean operation that intersect with the terrain and it doesn't look like this and you're missing like maybe you only have the like islands were able to cut out and not the like main part you're having issues with that whole intersect then that means your your geometry is just too complex or there's some gaps in there I mean there's various sources of errors that could actually happen within that boolean operation so you just want to go ahead and go back a few steps and maybe even restart from the import and just make sure that you follow the instructions I provide it pretty closely and then play with your numbers a little bit and maybe make things a bit more simplified that's my suggestions at this point of the process I've had quite a bit of issues but hopefully you could bypass it now what we're gonna do is import the buildings onto the terrain and to do that you will go into the OpenStreetMap tab and make sure you are on the 3d simple and then check the import buildings but not the water objects just have it like that and these settings should remain the same and then for the terrain we don't want to actually use the terrain otherwise this this might crash and leave your lender in a deadlock so go up to OpenStreetMap coastlines and the coastlines is just as cut out that we've used and this is far simpler and hopefully the buildings will project within a reasonable amount of time onto it so then once you select with that just go ahead and click import and give it a few minutes this process should take maybe like three to five minutes okay and once the import has finished for the buildings you should see it looks something like this the building should be orange just that's the way they show up without any textures or anything we could do the textures later on and you'll see there's a envelope within this object right here and we don't need that so let's just go ahead and delete that and let's do some organization now that we're compete with this step of the process so go to the buildings just select that and then open up the object properties and you can rename it here I'm gonna do buildings maybe buildings one because there's going to be a few of them and then coastlines let's just smash that with the buildings just like that and we put them all inside the collection so now we're pretty much finished with this little area and we can move on to the rest of the areas you okay now that we've finished creating these different sections of land and buildings let's go ahead and start merging everything together so how we'll do this is we will start out with the terrain ice so I'm going to just go ahead and select all the terrain objects which is now renamed as the coast lines over here and then you want to go to object and look for join if you click join then it will urge them all together just like that and if you actually noticed I'm going to undo that real quick you may have some terrain objects kind of like overlapping like right over here and you can fix this by going into edit mode and do a box select by pushing B on your keyboard and you could draw a box area and just probably go over it like this cuz it's just gonna be overlap and delete all the vertices oh another thing undo that with control Z if you click on the x-ray mode then you'll be able to select all the vertices behind behind other vertices so that way you can select everything in this area see I just go ahead and do that and delete and that should be good so now go back to object mode everything looks alright let's toggle off x-ray again now we have that great see a let's go and merge everything by clicking and selecting all these those lines and go to object join or ctrl J and now that's all merged together and now we'll do the same for the buildings so select all the buildings go object join one may take a while right now once that's all finished just go ahead and save it so far and you could go ahead and rename your buildings and coastline since we just merged all the terrain and buildings there's probably some overlapping geometry so we could fix that by going and selecting the terrain essentially I rename this to terrain now oh now there's two trains I'm gonna delete the old one and I'm just like this rename it's a train now yeah select it and then go to edit mode and if you do control a select everything and then you just want to do a cleanup and merge by distance and let's go ahead and merge yeah anything within when 0-1 meters should be fine and when I click away you can see I'm actually deleting 29,000 vertices so yeah that's a pretty important step say I'd go ahead and do that and your little object should be a little more faster okay go back to object mode and let's go ahead and do the same thing for the buildings so select the buildings go into object or you want to go into edit mode by either pushing tab or selecting in the upper left hand corner since this model is pretty large it's a little slow for me so I'm going to select everything and then I'm gonna go to mess clean up a distance you okay and if I click away it didn't tell me how many vertices are removed but I'm pretty sure we removed quite a bit so I could select everything and I could try doing that one more time just to be safe you you okay now that we've done that twice I'm pretty sure it's okay back to object mode and let's go ahead and save our progress at this point you now what we want to do is add a little bit of volume to the terrain and how I'm going to do that is I'm just gonna pull down the edges of the terrain just a little bit so that way if we're using radar or something it could just collide with the coastal surfaces so let's go into let's select the terrain and go into edit mode and then you're gonna want to do select everything I select and it a by pushing a on the keyboard and then i go to select loops and then do select boundary loop and I should see something kind of like this and then you're gonna want to go and look from a front perspective by pushing one on your keyboard and then you're going to extrude down by pushing e on your keyboard and then pulling your mouse down just like that and it might offset a little bit like that so just go ahead and change the z-axis to zero or not Z sorry x-axis to zero the y axis should be also 0 and Z should be something pretty large so now we've basically just mirrored the border down and it's still a bit hilly so let's just go ahead and flatten that out by pushing s on our keyboard to resize it and we're just going to click without moving our mouse around and then go to the z axis and change that to zero scale okay and you should see when you click away it'll all update to a flat surface so now we want to move this back up really close to that red line which is the Z and Y axis so I'm just going to go ahead and grab it and pull it up and it might be a little laggy just like that zoom in okay zoom in pretty close and then grab it and pull it back down just like that okay now that we've done that now there should be a little bit of a lip around all the terrain radars could collide with let's go back to object mode you yet now you can see there's a bit of a coastal surface now around everything
Info
Channel: ECSL Lab
Views: 3,226
Rating: 5 out of 5
Keywords: blender, 2.81, OSM, open, street, maps, 3d, modeling, world, terrain, buildings
Id: -LJM-teXf4Q
Channel Id: undefined
Length: 42min 57sec (2577 seconds)
Published: Fri Jan 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.