NASA LRO Lola & MGS Mola IMG Importer (up. 2011/06/25)

Good. Now the script is working. To try, select this coordinates:
Northernmost Lat.= -41.5
Southernmost Lat= -45
Westernmost Long= 346
Easternmost Long= 351
You can use the slider, or type directly the numbers. When the script have finished to import, press Numpad . and you can see the Thyco crater at low resolution. (I hope :))

can you explain what it does and how it works!

I’m not shure, there is relative path and absolute path. Absolute path is something like C:\A\Blender. Relative path is a path that starting from the directory of the application. Is something like /tmp\

Ciao
VB

ok but after entering coordinates what ?

how do you execute it ?

the image at first thread shows an import line at bottom of panel
but i don’t see it anymore?

also there must be a way inside your script to make path var relative instead of absolute!
so it works all the time first tinme !

Thanks

The Import button is showed only if is all OK, probably, you haven’t type the correct coordinates. Check the sign.

Northernmost Lat.= -41.5 (Minus)
Southernmost Lat= -45 (Minus)
Westernmost Long= 346
Easternmost Long= 351

Cioa
VB

ok got it working now nice little crater!

now when i select file it goes to my root C and i ahve to select several other folder till i get the file
there must be a way to get to the same folder then where the blend file is located !

also there must be a way to add some default values fopr the LAt and long values instead of 0 !
t would be easier ot start and run it i guess!

now for the moon can you add a moon iamge showing on it the max min lat and long for the moon face that we see
not the back face of the moonand add it to the firts thread
this might make it easier to locate things on the moon!

Thanks

Very well I’m happy :slight_smile:

also there must be a way to add some default values fopr the LAt and long values instead of 0

I’have searched it but I not found :frowning: It’s in My ToDo)

this might make it easier to locate things on the moon!

Well, place the Camera here:
Location: X=0 Y=0 Z=8000
Rotation: 0,0,0
End Clipping: 10000
When you set the camera view, you see the Moon like from the Heart.

However, here I have started a Wiki page for the script.

Ciao
VB

for the lat long
define it as scene properties and give it some default values which can always be change afterward!

now you could also add a check box to select some crater’s name on the moon

like Tycho or other crater’s name!

and same thing for Mars!

http://www.planet4589.org/astro/lunar/Craters.AW82

http://www.lpi.usra.edu/resources/lunar_orbiter/

here is a coordinates for moon
but no the same then yours

happy 2.5

I am understanding you want him to create a list of all the craters with name on the Moon?
I am sure if you create that list for him he will be pleased in implement it in the script. :cool:

Please use this one

(the same for Mars of course) :evilgrin:

It’s a good idea
I can add a procedure for read all the point of interest, from a text file, so every one can compile a favorite list. :wink:

But it’s a low priority for now. First I must optimize the memory use.

There will be 2 possibility:
Less memory but more time
More memory but less time

Ciao
VB

Hi Valter

odd problem, I tried your script yesterday and it worked fine
today it gives me problems
I’m using file ldem_16.*
here’s a pic of the error message

http://drobbins.net/error.png

any ideas?

Yes , but it’s strange. Exchange Easternmost with Westernmost Coordinates. I must check why you have enabled the import button with wrong coodinates

Ciao
VB

Edit: Found it, I fix it in the next version, and peraphs I must Showing more detailed info in the User interface

craters’s list
i did not meant that the list should have all the craters but let say the most important ones
and also many of the major features and marias ,mountains , valleys

cause most peoples will ear on TV some moon features’s name like the great wall
but where is it and at which coordinates ?

so a menu selection with some of the most common name would be nice or hae a map also showing theses locations!

now i’m still tryng to locate on WEB a moon’s map showing the majors features names
anybody has seen one may be at one of NASA’s site ?

Have you been able to add default Max and min value for the properties for Lat and long
i can give you an example for this!

happy 2.5

suggestion for first thread

add what is required for Lat and Long to make a full 360 degrees moon and approximate time for making it
function of resolution (like LBL-4 — LBL64 - ect )

and is there a way to color function of height range ?
of may be make some vertex group function of height range

happy 2.5

Default Max e Min Latitude and Longitude: I try to made it in the next version or at least a warning.

and is there a way to color function of height range ?
I don’t know, but I need it, because with my future script, I want read the GTOPO30 (DEM of th Earth) and I must change color to the vertex of the sea (see here http://blenderartists.org/forum/showthread.php?t=188775&p=1642245&viewfull=1#post1642245 for an example)

well i did not study all the script and not certain how you read the data’s here
but there must be a way to create some vertex group or mat group for mat may be !
now in 2.5 it’s not a problem for Material cause you can go up to over 32000 different materials!

is there a web page that explain how the data’s is structured in LBL file?

also what is the scale of the model in viewport function of resolution or not ?
this could also be added to the first thread and wiki page may be to better understand what and how it does it!

Thanks and happy 2.5

Update to ver. 0.1.0: Now the scrip use less memory. I read only what i need.

Scale is: 1 Blender Unit = 1 Km

The LBL is a text file describing what the data in the .img file means. It says that there are 2 bytes for each sample and the sample is: (the height minus the average radius)/2 and the average radius value is also said there.
More easy: radius is 1737. You have a sample that is 1820 but you will find in the .img file this value: (1820-1737)/2= 41 (really it is 41.5 but they are using integers of 16 bits). Then you read 41 in the .img and you need to do: (1737+41)*2 to get the length to the center you must to create a vertex.

The Moon in Blender is 1000 times smaller (1 blender unit = 1 meter) as said above by ValterVB

but this is not a txt file with float numbers it is like a binary file which requires some special to read it i guess
and have not see an example for this type of file with record structure
will look at the script to try to understand how this is done with 16 bits values as integer

the problem i see here is for the very big file there must a way to read only one line at a time and not clog the memory with gigabytes of data!

so there must be a trick to do that with python but how!

thanks happy 2.5

The .lbl is a text file change the extension to .txt and open it. The .img file is a sucesion of 16 bits values and of course in binary. First the low byte and then the high byte for each 16bits sample.

He posted a new version of the script that does this already instead of reading the entire file. The download links are pointing to a new file. Download again and compare to see what changed in the code.

i tried with values like from 45 to 50 degreess and it does not show the import line at bottom

is there a specific reason for not working with theses values ?

happy 2.5

Could you indicate the name of the .lbl .img and the four numbers you are using that don’t work?