terrain from contours

Started by mash, August 18, 2013, 11:03:55 PM

Previous topic - Next topic

mash

Hi, I'm trying to figure out how to make a terrain from a set of Contour lines.
I'm trying to do real world small scale terrains, less than 3 to 5 miles square of Civil War battle fields.
Free DEM files lack the resolution needed especially when it comes to more shallow terrain.
My current plan is:
1. Find a source of Contour lines that I can download
   (I'd rather not spend hours tracing contour lines) If anyone knows of one please let me know.
2. Convert the Contours to a format that I can load into a 3d program like MOI, Modo, Maya or Bonzai 3d and generate a 3d     
    mesh from them via Lofting or something similar.
    This also gives me the ability to generate a 3d camera for Terragen and render other 3d elements in those programs.
3. Add erosion or finer details in World machine or Zbrush
4. Bring the mesh into Terragen for population and rendering.

There may be a way to do what I want with Global Mapper but I don't know the program well enough to tell.
If anyone has any suggestions I'd appreciate it.
Thanks,



Oshyan

Conversion from contours to heightfield would need to be done in a specialized program. I believe Global Mapper does have some capabilities for this. The venerable and still useful Virtual Terrain Project may have some applicable resources/links: http://vterrain.org/Elevation/contour.html

- Oshyan

mash

#2
Thanks I took a look at the links and did some research.
I did find a slightly faster method using Global mapper to generate a 3d mesh from contours.
of course it needs a DEM file to start with so it may be a mute point but in case anyone needs to know:

If you don't have a DEM  file you need to do it that hard way via extracting the contours from a topo map.
An explanation of how to do that is here.
http://www.terrainmap.com/rm19.html
and then running it through a program called R2V
http://www.ablesw.com/r2v/r2v.html

It takes a while to go through all the steps.

Another option is Wintopo pro
http://www.wintopo.com/wintopo-pro.htm
and TopoGX
http://www.topogx.com/

If you have a DEM file a slightly easier option is with Global Mapper.
Load up the DEM file and pick the area you want a mesh of.
Under the File menu at the top go down to "Generate Contours" about half way down the menu.
(In the latest version of global mapper 14 it's under "Terrain Analysis" menu at the top of the screen)
You can set the contour interval and under Contour Bounds set whether it generates contours for all the loaded data or just whats on your screen.
The middle tab "Gridding" will define weather it creates one file or a grid of seperate files. If you are doing a very large area breaking it up into smaller sections will make it more manageable to load into a 3d program later.
Keep in mind that when you go to generate the 3d mesh from the contours it will use the contour interval as the basis.
Click Ok. Depending on your machine it may take a few minutes.

Once it's done open up the Control center panel under "Tools" menu, or click Alt-C
RIGHT click on the "Generated Contours" layer and select "Create Elevation grid from 3d Vector Data"
Under the first tab "Grid Options" you can specify the Grid spacing. This will effect the amount of Polygons your mesh has. 10X10 meters means you will end up with a polygon size of 10 meters by 10 meters. So the smaller the number the more dense your end mesh will be.

Once it's done under the File menu scroll down to "Export Raster and elevation data"
Go to "Export DXF 3d Face File" and click Ok.
It will now create a 3d DXF mesh.

If you already have a 10 meter SDTS DEM this may not be of much use to you. But it is a easy way to get that DEM into a 3d mesh. A few advantages I noticed were the DXF mesh was all Quads and was in real world scale when I loaded it into Modo.
The only clean up I had to do was do a merge vertices operation. Note the "Auto" range function screws the mesh up.  Doing a fixed range of 0.0394" seems to work better.
Also the more dense the contour lines and grid spacing is the more errors you will get in your final mesh. These can be cleaned up in Modo using the smooth sculpt tool but it really becomes a point of diminishing returns. Keep in mind also if you do an entire DEM you can quickly generate a 3d mesh with a huge file size that may choke your 3d program when loading.