Terragen might actually be well suited to build datasets for a project like this. If you collected up a ton of Terragen generated terrains, along with a bunch of renders of those terrains, you could probably train a model to output the terrain from a photo or photos. Same could probably be done for textures and photos. I'll have to look into this, I'm in grad school atm for numerical computation and doing a lot of ML stuff. Always on the lookout for projects!