Exporting height data

Started by bingomantee, February 21, 2012, 01:20:34 AM

Previous topic - Next topic

bingomantee

I would like to get the height data out of terragen for a height field after scaling and eroding it.

Ideally, I'd like it in a compressed array of 16-bit signed ints but anything that is similar would be good. (I am doing work with MOLA data from Mars and want to scale it up and add detail)
Suggestions?

Matt

#1
When heightfields are brought into Terragen 2 they are always converted to 32 bit floats before anything else happens, so unfortunately you're not going to get the same signed integers back. You can save a heightfield as either EXR or TER by right-clicking on a green heightfield node and choosing "Save file as...". The EXR contains floats of heights measured in metres. TER is Terragen's proprietary format and contains 16-bit signed integers along with scaling and offset attributes. The fact that they are integers might be misleading though, because the scaling won't correspond to what you originally brought in.

EXR will be better supported by image apps and 3D renderers, but TER can also be read by various terrain tools.

If you want to go digging in the TER format for the ints directly, then there is this:

http://www.planetside.co.uk/terragen/dev/tgterrain.html

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

jo

Hi,

If you're working with GIS data perhaps you are using some software which uses GDAL. In that case your software might be able to open TER files. Alternatively you could probably use the GDAL command line tools to convert a TER file to some other format. I've never tried it mind you, but GDAL does read and write TER files.

Regards,

Jo

bingomantee

So EXR is a format of raw packed 32 bit floats, or are they integers?

bingomantee

Duh - I can has read - 32 bit floats of meters.

Matt

EXR is a full-blown image format, not just raw values.
Just because milk is white doesn't mean that clouds are made of milk.