Heightfield spikes, flatten surface, DEM data

Started by FlynnAD, April 18, 2012, 04:47:05 PM

Previous topic - Next topic

FlynnAD

Hi all,

I'm sure this has been resolved but I can't find a specific post on it.

I have DEM data as GeoTiffs, downloaded from the USGS website, imported and merged tiles in TG2 identically to the Ryan Archer tutorial demonstrates. I'm using a grid of 3x3 NED 1/3 arc seconds 0.25-degree tiles. Border is stitchable and border blending is set to 0.

If the terrain heightfield tiles are set to "flatten surface first" there is no problem and everything looks clean. If "flatten surface first" is unchecked, tiny spikes appear in both the 3dpreview and renderings. I've tried playing with all the settings I can find, including merging heightfields by mixing, highest, lowest, etc. If "flatten surface first" is unchecked, I cannot get rid of the spikes between tiles.

In an old post, I think Oshyan mentioned that with geo-referenced data you do not have to use "flatten first". Plus, with flatten first on, the edges of the vast terrain are raised in height, which I think is incorrect (please confirm). There is certainly a difference between the height of mountains in the distance with "flatten first" on versus it off. With flattening on, the mountains are raised way up (perhaps a hundred meters or more in this case) versus when flattening is off. Flattening on versus off will also have an effect on using altitude limits for color shaders.

So my questions are:

1) What is the accurate method (according to true-earth terrain) - flattening or non-flattening? If flattening is accurate, there's no problems and I retract this entire post.

2) If non-flattening is accurate, how do people get rid of the spikes between tiles? Or do users just use flattening and not worry about the accuracy of the terrain?

The closest posts I could find are old and I'm not using TER files:
http://www.planetside.co.uk/forums/index.php?topic=1232.0
http://forums.planetside.co.uk/index.php?topic=1657.msg16313#msg16313
http://forums.planetside.co.uk/index.php?topic=2036.msg20030#msg20030

Thanks,
-Matt

Oshyan

I'm not certain of what will solve your issues, but Matt has given me some info that may help. You mention that Border Blending is at 0. In that case the stitchable border has nothing to work with, and it can cause errors at the tile edges. Are you seeing the spikes everywhere, or just at the edges? Matt's suggestion is to try at least a small amount of blending, like 0.01. This gives the blending (and stitchable border) something to work with. There *may* be a bug in action here, but we'll see depending on what happens when you try that.

As for the rest, you do indeed want to have Flatten First turned *off* to get proper terrain curvature. So making the data work with it off is important here. That being said, note that TG2's support for georeferenced terrain is somewhat limited at the moment. We do intend to improve it in the future.

- Oshyan

FlynnAD

#2
Thanks Oshyan,

I had previously tried border blending at 0.01 but that left a small mound across all the tile joints. So I had tried even smaller amounts, like 0.005 and 0.002, which lowered the spikes down but ended up divoting the joints.

Trying again with larger values worked better at blending away the mound from 0.01, and I ended up at 0.07 or 0.08 before I couldn't see the tile joint mound anymore. This was just a bit counterintuitive: having only a single tile and increasing border blending (with the planet) erodes away the tile edges, so you'd think that having higher border blendings with two tiles would separate their joint, not blend it together. It seemed like merging two tiles that were each perfect extrusions (border=0) would blend them perfectly. Not the case.

Then I tried re-creating a brand-new terrain/heightfield load and looked at the border settings: 0.1. Would you look at that - someone at Planetside is a few steps ahead.

-Matt

Oshyan

So it seems like it's generally working for you at this point? Granted there are some things we need to work on/improve in the handling of tiled DEM data sets, but for now do you have any further issues?

- Oshyan

FlynnAD

No issues with that topic anymore. Flatten is off, curved earth is on, tile edge joints are blended away. Rock on.

Thank you for the help.

-Matt

Oshyan

Glad to hear it! Let us know if you have any further issues.

- Oshyan