How to combine overlapping heightmaps with different resolutions

Started by skuczma, May 21, 2013, 12:25:38 PM

Previous topic - Next topic

skuczma

Hi all,

I am evaluating Terragen 2 to see how I can fit it into my existing workflow which includes Maya or even replace Maya.  I was wondering how you would blend two terrains loaded from external .ter files under the following conditions.  The first terrain file contains a low resolution height field and covers a large area.  The 2nd terrain file contains higher resolution topography and occupies a smaller detail area somewhere inside  the low resolution terrain.  How do you blend the two terrains without adding the elevations in the overlapping areas?   Also, would it also be possible to blend a loaded terrain into a power fractal terrain without adding elevations? 

Thanks in advance

Matt

The default settings in the Heightfield Shader do exactly this. When "flatten surface first" is enabled, the displacements are replaced (or mixed in at the edges) instead of being added. You just need to put the smaller area / high resolution terrain after the other terrain in the node list.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

skuczma

Hi Matt,

Thank you for pointing that out. I guess I must have unkowingly unchecked the "flatten surface first" box the first time.  Now it works fine just as you indicated.  However, I now notice something new that wasn't apparent before.  The .ter file I'm using was exported from a rectangular shaped DEM in Global Mapper.   When I loaded the .ter file into Terragen, the bounds of the data extend beyond the actual heightfield extents and the reported XY size dimensions are slightly larger then those indicated in Global Mapper.   Is this a bug or is there something wrong with my methods?  In Global Mapper I chose the "Manually Specify Terrain Spacing" option using the default xy spacings and exported the entire DEM.   I also used the default setting of "Auto georeference from file" in Terragen.


Pardon me if I was supposed to initiate a new topic with my latest question but I am new to this forum and am not sure of the proper protocol yet.   I really like what I see in Terragen 2 and can't wait to use it as part of my production toolset.

Thanks again.

Matt

I'm not very familiar with the export options in Global Mapper, but I hope someone more knowledgeable can help with that. However, if you manually specify the point spacing then the TER could easily end up being a different size (in metres) than the real terrain. Was the default 30, 30 or something else? If it was 30, 30 then that's just the default TER spacing and probably not correct for your particular terrain.

TERs do not contain any georeferencing information, so the "Auto georeference from file" option will have no effect on TERs, but it is safe to leave it on. Just make sure that the other checkbox "Georeference" is NOT checked, unless you want to manually enter georeferencing coordinates in the fields below.

Perhaps georeferencing your terrain would produce a more accurate result - you would have to manually specify georeference coordinates in Terragen - but be aware that the reported size in metres will no longer be relevant.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

skuczma

Hi Matt,

I found Ryan Archer's tutorial on "USGS Elevation Data with Terragen 2" and I can see that it steps through a lot of the things I need to know.  I will give it a try and hopefully later on I can have some success with my own data.   I work exclusively with real world topography and engineered surfaces so I really need to nail down the concepts involved in incorporating GIS data into Terragen 2.   Thanks for all your help.

Cheers,

Stephen

skuczma

This is the issue I am having with GIS data and Terragen 2.  My work involves blending engineered terrains with surrounding natural real world topography which in turn is used as input for 3D visualizations.  The GIS data is typically provided by clients in Autocad format using the UTM projection.  The engineeried terrain can change over time and in the past I have often produced 3D animations in Maya to illustrate these changes.

I have worked through some "Terragen/GIS data" tutorials and discovered that if you are importing geotiff terrains into Terragen 2 they must define a rectangular geographic area.  As long as you stick to georeferenced rectangular geographic extents, you can blend height fields with different resolutions and everything falls into place accordingly.  I would like to keep the terrains separate when I import them into Terragen because the engineered surfaces usually contain a lot of detail requiring high resolution.  For the surrounding natural topography, it is sufficient to use a lower resolution with not as much detail.  I could combine the detail and low resolution terrains and input the data as one geotiff but the problem is file size.  Also, I would like to animate the detail terrain as it changes over time so keeping the detail surfaces separate from the low-res terrain would be better.   

I often receive topo data in extreme northern latitudes so using rectangular geographic coordinates there is not possible.  My ideal general working enviroment would be to preserve my data in UTM and import it as a .TER file. into Terragen so I can work with data from anywhere on the globe.  The problem is that .ter files do not contain geoference information and any terrains I import  are positioned at the same origin (i.e. 0,0).   

After all this, my question is - How do I reposition the imported UTM based detail terrains to where they are supposed to be with respect to the low-resolution terrain?   Is it even possible?

Thanks

Matt

You can enter georeferencing coordinates on the Heightfield Load node. These data don't need to come from the file itself. When you enable "Georeference" it uses the coordinates in those fields, whether you typed them in or they were loaded from a file. "Auto georeference from file" causes it to automatically update these values if/when it finds georeferencing information in the file.

High latitudes should still work, as long as they don't get very close to the pole. They will produce distorted rectangles, but isn't that what they should do?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

skuczma

Hi Matt,

I saved 2 *.ter files from global mapper 12 based on the UTM projection.  The region is in the indian ocean.  One terrain file covers a large area, the smaller one is situated inside the large domain.  Assuming that I am supposed to enter the UTM coordinates for each of these terrains, I did as you instructed by entering the corner coordinates in each of the georeference fields and checked the georeference box.  It didn't appear to work using my inputs and assumptions.   I have attached two screen grabs showing my entries for each terrain in terragen 2.  You can see that the bounding boxes for each terrain are cleary incorrect wrt the globe.   Should I be mapping the UTM coordinates to values between 0 and 1 to make this work?  I am using the 32-bit freeware version of Terragen 2.

Thanks   

jo

Hi,

You need to enter the latitude and longitude rather than UTM coordinates.

Regards,

Jo

jo

I should add that we have some improvements for working with DEMs underway but I can't say too much about it just yet.

Regards,

Jo

skuczma

Hi Jo,

Yes it worked fine when I entered lat/long rather than UTM eastings and northings.   Cant' wait for DEM input becoming available!

Thanks for the help!