Road Builder Unity3d package Logo
Road Builder Lets you create non-linear roads easily by using a network of nodes. With easy to use buttons to extrude, join, insert nodes and create mesh. Building new roads has never been so easy.

The options let you create one large mesh, or smaller meshes to help with culling. Drop to ground, and whether to add collision or not. And you can control the intersection of the road, to set the height and width of the curb.

This package has all you need to create 7 different road types from normal (with and with-out pavement), grass, sandy, race track and even a rail track. And you can add more road textures/materials as you need. You don’t need any programming skills to create amazing looking roads.

You can download Road Builder from the Unity Asset store Here

Creating your first road:
In your scene add the prefab 'RoadNetwork_Main_pf' from Assets->eWolfRoadBuilder->PreFabs folder.

Road Builder How to build your first road With this prefab selected, click on the Start new road button in the inspector. This adds a new road node to the scene as a child of the network node.

Now select This new node and click the "Extrude road" button. this is your first (and the smallest) road. Click on the "Create Mesh" button from any node and it will create your road.
From here you can Extrude from any node, just select the node and press Extrude, Each node has a type (Union)

End- One connection
Corner- Two connections
Junction- Three connections
Cross Roads- Four connections


You can't extrude from a node with 4 connections.

Just press on the "Create Mesh" to check your final mesh.
Road Builder How to extrude roads


Modifying existing roads:
The options on the selected nodes will change if you have one or two nodes selected

Single Node selected
Double Node selected
Road Builder Single node inspector Road Builder Double node inspector
Delete Node: Select the node and use the "Delete Node" button in the inspector to remove any nodes you no longer need. It's best to use the delete button as it updates the linked nodes

Connect Nodes: Select two nodes that are not connected, and press "Connect nodes" to connect them.

Insert new Node: Select two nodes that are connected, and press "Insert new Node" to create a new node in between them.

Materials frequency:
On the Road Builder Script we have the Details section that lets you define how the different materials are applied to each road.

For this example I'm just using 3 different textures/materials.
Road Builder road texture Yellow Road Builder road texture green Road Builder road texture cyan
Road Builder material frequency

The look of the road is defined from the set of material frequency items.
The first frequency you should always have set is the "Main Texture" This applies the material to all of the road.

"Once per road" will set the material to just once section per road. you can see in the above example as the green section on the road.
This option is ideal for one off details like Manhole covers, drains, etc..

"Random 50 Percent" Will replace the current material about 50 percent of the time.
Road Builder materials with Random 50 Percent

This option is ideal for more common details like road damage etc..

All the options here can be stacked, adding a new "Once per road" to our example will always set the once material on top of the other settings.
Road Builder Once per road material
So here you will get the Blue material on each road (Once per road), but you will get a mix of Yellow (Main) and Green (Random 50%)


The current list of options are listed below.
  • Main Texture: Base texture for the road
  • Once Per Road: Will only appear once per road
  • Random 50 percent: Will randomly appear about 50% of the time
  • Random 25 percent: Will randomly appear about 25% of the time
  • Middle of Road: will appear in the middle of the road
You can add more by updating the code at SetMaterialsArray in RoadConstructorHelper.cs file.


Defining the look of the roads:

The look (contour) of the cross section of the road is customizable. With the options below
Road Builder Cross Section Details
  • Road Width:The width of the road
  • With Curb:If ticked will create a Curb
  • Curb Height:How high the curb will be above the road
  • Curb Slope:How far back the curb starts
  • Curb Width:How wide the pavement section is
  • Curb Edge Drop:If the curb is raised, then this can be used to fill the gap at the far side of the road
Road Builder Cross section example Road Builder Cross section example Road Builder Cross section example


  • Create Collision: Whether or not you need mesh collision on the road mesh object.
  • Mesh Per Node: If ticked this will separate the mesh and create it on each of the nodes. This is to help will object culling. if not set it will just add the roads as one mesh on the base object.
  • Drop To Ground: If ticked will drop the road to any object with layer set to "Ground". Note this could be slow for large roads.
  • UV Set: The main textures used for the roads have the road and pavements, "ROAD_PAVEMENT" But if you are not using the Curb/Pavement this is wasteful and you should select the "ROAD_ONLY" option that will use the full width of the texture as the road.

Road Builder Road
Road Builder Road only Road Builder Grass road Road Builder Clean road
Road Builder Sandy Road Road Builder Race Track Road Builder Rail track



Dynamic road widths: (release v1.1)

With the release of Version 1.1 you can now set the Cross Section details per node. Allowing you to change the width of the road and the curb settings.
Road Builder Cross Section details per node
Each Road Network Node now has the option to Override Cross Section
Road Builder node Override Cross Section Road Builder node remove Cross Section
Just Click on the Add Override Cross Section to override the settings. And the new script will be add to the object, that will let you set your Cross Sections Details. If you need to remove the Cross sections Details just click on the Remove Cross Section Button.




Override road materials (release v1.2)

With the release of Version 1.2 you can now set the material frequency per node.
Road Builder material frequency per node
Each Road Network Node now has the option to Override Material Details

Just Click on the Add Override Material Details to override the settings. And the new script will be add to the object, that will let you set your Material Details. If you need to remove the Override Material Details just click on the Remove Material Details Button.

Please note: Override material will not work well for Junction and cross roads.
This is down to the way Junctions are created as a mesh.(Future releases may fix this)


Rounded inner corners (release v1.4)

Crossroads and Junctions can now have smooth rounded inner corners.
Full release notes for 1.4 can be found Here
Road Builder Rounded inner corners



Baked Light map support(release v1.5) June 13th 2017

With the release of Version 1.5 you can now use the roads with Baked lighting. Just enable the new Baked Lighting option and adjust the unwrapping options.

The Unwrapping options are the current default import options on normal mesh import.
Road Builder Baked Light map support options
Road Builder Baked Light map support



Modify terrain(release v2.0) July 24th 2017
With the release of Version 2.0 you can now modify the terrain to match the road.
For more details
Road Builder Modify terrain



Closer nodes and 5 or 6 road junctions (release v2.1) August 30th 2017
Updated the mesh generation for junctions and crossroads allowing closer nodes to be much closer.
Road Builder Closer Nodes

Junctions can now have 5 or 6 connecting roads
Road Builder Five roads connection



Much faster mesh creation and AutoBuild option (release v2.2) September 09 2017
The create mesh will now only re-create the mesh if the node has change.
This can be seen by the color of the road debug lines, Yellow it will not rebuild the mesh, Cyan it will rebuild the mesh.

Auto Build option, once enabled it will automatically build the roads when the node are moved.

Note the AutoBuild option can only work when
Mesh Per Node Is ticked
Drop To Ground Is not ticked

You can see the auto build in action below
Auto build road options




Release Details:

Version: 1.0 (Oct 18, 2016)
  • All main features (Initial release)
Version: 1.1 (Jan 25, 2017)
  • Add the option to Override Cross section details per node
  • When you create a "Start a new road" it will automatic selects the newly created road.
  • [Bug Fixed] Added Unity 5.5 compatible code for mesh optimization
  • [Bug Fixed] Extrude Road would something lock-up unity. This has been fixed
Version: 1.2 (Feb 6, 2017)
  • Add the option to Override material details per node
Version: 1.3 (Mar 9 2017)
  • Fix curves where the nodes are close together.
  • Fixed a bug in the RoadJunctionOrder where it's added the same angle more then once
  • Changed the name of the "Insert new node" to "Insert node between selected nodes"
Version: 1.4 (May 18th 2017)
Full release notes for 1.4 can be found Here
  • Added Rounded inner corner for CrossRoads and Junctions
  • Extended the texture used for the roads to allow more details for CrossRoads and Junctions
Version: 1.5 (June 13th 2017)
  • Update the mesh creation to work with baking lights on the road
  • Updated pre node option to work better with random textures options.
Version: 2.0 (July 24th 2017)
Full release notes for 2.0 can be found Here
  • Added Terrain modify
Version: 2.1 (August 30th 2017)
  • Update how the junctions and cross roads are made so that other nodes can be placed much closer than before.
  • Junctions can now have 5 or 6 connecting roads.
  • Added the option to delete all selected nodes.
  • Added a safety check, to remove any roads node that are the same as the parent.
  • Added repair layout button on the base layout object to clean up nodes with missing or broken links.
Version: 2.2 (September 09 2017)
  • Only create mesh when the nodes have changed
  • A large speed increase when calculating the network of nodes. Thanks to the help of a road builder user "Kalin" who supplied some code.
  • AutoBuild mesh option for real time editing
  • Added tool tips for some options in the inspector

Unity Asset Store:
You can download Road Builder from the Unity Asset store Here


Support:
If you need more information, help or even request more features please email me at
RoadBuilder@ElectricWolf.co.uk