You’d think that putting a road down would just be a matter of pathfinding, but a good road often needs to alter the terrain a bit. The road needs to be flat enough to drive on, sloped enough to handle the terrain, with bridges, tunnels, and excavation to carve into the sides of hills. Not to mention that the road shouldn’t be too sharply curved.

Here’s a paper from 2010 by Eric Galin, Adrien Peytavie, Nicolas Maréchal, and Eric Guérin talking about how they generated roads. They calculate a discrete shortest path, using segment path masks to takes care of the difference between discrete segments and a continuous path, plus a bunch of cost functions and calculations to hand curves and bridges.

Once they had a path, they used it to generate clothoid splines. Some bits were further segmented to mark bridges and tunnels, and then the roads themselves were blended with the terrain by removing the vegetation along the route, refining the mesh, and adapting it in the blend regions next to the road.

http://arches.liris.cnrs.fr/publications/EG2010.html