Once the polyline is built, I construct 2 quadstrips from it. The roadbed quadstrip is constructed to be 15 units wide, and is rasterized into a heightmap buffer using interpolated elevation values. (Hence the causeways and canyons; heightmap values are only sampled from the original 16 points, and generated via interpolation from that set, so large extremes of terrain can be cut off.) The second polyline is generated 5 units wide and is rasterized into a terrain blending buffer to draw the road terrain. (Which, in these shots, is actually my old cliff terrain and not very good road material at all.)
After the elevation quadstrip is rasterized into the heightmap buffer, I apply just a tiny bit of Gaussian blur (1 pass, 5x5 kenel) to soften the sharp edges of the roadbed's shoulders. For as rapidly as I prototyped the system, it works fairly well.
I would like to construct another curve tessellation routine that parameterizes on segment length, so that I can tesselate to fixed-length segments then re-sample the heightmap at these fixed lengths and interpolate road elevations from there. This should eliminate some of the widely varying roadbed elevation cutoffs, and result in fewer deep canyons or tall causeways. Of course, parameterizing on segment length is a little trickier; I'll need to hit Eberly's 3D book again to refresh my memory on how it is done. [grin]
Anyway, the images--
This first one shows an extreme example of causeway building in action. The engineer that designed this stretch of road needs his ass kicked.
This stretch of road worked out pretty nicely, only carving a single shallow canyon. The ascending piece to the left follows the flank of a ridge rather nicely.
This final one shows a little bit of a causeway. Further on, it rises to the top of a tall peak, and loops around the top. This stretch of road actually didn't turn out too badly.
Need to do a lot more work before I'm completely satisfied with it. But I still think it's pretty cool. Roads through randomized terrain are actually a little harder than they seem. [grin]