Page 1 of 1

Mars NormalMaps from MOLA data

Posted: 05.07.2008, 20:36
by abramson
Hi all.

I have written a set of Perl scripts that read the MOLA elevation data for Mars, stitch together a large map (up to 46K), and use Fridger's NMTools to generate NormalMaps, either regular or a complete VT ready for use. I did this for my personal use, but the high resolution results are so beautiful, that I documented them and am making them public. They are easy to use even if you don't speak Perl. They are available at the Celestia section of my page. The readme file and the scripts themselves explain what you need and how to proceed. I put there a few screenshots, and am inserting just one below.

Some details now.

MOLA data are distributed by the Planetary Data System through its Geosciences node. The necessary files are the 128 pixels per degree topographic as well as the 64 ppd ones. (They are here.) They are distributed as tiles of 16 bits per pixel binary images. The scripts make the tedious job of stitching them together.

The 128 ppd set covers Mars from Latitude 88N to 88S. So, to make a 46K map I use the 2 degrees around the poles from the 64 ppd set. The results show that these data are probably spurious, but I still decided to just use the data and not retouch them, at least for now. The resulting 46K x 16 bits elevation map can be fed to NMTools to make high quality, geometrically correct NormalMaps up to 32K, exquisitely detailed. They are ideal to be used with a very flat surface texture, such as the one by Mario Rossi from Space Graphics.

You can also generate lower resolution maps just from the 64 ppd set, which is a smaller download from PDS. Whith it, you can make a 16K VT NormalMap, which is very decent. Regular NormalMaps (not VT) can also be easily made from this one, 2K, 4K, 8K, as you please, to replace the official Mars bump file. With these fantastic data available, I believe that we could just distribute Celestia with a 2K Mars NormalMap.

One can easily adapt these scripts to generate NormalMaps of other planets distributed in the same format. The PDS has just informed of a new Clementine Mapping Project, that provides some "improved" lunar maps (the topographic map is explained in this paper). I tried to use that map, which is said to be 16 bit raw, but something is not working, because the NormalMap does not results well. Anyway, I downloaded the elevation png they distribute, and the resolution is not very good, so perhaps it's not worth. Perhaps we can just wait until the Japanese or the ESA release their own measurements. If anyone succeeds with Luna, please let me know...

Enjoy, and let me know if you use it, and certainly if you like it!

Guillermo

PS: Fridger & Robert, thanks again for the NMTools!

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 09:24
by bh
Cor!

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 09:53
by ANDREA
Hello Guillermo, it looks a truly fantastic normalmap, indeed, very appreciated. :D
I've downloaded the script, and going to make the same for MOLA data I found that the meg128 files are both .lbl AND .img files.
I suppose we need ALL of them, correct? :oops:
Regarding the poles meg 64 files, I have not a clear idea of what are the right ones.
E.g., what are the ones to be used, according to definitions found here:
http://pds-geosciences.wustl.edu/geodata/mgs-m-mola-5-megdr-l3-v1/mgsl_300x/aareadme.txt

File names for the global image maps use the format of
MEGpxxnyyyrv.IMG
with the following definitions:
p indicates the product type (A for areoid, C for counts, R for
radius, and T for topogray)


And so on. :? :? :?
The files are big and will need a lot of time for downloading, so I think that many people would appreciate such information to avoid mistakes, thank you.

BTW I found here
http://pds-geosciences.wustl.edu/geodata/mgs-m-mola-5-megdr-l3-v1/mgsl_300x/polar/
other polar images, that IMO look at higher resolution.
Am I wrong? 8O

But the true problem is that we have not a freely available Mario's 32k Mars map, because as you know Mario's textures activity is no more present in the Web, so we cannot contact him for authorization/downloads.

But I'm sure that in the future Fridger and/or Cartrite will obtain a good 32k shadowless Mars map from the available data.

BTW, your web pages are very interesting, as your screenshots here
http://cabfst28.cnea.gov.ar/~abramson/celestia/gallery/

Bye, and thanks a lot!

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 13:01
by abramson
Clarifications:

1. The MOLA data (acatually all PDS files) are distributed as pairs of .img + .lbl. The scripts only use the .img. The lbl are labels (which I used to get sizes and such). They are just 1K, so you can get them if you wish to keep the labels for each image, but they are not really necessary.

2. The scripts use the TOPOGRAPHY (that is, the elevation) maps to make the NormalMaps. Those are the MEGpxxnyyyrv.IMG with p = t. t, for topography. Just get the t's.

3. The 64ppd data make a complete set covering the whole of Mars. They measure 500MB. Those are enough to make a 23K map with mars64.pl, and very good 16K VT with levels.pl, or smaller regular NormalMaps with nmap.pl. Stat with this one. If yu want to proceed to 32K, you still need this set.

4. The 128ppd data cover Mars only from 88N to 88S. To fill in the missing poles, mars128.pl uses the 64ppd data. So, to make a 46K map with mars128.pl, you need BOTH sets, meg64 (500KB) AND meg128 (an additional 2GB!!!). With them, you can stitch the 46K map and make a VT of 32K with levels.pl (and of course smaller ones also, but that's overshooting).

5. The stitching is rather fast, which surprised me. (I read whole lines form each tile, that's the reason I think.) So you don't need to keep the stitched maps after generating the NormalMaps. The VT generation takes considerably longer. Just create several sets with different exaggerations (1, 1.5 and 2, for example) and keep the one you prefer. I like the 1.5 best.

6. I saw the polar maps, which seem more complete. One could certainly use those to fill in the missing data of the meg128. It just needed more computation that I could do in spare time for this version. I will do it eventually.

7. I got Mario's flat texture years ago and never had a use for it until now. Sadly he has vanished. His textures are redistributable, according to his readme file, as long as their use is personal and non-commercial. Perhaps we could upoad them to the Motherlode. My scripts and derived textures will not go to ML, complying with Fridger's wishes.

8. I have been looking for a good flat newer surface texture, with partial success. David Malin has a 92K set which is fantastic (and aligns well with MOLA) but it is grayscale. One should colorize it with Viking or other data at lower resolution, but I still don't know how to do it algorithmically.

I think that's all. Have fun, you all...

I will update the readme file with these suggestions, but not today...

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 13:20
by ANDREA
You have been very clear, Guillermo, appreciated. :wink:
Thanks a lot!
Bye

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 13:21
by abramson
bh wrote:Cor!
I didn't understand this, and looked it up. It seems to be "British dialect" meaning:
1. (used as a mild oath.)
2. (used as an exclamation of surprise or disbelief.)
Nice. I will start using some Rioplatense slang.
G

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 15:20
by ANDREA
abramson wrote:
bh wrote:Cor!
I didn't understand this, and looked it up. It seems to be "British dialect" meaning:
1. (used as a mild oath.)
2. (used as an exclamation of surprise or disbelief.)
Nice. I will start using some Rioplatense slang.
G
Well, this time I'm helping you, instead of the contrary, as usually happens. :wink:
In the Oxford Advanced Learner’s Dictionary here:
http://www.oup.com/elt/catalogue/teachersites/oald7/?cc=it
I found this:
cor /k(r)/ (also cor bli•mey) exclamation (BrE, informal) used when you are surprised, pleased or impressed by sth: Cor! Look at that!
So bh was appreciating it very much, like me.
BVye

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 15:35
by ANDREA
abramson wrote:Clarifications:
7. I got Mario's flat texture years ago and never had a use for it until now. Sadly he has vanished. His textures are redistributable, according to his readme file, as long as their use is personal and non-commercial. Perhaps we could upoad them to the Motherlode....
Guillermo, are you sure this is valid for Mario's 32k images? 8O
I'm sure it's true for the 16k images, but I remember a message exchange between me and Fridger, where he was instead saying that the 32k images could not be spread. :(
Please inform me on the matter, I'm very eager to obtain the 32k flat ones.
Thank you.

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 17:44
by abramson
Andrea, you are most probably right. Actually, I just have Mario's 16K texture (from which I made a VT) and not a 32K one. The 16K has a readme that allows for redistribution (I am almost sure, I have it at my desktop machine, and I am now at the portable, while watching the Wimbledon final...)

16K texture + 32K Normals gives VERY good result for Mars, I tell you...

G

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 17:58
by BobHegwood
ANDREA wrote:Well, this time I'm helping you, instead of the contrary, as usually happens. :wink:
In the Oxford Advanced Learner’s Dictionary here:
http://www.oup.com/elt/catalogue/teachersites/oald7/?cc=it
I found this:
cor /k(r)/ (also cor bli•mey) exclamation (BrE, informal) used when you are surprised, pleased or impressed by sth: Cor! Look at that!
So bh was appreciating it very much, like me.
BVye

Andrea :D
Blimey, I didn't know there was dictionary to interpret language in this way... Cool reference. :wink:

By the way, is anyone to the point of creating 64k textures yet? Just curious, and keep up the great work here, Guillermo.

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 18:27
by ANDREA
abramson wrote:Andrea, you are most probably right. Actually, I just have Mario's 16K texture (from which I made a VT) and not a 32K one. The 16K has a readme that allows for redistribution...
Equally I have the 16k .tif original textures, i.e. 16k_16bit_bump.tif- 16k_flat.tif- 16k_45deg.tif- 16k_315deg.tif that Mario, very kindly, sent me on a DVD 2 years ago. :D
abramson wrote:16K texture + 32K Normals gives VERY good result for Mars, I tell you....G
Yes, I believe you, and I'm going to try to apply it. :wink:
Thank you.
Bye

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 18:33
by abramson
Highest resolution of the MOLA is 46K, so 64K would need blowing it up, not nice.

What a final in Wimbledon, eh!

G

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 18:42
by ANDREA
BobHegwood wrote:
ANDREA wrote:Well, this time I'm helping you, instead of the contrary, as usually happens. :wink:
In the Oxford Advanced Learner’s Dictionary here:
http://www.oup.com/elt/catalogue/teachersites/oald7/?cc=it...Andrea :D
Blimey, I didn't know there was dictionary to interpret language in this way... Cool reference. :wink:
Happy you find it useful, Bob, I use it many times, mostly to understand the meaning of slang words. 8O
And having never read "Blimey" before now, I found there what follows:
bli•mey /blami/ (also cor blimey /k blami; NAmE kr/) exclamation (BrE, informal, slang) used to express surprise or anger: Blimey, it’s hot today
Nice!
BobHegwood wrote:By the way, is anyone to the point of creating 64k textures yet? Just curious, and keep up the great work here, Guillermo.
Well, I'm sure that Fridger and cartrite will give us wonderful surprises on this subject, in the next future.
Stay tuned. :wink:
Bye

Andrea :D

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 20:41
by John Van Vliet
if someone else's lines up better ? i don't know, there was some discussion on Celestia matters . there is my flat ( mostly ) 16k vt on the motherload
http://celestiamotherlode.net/catalog/s ... don_id=240
and yes it is old and dose need to be updated
and the 64k normal is from the 128 with 64 added in at the poles

Re: Mars NormalMaps from MOLA data

Posted: 06.07.2008, 23:00
by t00fri
Yes guys,

I was about to suggest you have a look in our CM thread

http://forum.celestialmatters.org/viewtopic.php?t=194

where cartrite and myself have prepared all these big Mars textures a long while ago. Notably, we have exchanged lots of practical experience about working with ISIS3. Remember that with ISIS3 you can directly assemble the original elevation map data tiles and convert them into a 16bit binary as needed for our nmtools. The ISIS3 commandline tools all have a GUI interface and exist for all OS. Similarly we discussed the making of the largest base textures for Mars from raw data, as well and the well known issue of matching the various textures...

Fridger

Re: Mars NormalMaps from MOLA data

Posted: 07.07.2008, 18:20
by abramson
To those who have downloaded my levels.pl script:

There was an error (arising from the fact that there was a name change in NMTools 1.5, and that I had both 1.0 and 1.5 installed in my computer). I have corrected it. I have checked it as working correctly with NMTools 1.5 under XP. Please download normalmaps.zip again (less than 10kb). My apologies.


The two stitchers, mars64.pl and mars128.pl, as well as the regular normalmap maker, nmap.pl, didn't suffer from this problem.

Guillermo

Re: Mars NormalMaps from MOLA data

Posted: 07.07.2008, 18:33
by abramson
t00fri wrote:I was about to suggest you have a look in our CM thread http://forum.celestialmatters.org/viewtopic.php?t=194
Oh, I see. Thanks, Fridger. I was unaware of this.

Anyway, as I said, I made these scripts for myself, they work fast and fine with just Perl, NMTools and the raw data, and if someone finds them useful, be my guests.

Cheers,

Guillermo