I created a small road tool some while ago. However, because of a bug in the current (and maybe some future) releases of the engines code for Linux I am unable to use UE4 at the moment. Nevertheless I remembered this small blueprint and thought It could be useful for other people too.
The main Idea behind it was to create an actor network which could be used on anything, not just terrains, but to be able to create crossroads and other types of intersections on any kind of mesh. The blueprint is kinda messy but it can do the following things:
Features
Create plain road
Randomly use different road meshes (for example broken road bits)
The ability to change the percentage of randomness
Add âEnd Meshesâ like crossroads
Add new âlinkedâ road-actors to this âEnd Meshesâ via a Bluetility script
Connect a road actor to a specified socket of an âEnd Meshâ
Connect the start of a road actor to a specified Socket of an âEnd Meshâ
Align spline points to the underlying ground (via traces)
Change influence size of the road when applying to landscape
Apply road to selected landscape (only one per landscape)
Use a landscape-material where the road is applied
Of cause there are bugs:
Applying to landscape sometimes creates strange hightmap âscratchesâ (seems to be an blueprint/engine bug)
When connecting to an âEnd Meshâ the incoming spline is strangely deformed (youâll have to play with the tangent length to fix that)
Things youâll have to do to get it working:
Move the .uasset file somewhere withing your content folder in your project directory. For example /Path/To/Your/Project/Folder/Content/Blueprints/Tools/
Make some own street meshes and export them (or download the example Blender-file for reference
Replace the following meshes in the variables with your own: StreetMesh/SplineMeshComponent EndMesh/CrossMesh
Technical information:
The âEndMeshesâ should have their 0,0,0 (origin) at the location where the parent spline should be connected. I Included a Blender file in the attachment for you so you can have a look how I designed some of my roads.
For the people who are wondering. The tool is in the .zip within the attachment. You should be able to copy the .uasset into your project.
Other Stuff
I also prepared a small video to show you the intended workflow/some options you have.
Here are some pictures of a road network I made with it. The network uses usually two types of roads. One for the âsoon to beâ city. And one for the countryside. I also made bridges, some off-road tracks and walls. I was inspired by TDU2 which I liked for the big road network and the social interaction.
Thanks for reading and happy using!
If you like the tool and want to give something back, have a look at my CGTrader page. Maybe you like one of my scanned models or textures.
Hello - I am very interested in giving this road tool a go, to see how well it will work for our project. However, Iâm unclear as to where EXACTLY the .uasset file is supposed to be placed. In the video, your content browser window shows a folder within Content, labeled âBlueprintsâ, then a sub-folder labeled âToolsâ, and yet another that is labeled âRapid Road Toolsâ. I have tried 3 or 4 different options to have the .uasset file show up in the editor, but so far, no success.
I know very little about computer tech; just enough to be dangerous So any assistance you can provide is appreciated!
youâll have to place the .uasset somewhere within your âcontentâ folder within you project for example: \Path\To\You\Project\Folder**\Content\Blueprints**
The folder structure you see in the content-browser is mostly the stuff below âContentâ. A thing youâll have to do as well for better user experience is to replace the meshes from the variables End Mesh/CrossMesh and Street Mesh/SplineMesh with your own meshes.
However, Iâll add a Blender scene with some example meshes so you can see how they should be build. Just give me a moment
I added some more information about the setup of the tool. I also added a Blend file to the attachment so you can have a look how I did my street meshes for that tool. Have fun using it!
Hello Again - Thank you for your quick response to my query. However, I am still not able to get the .uasset file to show up. I created a âblueprintsâ folder in Contents, then a âToolsâ folder within âblueprintsâ. I extracted the .uasset directly into the Tools folder, but it does not show up when I start up the editor again. Iâm currently using 4.12 and 4.13. Is it compatible with these two versions?
Thank you for sharing this! Great starter point for me as Iâm wondering how to deal with roads in my upcoming project. Much better than default engine stuff, devs should pick on this, improve and incorporate it to engine, terrain without roads is just terrainâŚ
That could be the problem. I am using 4.14. Maybe you try that version. You also donât need to create the blueprints folder. You should be able to place the asset anywhere you want within the Content folder.
Havenât looked at the code yet but would be great to fuse a road tool with the OpenStreetMap plugin to generate real roads and be able to edit them. That would be mega!
Its more like an simple blueprint and by no means professional. But I think it could be possible to translate different points in the OSM data to spline points and cross roads to âEndMeshesâ. Than an algorithms just have to connect all the âEndMeshesâ to the nearest spline points.
The smaller one is the .uasset. The bigger one is the Blend-file. However there are no textures included. The textures I use are for selling on CGTrader, so I canât publish them for free.