How to Make Large Road Systems with OSM Data and the Dynamic Road System

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody I'm going to show a quick way on how to make a road system using the dynamic Road system on the Unreal Engine Marketplace and osm data from open street map this road system you see in front of you was prototyped in just a few minutes using a bot on Discord I created I want to preface this by saying it isn't 100% accurate and it isn't a part of the sale Dynamic Road system pack since it depends on open street map working and a few other independent systems the actual end result took me couple of extra hours to get it the way I like it but you can probably still tell that there's room for improvement because we recently updated the dynamic Road system to have better support for this osm integration it's now even easier to make your own large scale Road system the first step is to go into our Discord Channel which there's a link for in the description of this video and scroll to the osm channel and type in slm and it will have a few different text boxes to fill in the third box can be ignored we are planning to make a feature that will allow you you to specify which types of Roads you want to import such as exclusively highways or if you want to ignore tunnels it would handle that but we are going to use latitude and longitude shown in the example to get the road system of Washington DC in the United States we can hit enter and wait for the result in real time but I'll quickly show what the map we are copying should look like everything in the highlighted area should be copied over and now that the osm is done we can see the output and you may notice that the output message is private so only you and the server can see this data to quickly go over the privacy policy of the spot anytime a form is submitted the user's name the coordinates and the time is recorded by the server internally and this is to prevent the user from spamming or misusing the bot or if it crashes the coordinates will be tested internally to help us prevent crashing in the future this bot will turn off every second Tuesday of the month for automatic window updates but other than that the bot should be on 24/7 7 but going back to the output it should give us a zip folder with a text file inside It'll ask you if you trust the file download and to that I'll say yes but it never hurts to use some sort of security software if you want to ensure the file is safe now that it's downloaded we can open it and it's a long list of Unreal Engine data that doesn't really make sense to us but when we paste it into Unreal Engine it'll make sense to Unreal you have to give unreal a second to load it and just like that everything is loaded but it looks messy this is because some things get loaded in the wrong order so it needs to be refreshed luckily we have a new blueprint called the mass Road manager that can help us with this I don't know why unreal does this but the categories for the options on this blueprint are scrolled way down if anybody knows how to fix that I would love to hear it and for those of you that have older Hardware we have a feature in the mass Road manager that can change the resolution of all the roads at once and that can make this road system Run 10 times faster granted the road system will not look that detailed but could be very convenient to use while you are still editing your roads due to the road system being a dense full square kilometer and I am recording this in 4k on the same computer I'm going to set this to 0.5 to run at half resolution so I set the value to update Road resolution at 0.5 and then press the button that will update all the roads labeled update all roads now there are still some roads that seem stretch and that's because the points they're supposed to connect to got cut off so you can choose to fix the points or delete them I'm going to delete them if we look around the scene you may notice that there is one road that's very weird overlap in the middle and this is one of those weird edge cases my program doesn't know how to handle because it's counted as three roads trying to join itself to the middle of the road at One Singular point I believe that this is either mislabeled in osm or is two roads going under under the same name and it should really be considered an intersection but that won't stop us from correcting it I'm going to correct it by editing the road lines in this road and cutting them off before the supposed intersection and after it there's a saying that goes choose a lazy person to do a difficult job because a lazy person will find an easy way to do it and we're going to fix it using the lazy man method the correct solution would be to find a way to cut the road in half add an intersection and reconnect all the road connections but that sounds like a lot of work we already have all the Road Connections set up so it would just be easier to edit all the road lines so I'm going to go into each road line and adjust the start or end cut off so that it stops at where the intersection should start then I'll truncate the road and add a new one with the road connection originally I was planning to just duplicate the road lines and then cut them off from the opposite direction but I found out while recording this that I didn't include the function for that in the latest release but the next update the dynamic Road system will include that method when we're all done it should look something like this now that this road looks good we can take a look at some of the other roads and immediately I can see some roads and parking lots that are overlapping in a weird way there are a few ways to deal with it we can fix it by readjusting every road or we can take the easier method and just have the roads not overlap on top of each other and just allow them to intersect this method only works with flat and semi flat roads but since this is a city environment it's not too hard to believe the city's landscape is semi flat we can fix this by going to the mass Road manager and checking allow Road overlap and use report Road overlaps and any roads that are stacking on top of one another is going to add the other to its actors to ignore when snapping variable so that it ignores that actor in order for it to update immediately we can press update all roads to see it the last thing we need to check is to see if the road intersections and Road Connections are being used correctly sometimes this blind can get Tangled or put in wrong when making the transition from osm to Unreal luckily we have a way of quickly checking and that is by opening the output log and looking for a message that says that the geometry is not good you can press update all roads on the road manager blueprint in order to get the message to show up again and we can see there are quite a few roads that have invalid geometry all right from here I'm just going to go through the entire list of invalid roads and look at each one to see what's wrong with it let's start with the first one which is BP Road split 58 you can either copy that description or the other one that's right next to it either one doesn't matter you can find either one by copying and then pasting it to the outliner so I'm going to paste in that one and I'm going to press F and it'll just shoot me right to it and we can see that there's something wrong with this connection if I look at it a little bit more closely I can tell that this looks weird and I know it looks weird cuz it has this thing jetting out of it and that's cuz it has a Road Point too close to another road point so if I delete one sure enough works I have to press reset connection and that looks normal and let's move on to the next one let me copy this description paste it up here and then press F to go find it okay this one is too close if I were to take a road Point let me just delete it because the other one's fine and then press reset connection yeah that looks pretty good move on to the next one copy it oh there's quite a few that have uh similar description but I know that I am looking for Road split 12 or what is it C 17 is yeah b b Road split 12 let me copy that since it looks like that's a better description there we go found it press F uh this one is supposed to connect to this road but it's out here so we have to move this point back all you have to do select it and then move it out of here I think this is actually going to be tackled later in the video video so let me leave that there uh let's go to intersection 144 okay so this one's just a little bit too close as well we'll delete a point and we'll back up the one that's over here and then press reset connection that looks good did 144 let's move on to 162 press F and yeah this is barely even a road at this point if you have a road that only looks like a sliver of something probably best just delete it I can tell that it's right near the edge of the map yeah so I'm going to delete this road it'll say uh do you really want to delete it yep it'll break some references but it doesn't matter cuz it's going to be gone in a second all right now that one was fixed that was 162 go to Road split 26 and just like that we found it f okay so this one it tried to shift it over too far and you can see that it's kind of twisting the spline we don't want that so let's shift it back back when it shifted just about there we could probably even widen up the connection just a bit and then press reset connection and that looks a lot better all right so that was Ro split 26 let's do 27 I'm going to guess since it has a similar name it's probably the one on the other side of this one oh no okay so this one's way too close to the road if we were to back it up go into this one reset connection yeah that looks all right and then if we do the last one road split 38 copy it in there click it f uh where is it trying to connect to oh it's trying to connect to this road but it is too close I think the problem with this road if I go over to the osm tags of this it's actually either supposed to be above or below and because of that it looks like it's overlapping because they're being put on the same elevation so my recommendation is just to remove the the whole thing in entirety uh so I'm just going to delete this probably best to just sweep through and delete all the rest of these as well I think that's what I do in the final map as well cuz you really wouldn't see these any other way and I believe that is all the errors for going through all them let me back out to standard View and let me go through the rest of this all right so let's quickly go back to that road that we skipped over I believe it's this one down here press F to zoom in but we need to zoom in a little bit further so to explain what happened what went wrong with this road is that it tried to distance itself from the middle to the edge a certain distance but since it wasn't coming out at a smooth 90° or even uh 45° an angle here it just tried to come out at like a 5 or 10 degree it was moved just more into the road and so it never really had the chance to separate so what you would want to do here is you would want to move some of the points so that would be separated from the road we can tell this this is kind of like a an off exit so I'm going to move it so that it's down here what you would really want to do is have the connection blueprint uh be long and wide in order for to make a new Lane so I'm going to do update connected roads from this one since I can't see the road connection anymore and now I can see that it's there I'm going to press reset connection and that doesn't quite look good so we need to adjust it quite a bit for the road connection I'm going to make it a very wide Road connection let's try 700 that is quite wide maybe a little too wide uh let's get it down to 500 that looks pretty good but now let's move it down a bit uh let's see which way if we move it down this way yep that's good let's move it down a little bit further let's put at -1200 to shift let's reset the connection and let me pull out this blind point so that kind of starts to make that new Lane you can adjust this to however you like it if we go about there we should probably separate it a little bit further but this is kind of how you would create a new Lane if you wanted to like this there are multiple different ways you can make a new intersection and then have a connect to that but in order to make a new Lane looks pretty good we up the road resolution this would connect a little bit better uh but let's keep theed Road resolution as it is cu otherwise my computer will go ballistic so let's cover a few other Oddball things while we're here uh like this back here this has a certain curve to it in the real world it would probably have less of a curve so you can go into the curve scale probably tone that down a bit you want to tone it down just enough to where the corner isn't too sharp but it's still a pretty straightedge Road the same goes to uh the road that is in the middle here this little Pitchfork this is not supposed to be as curvy as it is so let's try to set the curve scale way down for this one as well do it to this and then you have to adjust the Road Connections that it's in such a way where it will connect pretty well so that's decent yeah I would say that's decent as is a few other things so I can tell that this also needs to be disconnected and there's a bunch of little things you'll find like that that you may need to work through uh I think there's another curvy Road in here there's a parking lot and there's a main road in it you can either choose to delete the parking lot or you can uh straighten this out uh choice is really up to you but let me return to the main position again there's another error where my program does not know how to handle how many lanes are supposed to be on a road because osm specifies it as three lanes going eastbound the program does not yet know how to interpret that so you may have to manually enter the number of lanes typically osm gives a tag of three right lanes more often than three eastbound lanes and the program knows how to handle the former a lot better and a cool feature about my programs importing is that you should be a able to see all the osm data in the osm tags of the roads this can have even more helpful information such as the speed limit Road name and like we mentioned before the number and direction of lanes the last major error is that roads with multiple Lanes may not line up when it adds or removes a lane this is because osm marks the double yellow lines as the center of the road even when it's off center to fix this you may have to move the road to the left or to the right to line up the lanes a lot of these errors can be fixed with extra development hours so we are trying to balance our work between development of dynamic Road system osm and YouTube videos so that everything is of the highest quality and fixed in an appropriate amount of time if you are watching this video way after it's published some of these errors probably got fixed by the time you're watching this anyways those are the majority of Errors you'll see and can sometimes take a couple of hours to fix all the little imperfections but it should save you a ton of time having them imported like this instead of doing everything by hand from this point you should be able to drive on the road with vehicles I'm using the vehicle template from Unreal Engine and changing the game mode to the advanced vehicle game mode I wanted to point out while not necessarily an error something that could go wrong if you drive really fast through an intersection there's a chance your car will get launched this is because every road has grading that bumps up the middle of the road like real roads do and the road connection is too short from the osm importing to make it a gradual incline so it turns into a mini ramp this could be fixed a couple of different ways one is to set all the road grading to zero two is back up all Roads connecting to the intersection and make the road connection larger to allow to be a gradual incline and three is that you can stop driving like a lunatic no but seriously if all cars are driving a reasonable speed they won't be affected like City simulators wouldn't be affected but racing games would be if you are using this pack and like it I would greatly appreciate a good review on on the unreal Marketplace it leads to more sales and helps fund the development of these features thank you that's it for this video until next time
Info
Channel: A Vie Guy Studios
Views: 911
Rating: undefined out of 5
Keywords: Dynamic Road System, DRS, Unreal Engine 5, UE5, road making tool, road building, procedural tool, game development, game engine, game design, game creation, Unreal Engine, Dynamic, Road, System, A Vie Guy Studios, Intersections, Parking Lots, Procedural, Geometry Script, OSM, Open Street Map, Large Road Systems
Id: JosxUr6DcB4
Channel Id: undefined
Length: 18min 8sec (1088 seconds)
Published: Tue Jan 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.