This sample shows how to autosplat textures based on the normal.y value of the landscape. It also includes using tvPath to splat roads as well.


Controls are listed on the screen when run, basic usage is to put a heightmap into the media\map\maps\ directory, in this sample named landscape-hm.bmp, it will generate 4 alpha maps sa1.bmp to sa4.bmp on load (if sa*.bmp doesn't already exist), sa5.bmp will be generated when you draw and apply a road.
Sorry for the dull textures, I didn't want to release a bunch of unattributable images i found on google, so i've included some images I took last summer, so all images are original and are free for anyone to use for whatever (they are quick tiling jobs, sorry).
texture scale and the landscape normal ranges checked, etc. are geared towards this particular landscape, mileage will vary from heightmap to heightmap so you may need to tweak some values.
you can download here (VB.NET):
www.pipedreamgames.com/downloads/LandscapeSplatting.rar