This is a procedurally generated world composed of voxels. Two points can be selected in the world as start and end points to a road. Using an A* path finding algorithm the shortest path between the two points will be calculated and a road will be generated. The size and type of terrain can be modified at run-time.
A video providing an overview of the project can be found here.
Download the project and Unity3D. Navigate to Voxel World and A-star Road Generator > Assets > Scenes
and open one of the scenes to launch Unity3D.
Unity3D is needed to modify and recompile the project. Unity can be downloaded here. Select the Visual Studio Community download in the Unity3D installer to be able to make changes to the code and debug the project.
In reference to the UI, the type of terrain can be selected from under the Terrain Type
dropdown menu. The world size in chunks can be selected as well as the option to render using
the greedy meshing algorithms discussed in the report. The Generate World
button will begin
the generation of the world. Depending on the world size and greedy meshing setting, world
generation may take up to a minute.
Once the world is generated, a start and end location for the road to be generated can be set by following the instructions in the textbox on the bottom right of the screen. The cost sliders can be used to adjust the behaviour of the A* algorithm. Note that depending on the distance between the start and end location, as well as the costs of ramps/bridges/tunnels, the algorithm may take a very long time to compute the path. To be able to build bridges and tunnels without a long computation time, set their values to around 10-30 and make the road relatively short.
The project can be built for either Windows
or MacOS
To do so:
- Load
Scene 1
- Select
File > Build Settings...
from the top menu in Unity - Make sure
scene 1
is selected in theScenes In Build
box, if it is not then add the desired scene - Select the
PC, Mac & Linux Standalone
platform - Choose the desired Target Platform from the dropdown menu, either
Windows
orMacOS
- Select
Build
orBuild And Run
to compile an executable
- Unity3D - The graphics engine used
- Visual Studio Community 2017 - The IDE used
- SSAO Pro by Thomas Hourdel
- Shader Forge by Joachim Holmer
- Violent Days Skybox by Hipshot
Tested with Unity 2018.2.13f1 and Visual Studio Community 2017 Version 15.8.7
This project is licensed under the GNU General Public License - see the GNU General Public License v3 file for details
Oliveira, Caue Viegas, et al. "Game Engine with 3D Graphics." 2016.
E. Galin, et al. "Procedural Generation of Roads." 2010.