Planetside Software Forums

General => Terragen Discussion => Topic started by: jknow on July 31, 2010, 05:41:50 PM

Title: Import elevation data - TIF format
Post by: jknow on July 31, 2010, 05:41:50 PM
I have to date been exporting GIS elevation data from ArcGIS to Landserf, and from Landserf to Terragen in .ter format.

I tend to do this in powers of 2 + 1, ie 2049 x 2049, or 4097. But I need them bigger now.

None of the TIF's I tried from ArcGIS would open in terragen. I know TIF is a bit vague, and it can be various bit depths, but could I ask if someone adept at importing GIS data into TG2 could help me figure out how to get my DEM data from ArcGIS into TG2?

Thanks a lot
Title: Re: Import elevation data - TIF format
Post by: jknow on July 31, 2010, 06:05:15 PM
Wow - pleasantly surprised to find that a geotiff export from globalmapper works just fine. Very easy from ArcGIS -> Globalmapper -> Terragen

However, Terragen2 has not realised that my cells have 5m horizontal spacing, though the vertical heights are OK. This means I need to scale it with a 0.2 height multiplier, but that's not good because it's going to distort everything.

Where is the horizontal multiplier? That would be much better because it would preserve the correct heights.

Thanks
Title: Re: Import elevation data - TIF format
Post by: Oshyan on July 31, 2010, 06:16:44 PM
Try adding a Heightfield Resize operator from the Add Operator menu at the bottom of the Terrain shaders list. If you're not using a heightfield load, but rather an Image Map Shader, that might explain why the scale is not being read properly. Try loading your TIFF through a Heightfield Load instead and see if that fixes the scales (it should read GeoTIFF info properly). If not, you can make use of the aforementioned Heightfield Resize operator.

- Oshyan
Title: Re: Import elevation data - TIF format
Post by: jknow on July 31, 2010, 06:45:52 PM
That was quick, thanks for being so helpful. I actually found that globalmapper can export ter files which makes life much easier.

I use the 'position centre' option so I know the real world position of the centre of my terrain, and I put my camera at 0,0.

Now, the problem I'm having is trying to work out the terrain height at 0,0.

When I mouse over the terrain view window, attached, I can only get so close to 0,0 before the cursor 'snaps' onto the bounds of the camera box, which then turns yellow on mouse over.

The problem with this is that once it goes yellow, you no longer get the position updates in the status bar. So I can't mouse over point 0,0 because once I get close the mouse snaps to the bounding box. How do I disable that behaviour?

The optimal solution would be to set the camera height to be 2m above the terrain. But if that's not possible I need a way to get the absolute height at corrdinate 0,0 but I can't do that with mousing around. Any ideas?
Title: Re: Import elevation data - TIF format
Post by: Oshyan on July 31, 2010, 06:48:26 PM
Use the 3D preview, read the coordinates at the bottom of the window, find 0,0 and the Y coordinate is your height. The VHeight value will show you camera height above terrain.

- Oshyan
Title: Re: Import elevation data - TIF format
Post by: jknow on July 31, 2010, 08:05:06 PM
Thank you, but even in the 3D preview there are too many white lines that turn into yellow boxes when I hover near to 0,0. As soon as I get near the cursor readout in the status bar is lost and the box goes yellow.

How do I disable these infuriating white/yellow boxes in the 3D preview? I appreciate they're probably for adjusting water or terrain heights, but surely there must be a way to get rid of them for someone trying to use the 3D preview to read off terrain properties without encountering this mouse over behaviour?

Screen shot attached to show what I mean. Thanks in advance, as always
Title: Re: Import elevation data - TIF format
Post by: Oshyan on July 31, 2010, 10:15:35 PM
In general you can disable those boxes with the Bounding Box controls, e.g. in an object node. Unfortunately in your case what you're seeing is probably the position handles for the very heightfield you're trying to measure. In the case of the heightfield, there is no bounding box control, all you can do is enable or disable, so that's not a workable solution for you. We do intend to add separate bounding box controls in the future. For now what I would suggest is going to the camera's settings and manually setting it to 0,0, then move the camera vertically until the VHeight reads 2m or whatever your preferred height is. You should also be able to measure this stuff in Global Mapper and then use the same info in TG.

- Oshyan
Title: Re: Import elevation data - TIF format
Post by: jo on August 01, 2010, 03:06:53 AM
Hi,

This might not solve your problem, but you can open the 3D Preview Location window from the View menu which gives the coordinate readout of the point under the mouse. It should continue to show values when the ones at the bottom of the 3D Preview disappear.

Regards,

Jo
Title: Re: Import elevation data - TIF format
Post by: jknow on August 02, 2010, 03:09:46 PM
Thanks guys, you guys are so helpful.

There is still one yellow box, as in my last picture, and I don't know what it is. It's height at 0,0 is 439 which is well above the camera/terrain height at 291. It must be some kind of phantom shader or something, but it's not the end of the world, except that it stops me seeing the value at 0,0. But I shall use your advice next time I need to do it.

Of course, I could read off the value from the DEM in another app, but part of the reason for checking the height at 0,0 according to TG2 is to check that the data have appeared in the right place.

I would very much like to be able to set the camera height by distance above surface, that would make a lot of sense.

I guess TG2 isn't really set up for real world data, and there are other packages that integrate better with GIS data. But they're not as good, that's the truth!
Title: Re: Import elevation data - TIF format
Post by: Oshyan on August 03, 2010, 12:08:15 AM
TG2 does handle real-world measurements well, but yes it is not ideal as a GIS package. For visualization of GIS data in an accurate fashion it can work quite well though. If you're bringing in the data in the correct format to maintain scale (GeoTIFF or TER), then you can trust that the scaling is correct. You could try measuring a spot height, maybe at a corner or an obvious feature, instead of at the center, if you want to verify.

- Oshyan
Title: Re: Import elevation data - TIF format
Post by: jknow on August 03, 2010, 01:23:50 PM
Yes, thanks for the tip.

I still think you should seriously consider implementing atmospheric refraction if you're serious about TG2's usefulness with real world data. Refraction is generally thought to counter earth curvature by a factor of between 1/6 and 1/7 - that's quite significant for many scenes. One workaround is to increase the planet's diameter by a similar amount, to make the surface flatter than it really is, but this might wreak havoc with other real world measurements.

It is of course only relevant to scenes with high vantage points such as from mountaintops. Thanks again
Title: Re: Import elevation data - TIF format
Post by: Oshyan on August 04, 2010, 12:55:17 AM
I really don't know how difficult that would be to implement, but we'll definitely add it to the list of requested features.

- Oshyan
Title: Re: Import elevation data - TIF format
Post by: jknow on August 04, 2010, 05:12:21 AM
I should correct the above. It's not only the view from high places that would benefit from refraction; rather, any long distance view, eg from plains to mountains in the distance. Refraction is greatest in the early morning and late evening, and can be variable enough that some days features loom into view when on other days they don't. That can be quite disconcerting.

It also explains why the moon or sun appears squashed when it's very close above the horizon - I imagine that is an effect TG2 would be interested in. Indeed, by the time you see the sun disappearing over the horizon, it's actually already under the horizon! The fact that you can still see it is due to refraction. Interesting eh!