Houdini Procedural Roads – Anisotropic A* Path-finding
This project is a proof of concept implementation of the paper Procedural Generation of Roads by E. Galin in 2010. It was most popularly utilised in the Ghost Recon Wildlands road generation. The system works by using an Anisotropic grid which allows for a larger range of direction options for a node to travel to using segment path masks. Usually paths are limited to the 4 (90°) or 8 (45°) neighbouring points on a grid.
Utilising this method, I implemented an A* path-finding algorithm to locate the shortest path to the end point. I added an additional cost function to this algorithm to avoid steep slopes in the terrain, which avoids unlikely roads that are at far too harsh an angle.
This is a proof of concept – the system can easily be expanded on as described in the paper to include more features such as limiting the path curvature, adding bridges and tunnels, stochastic sampling of those bridges/tunnels, and of course the actual generation of the road followed by terrain excavation, smoothing and enbankments.
I wrote the code within Houdini using Python. I will eventually link the packaged HDA file of this work and a blog post on a breakdown of the code.