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:
- 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
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.
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.