Planetside Software Forums

General => Terragen Discussion => Topic started by: Oshyan on November 22, 2011, 10:24:12 PM

Title: Beautiful new moon height data
Post by: Oshyan on November 22, 2011, 10:24:12 PM
NASA has just released some awesome new height data of our own moon.
http://wms.lroc.asu.edu/lroc/global_product/128_ppd_DEM

There are single files for the entire moon available in TIF format and thus immediately usable in Terragen 2 ("Global Downloads" at the bottom). I've made a quick example animation showing how nice this data is (didn't bother trying to find the view we'd normally see, heh):
http://www.youtube.com/watch?v=0QCgUR0RHdI

This data is a lot of fun to play with since our moon has no atmosphere, so it renders *very* quickly. I was getting about 2 minutes per frame at 1600x900. The Youtube animation posted is downsampled to 1280x720.

There is even higher resolution data available in NASA's own PDS (.IMG) format. I'm pretty sure there are programs that can convert this to TIF but I don't seem to have any, so my challenge to the community is to convert some (or all!) of this data and show an example of it in a render. :) Animations get bonus points and a mention on Facebook. ;)

- Oshyan
Title: Re: Beautiful new moon height data
Post by: inkydigit on November 23, 2011, 08:34:21 AM
spotted this the other day at:
http://www.bbc.co.uk/news/science-environment-15778142 (http://www.bbc.co.uk/news/science-environment-15778142)
forgot to post....
EDIT:

...
great little anim btw, I am going to have a look at these files...

cheers

J
Title: Re: Beautiful new moon height data
Post by: Alcaeru on November 23, 2011, 05:12:56 PM
Thanks heaps! Downloading now... was the 64 pixel/deg the highest res tif for the whole planet?
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 23, 2011, 05:51:19 PM
Quote from: Alcaeru on November 23, 2011, 05:12:56 PM
Thanks heaps! Downloading now... was the 64 pixel/deg the highest res tif for the whole planet?

Yeah, that's the highest full-"planet" (sphere/moon, hehe) texture I found, unfortunately. I'm hopeful someone will convert the other data so it can be used in TG though. While a tiled set of TIFs with georeferencing should work, it would be easier to use if it were just a giant polar projection image like the existing 64 pixel/deg one. That might be computationally prohibitive to produce though, I think it would be several GB in size. ;D Still I'd be game to try with my new 16GB RAM machine, if I knew software that could easily and reliably convert PDS/IMG to TIF...

- Oshyan
Title: Re: Beautiful new moon height data
Post by: Alcaeru on November 23, 2011, 08:24:34 PM
Okay... I got excited too quickly... I don't actually know how to make the heightfield cover the planet (I've only managed a rectangle)... so would someone please be kind enough to tell me how to do it?
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 23, 2011, 09:30:22 PM
It's fairly easy, but not necessarily intuitive. Add an Image Map Shader, load your Moon TIF image that you downloaded from NASA's site, set projection to Spherical, and set the position of the Image Map to be the same as your planet (you can use the copy/paste buttons on the coordinates to move them easily, but basically in the default scene the center of the planet is at 0, -6.378e+006, 0). Then go to the Displacement tab, enabled displacement with the check box, and set a high Displacement Amplitude, like 20,000. This is measured in meters so if you want accuracy, check with a good reference source for the actual height range of the Moon.

- Oshyan
Title: Re: Beautiful new moon height data
Post by: Alcaeru on November 23, 2011, 09:44:40 PM
Ah, thanks - it was the position thing that was eluding me.
Title: Re: Beautiful new moon height data
Post by: Ironshirt on November 25, 2011, 01:17:30 PM
I tried the PDS plugin for GIMP yesterday (from here http://areo.info/gimp/) and was able to convert the files 'somehow'. But the import looks strange - it seems that the greyscale wasn't converted properly. While I'm not so experienced with such stuff I don't know whether the results are useful anyhow, or not. Maybe there is a way to process the files in GIMP to make them useable again in TG2. Unfortunately the importer itself has no options to play with.
Attached you find screenshot of the conversion result.

Regards
Title: Re: Beautiful new moon height data
Post by: Ironshirt on November 25, 2011, 02:43:01 PM
Oh well, I think I finally found a way  :D

Once you have imported the image successfully, use 'Colors->Map->Gradient Map'.
Afterwards you just need to adjust the contrast settings (maybe brightness as well) a little bit.

Attached is an example with contrast adjusted to 75

598MB Ram are in use for 1 converted Tif Image


Title: Re: Beautiful new moon height data
Post by: freelancah on November 25, 2011, 03:03:26 PM
Hmm I believe I used the same data sets in these? http://forums.planetside.co.uk/index.php?topic=12699.msg126326#msg126326 Or are these enhanced somehow. I think mine was 64 pixels/degree
Title: Re: Beautiful new moon height data
Post by: MF_Erwan on November 25, 2011, 05:02:32 PM
Quote from: Oshyan on November 23, 2011, 09:30:22 PMThis is measured in meters so if you want accuracy, check with a good reference source for the actual height range of the Moon.
Here: http://wms.lroc.asu.edu/lroc/global_product/color_shaded_relief
Minimum: -9150m
Maximum: 10760m

Erwan
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 25, 2011, 05:58:35 PM
Hmm, good question freelancah, I'm not sure! I forgot about those earlier posts of yours. ;) I just saw the announcement from NASA and assumed it was new/better data, so I grabbed it and played with it. ;D To my eye the data does look a bit better than what was in your shots, though not by a huge amount. It's possible each data set had the same pixels/degree level of detail in terms of the stored result, but that the source was not as detailed at that time, or it could be equivalent data. There is of course higher resolution data now that looks like it can be converted, judging by Ironshirt's results (though I am hoping for something which preserves the georeferencing, if possible).

Do you have the data you used for those shots, or remember where it was from? Did the download page look the same as the one I linked to?

Regarding height range, it looks like my guess of 20,000 meters was remarkably accurate! But if I'd just looked at what was right in front of me (the data source page), I would have had the real values, hah. Good call.

- Oshyan
Title: Re: Beautiful new moon height data
Post by: freelancah on November 25, 2011, 06:58:58 PM
I cant tell for sure if they are the same maps but my maps contained some tiles that I photoshopped away and I cant find those in these so I suppose they have those missing bits fixed/added. The site I got those from had a similar http address but it only had files listed with big thumbs, so I dont think it was the same.
It's possible this is the same data with the missing tiles added :P
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 26, 2011, 03:31:14 PM
They do tend to go through data release "cycles" where initial, "raw" or otherwise not cleaned up data is released, then a while later improved data is released. This happened with the worldwide SRTM data for example, where initial data sets had lots of huge holes, alignment issues, etc. Now in later revisions many of these problems have been corrected.

Anyway, it's nice moon data regardless, and hopefully someone can get the really high resolution stuff converted without data loss (the gradient mapping technique above gives an approximation, but is unfortunately not accurate).

- Oshyan
Title: Re: Beautiful new moon height data
Post by: dandelO on November 26, 2011, 04:15:46 PM
Quote from: Oshyan on November 26, 2011, 03:31:14 PM
They do tend to go through data release "cycles" where initial, "raw" or otherwise not cleaned up data is released, then a while later improved data is released.

Yup, just like when they recently released the newest 25km orbit LROC imagery of the Apollo sites. Before, they only had Photoshop artists capable of making 50km orbit imagery, those guys have now been trained up to produce the new 25km orbital shots that we have access to now.
When we can see real close-up macro shots of rocks from Mars and even close-ups from as far away as Saturn and her moons, I wonder, how hard is it for them, really, to get some decent shots of our Moon, a mere (not even)1/4 million miles away from us!
Title: Re: Beautiful new moon height data
Post by: freelancah on November 27, 2011, 08:03:34 PM
I figured out how to convert to png..Ofcourse you still need to compile the blocks but img2png (here: http://www.mmedia.is/bjj/utils/img2png/#download ) and remember to download the index file like it says in the instruction or your conversion wont work... I could compile and host the file if someone wants it but I cant keep such big files on my FTP for long..so anyone willing to host it permanently?
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 27, 2011, 08:51:23 PM
That sounds promising, the only problem is I think PNG is 8bit/channel only, so you'll likely be losing accuracy. 16 bit TIFF or EXR would be better, if possible. I'm not sure a general purpose image editor/converter will be able to do that. I'm guessing Global Mapper or a similar GIS format app would be able to handle it though.

- Oshyan
Title: Re: Beautiful new moon height data
Post by: JimB on November 28, 2011, 05:01:53 AM
Very nice dataset. Here it is plus an albedo map and a touch of power fractal detail displacement (mostly for the completely smooth areas).
Title: Re: Beautiful new moon height data
Post by: JimB on November 28, 2011, 06:04:03 AM
Quote from: Oshyan on November 27, 2011, 08:51:23 PM
That sounds promising, the only problem is I think PNG is 8bit/channel only, so you'll likely be losing accuracy. 16 bit TIFF or EXR would be better, if possible. I'm not sure a general purpose image editor/converter will be able to do that. I'm guessing Global Mapper or a similar GIS format app would be able to handle it though.

- Oshyan

The 64 px/deg Global DEM tiff I downloaded turned out to be a regular 8-bit rgb tiff (loads straight into Photoshop with full range, and you can see the expected 8-bit quantising/stepping when zoomed in in TG2). Am I missing something?
Title: Re: Beautiful new moon height data
Post by: inkydigit on November 28, 2011, 02:45:16 PM
great shot Jim, here is my attempt:
http://forums.planetside.co.uk/index.php?topic=13574.0 (http://forums.planetside.co.uk/index.php?topic=13574.0)
:)
Title: Re: Beautiful new moon height data
Post by: Matt on November 28, 2011, 06:24:23 PM
Oshyan, the IMG2PNG page says that it can output 16 bit PNGs when applicable.
Title: Re: Beautiful new moon height data
Post by: Oshyan on November 29, 2011, 01:08:13 AM
I didn't even know PNG supported 16bit/channel! Does TG2? ;) I'll check it out. Jim, I believe the IMG/PDS files would be 16bit/channel.

Great results guys, improving on mine in every way. :)

- Oshyan