Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Development
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
Old 11-16-2017, 01:11 AM   #16
BrianJ
thing
Default

Hi,
Quote:
Originally Posted by martins View Post
 But if that was the case, then plsplit64 would probably also not have found the input bitmap (unless you specified the full absolute path for that).
Yup, I did specify the full path to the .bmp.

OK, with the help and utilities from martins and Face, I think I'm just about there. Level5 elevation maps and Level7 surface texture. Now that I can adjust the elevation scale (using the metadata files for ele2png) it looks much better and general body dimensions are correct.
Click image for larger version

Name:	ceres_tn1.jpg
Views:	16
Size:	236.0 KB
ID:	15474

Should I package the .elv and .dds tiles into their respective .tree formats? Is that more efficient for Orbiter?

Thanks again,
Brian
BrianJ is offline   Reply With Quote
Thanked by:
Old 11-16-2017, 01:59 AM   #17
martins
Orbiter Founder
Default

Looking good!

The tree format is probably no more efficient regarding performance, but it has a smaller disk footprint and makes it easier to distribute.
martins is offline   Reply With Quote
Thanked by:
Old 11-16-2017, 08:51 AM   #18
4throck
Enthusiast !
 
4throck's Avatar
Default

Great progress importing that DTM data.

Just a quick reminder that there are similar datasets on the USGS site for Mercury, Venus, Pluto and Charon

Last edited by 4throck; 11-16-2017 at 08:54 AM.
4throck is offline   Reply With Quote
Old 11-18-2017, 01:39 PM   #19
BrianJ
thing
Default

Quote:
Originally Posted by 4throck View Post
 Just a quick reminder that there are similar datasets on the USGS site for Mercury, Venus, Pluto and Charon
I'll be needing "Elv Tile Splitter" or similar square-chopping automation, if I want to get into that!

I put what I got for Ceres so far, on OH:
https://www.orbithangar.com/searchid.php?ID=7132
It didn't get it's own thread for some reason, so might as well use this one for bug reports, comments, etc.
BrianJ is offline   Reply With Quote
Old 11-18-2017, 06:33 PM   #20
jacquesmomo
Addon Developer
 
jacquesmomo's Avatar
Default

I just installed your Ceres: Congratulations! I'm very impressed !!!

Bravo !!!
jacquesmomo is offline   Reply With Quote
Old 11-18-2017, 06:42 PM   #21
Notebook
Donator
 
Notebook's Avatar


Default

To BrianJ.

any chance you could do a "how I did it" for us lesser mortals?

Thanks, N.
Notebook is offline   Reply With Quote
Thanked by:
Old 11-19-2017, 12:37 AM   #22
BrianJ
thing
Default

Quote:
Originally Posted by Notebook View Post
 any chance you could do a "how I did it" for us lesser mortals?

Of course. Maybe martins and Face can see if my method makes sense. Let me make some diagrams and get back to you.
BrianJ is offline   Reply With Quote
Thanked by:
Old 11-19-2017, 09:11 AM   #23
Notebook
Donator
 
Notebook's Avatar


Default

That would be excellent, BrianJ.
I would like to get into base making with 2016, but its intimidating!
Currently stuck on my "transparency" thread, not sure how to end it and make it generic enough for 2016 surface tiles, without knowing how to make them!

Thanks, N,
Notebook is offline   Reply With Quote
Thanked by:
Old 11-20-2017, 05:03 PM   #24
BrianJ
thing
Default

OK, here we go...

A brief (as possible) summary of my method for making planet wide elevation tiles (up to Level5) from a greyscale heightmap

You will need an image processing program such as Photoshop or Gimp that can scale and crop images to precise size.

You will also need Face's "ele2png.exe" included in his Treeman "OT3" package, download here:
http://www.snoopie.at/face/beta/ot3.zip (unzip into your \Orbiter\Utils folder)
Infos about ele2png:
https://www.orbiter-forum.com/showth...&postcount=208

************************************************** ******

0. Set up your planet's Texture directory to receive your .pngs as follows:

Make a folder in your Orbiter\Textures\ folder, thus:
\Orbiter\Textures\PlanetName\Elev
(where PlanetName is the name of your planet eg. Pluto)

In the Elev folder, make 5 subfolders named 01, 02, 03, 04 and 05
In each of the five subfolders, make a folder named 000000

In subfolder 05 only, make another folder named 000001 (because Level5 has two rows of tiles)

1. Download your planet height map.
It should be in 2:1 width to height ratio, 0deg longitude at the centre.

2. Scaling the image
Scale your image to the following size for each level:
Level1 64 x 32
Level2 128 x 64
Level3 256 x 128
Level4 512 x 256
Level5 1024 x 512

3. Adding columns and rows.
We need to add 3 columns and 3 rows of pixels to each image, as described below.
a) Copy the first two columns of pixels (left hand side) and ADD them to the right hand edge.
b) Copy the last column of pixels (of the original image, right hand side) and ADD it to the left hand edge.
Diagram:
Click image for larger version

Name:	ceres_how_to1.png
Views:	12
Size:	20.0 KB
ID:	15488

c) Copy the top row of pixels and ADD it to the top edge.
d) Copy the bottom row of pixels and ADD it to the bottom edge TWICE.
Diagram:
Click image for larger version

Name:	ceres_how_to2.png
Views:	10
Size:	19.6 KB
ID:	15489

So now your images should be:
Level1 67 x 35
Level2 131 x 67
Level3 259 x 131
Level4 515 x 259
Level5 1027 x 515

4. Making the 259 x 259 .pngs for Levels1 - 3
Create a 259 x 259 square and fill it with 50% grey.
Paste the appropriate Level image into the TOP LEFT corner.
Save it as 000000.png (8-bit greyscale) in the appropriate folder \Elev\01\000000 or \Elev\02\000000 or \Elev\03\000000.
Here is the Level1 000000.png for Ceres:
Click image for larger version

Name:	000000.png
Views:	6
Size:	5.1 KB
ID:	15490

5. Chopping two 259 x 259 squares from 515 x 259 image for Level4
When chopping squares, remember each square overlaps by 3 pixels with every neighbour square.
a) Make two copies of your Level4 515 x 259 image.
b) Crop one image to the left hand side (deleting the last 256 columns), save as 000000.png (8-bit greyscale) in \Elev\04\000000 folder.
c) Crop one image to the right hand side (deleting the first 256 columns), save as 000001.png (8-bit greyscale) in \Elev\04\000000 folder.
Diagram:
Click image for larger version

Name:	ceres_how_to3.png
Views:	6
Size:	23.5 KB
ID:	15491

6. Chopping eight 259 x 259 squares from 1027 x 515 image for Level5
Various different ways to chop the image, here's how I did it.
a) Make two copies of your Level5 1027 x 515 image.
b) Crop one image to the left hand side, to 515 x 515 (deleting the last 512 columns).
c) Crop one image to the right hand side, to 515 x 515 (deleting the first 512 columns).
d) Duplicate each of your 515 x 515 cropped images so you have four copies of each.
e) Now you can crop each of those images to 259 x 259, cropping to a different corner each time.
f) Save as xxxxxx.png in the appropriate folder - \Elev\05\000000 for the top row of squares, \Elev\05\000001 for bottom row.
Diagram:
Click image for larger version

Name:	ceres_how_to4.png
Views:	8
Size:	63.0 KB
ID:	15492

7. Converting the .png to .elv using "ele2png"
OK, you should have the following .pngs in subfolders within the Elev folder:
Code:
/01/000000/000000.png
/02/000000/000000.png
/03/000000/000000.png
/04/000000/000000.png
/04/000000/000001.png
/05/000000/000000.png
/05/000000/000001.png
/05/000000/000002.png
/05/000000/000003.png
/05/000001/000000.png
/05/000001/000001.png
/05/000001/000002.png
/05/000001/000003.png
a) We need to make a text file to give to ele2png, telling it which .png files to process.
The location of the .png files is relative to the \Elev folder.
Copy-paste the list of .pngs above into a .txt document and save it as pnglist.txt in your \Orbiter\Utils folder, next to ele2png.exe.

b) We need to make text files with the metadata required by ele2png to set the elevation scale correctly.
For each xxxxxx.png make a text file called xxxxxx.png.meta, and save it in the same folder as the .png.
Copy-paste the following line into the xxxxxx.png.meta file.
Code:
vmin=0 vmax=0 scale=1 offset=0 type=-16 padding=1x1  colormap=0 smin=0 emin=0 smean=0 emean=0 smax=0 emax=0  latmin=0 latmax=0 lngmin=0 lngmax=0
Now you need to set the vmin and vmax values. For planet-wide consistency they are the same in each file.
vmin = lowest point of entire heightmap (in meters, relative to planet mean radius, whole number - no decimals)
vmax = highest point of entire heightmap (in meters, relative to planet mean radius, whole number - no decimals)
For Ceres the values are vmin=-27000 vmax=11000

So, now you should have identical metadata files in your \Elev folder, as follows:
\01\000000\000000.png.meta
\02\000000\000000.png.meta
\03\000000\000000.png.meta
\04\000000\000000.png.meta
\04\000000\000001.png.meta
\05\000000\000000.png.meta
\05\000000\000001.png.meta
\05\000000\000002.png.meta
\05\000000\000003.png.meta
\05\000001\000000.png.meta
\05\000001\000001.png.meta
\05\000001\000002.png.meta
\05\000001\000003.png.meta

c) Now we need to invoke ele2png to process the .pngs
Open your Command Prompt window and type in the following with a space between each:
<Full path to ele2png (leave out .exe extension)>
<Full path to planet texture folder>
<Layer type> this will be Elev
<file list flag> this will be -F
<Full path to file list> path to pnglist.txt
<metadata flag> this will be -m0
Here is a pic of my Command Prompt screen for processing the Ceres .pngs.
I've colour coded it to make it easier to see what's what:
Click image for larger version

Name:	ceres_how_to5.png
Views:	9
Size:	32.9 KB
ID:	15493

Hit [Return] and ele2png should chew through the .pngs in a couple of seconds and display a list of the .elv files it has created.
Hopefully you have a xxxxxx.elv tile beside each xxxxxx.png!!

*************************************************
Hope I've got it right and not forgotten any steps!
Regards,
Brian
BrianJ is offline   Reply With Quote
Old 11-20-2017, 06:32 PM   #25
Notebook
Donator
 
Notebook's Avatar


Default

Much appreciated BrianJ.

Looks like as much effort typing that in as making the levels!

N.
Notebook is offline   Reply With Quote
Old 11-20-2017, 10:57 PM   #26
jacquesmomo
Addon Developer
 
jacquesmomo's Avatar
Default

Merci beaucoup !!!
Thanks so much.

now, I just have to understand... and to make tests and trials...
jacquesmomo is offline   Reply With Quote
Thanked by:
Old 11-21-2017, 09:26 AM   #27
4throck
Enthusiast !
 
4throck's Avatar
Default

That's a lot of manual work...
I have a browser based java-script code that will split images up to 4K semi-automatically.
I can share it as is if it helps in some way- don't ask me for any support

Last edited by 4throck; 11-21-2017 at 09:39 AM.
4throck is offline   Reply With Quote
Old 11-21-2017, 10:05 AM   #28
Face
Beta Tester
 
Face's Avatar

Default

Well, there is still the idea to implement "stichnslice" as addition to OT3 to aid with the splitting/merging of elevation tiles. I just got the impression that with the advent of astrogull's tool, this is not necessary anymore.
Face is offline   Reply With Quote
Old 11-21-2017, 11:06 AM   #29
4throck
Enthusiast !
 
4throck's Avatar
Default

Well pointed!

I gave Elv Tile Splitter a try once and it didn't work.
But I guess I was being dumb (honestly my wrong it should work and these things require some study).

Anyway, it's always good to have some more manual alternatives.
It's important to know how things work and not depend on a magic tool from a single user
4throck is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 09:18 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.