Project Orbiter texture tree tools (OT3)

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
For me it helps a lot to call command line programs using a .BAT file.

Much easier to spot typing mistakes (use Notepad ++) and to keep working examples organized.
 

marcogavazzeni

Addon Developer
Addon Developer
Joined
Jan 5, 2009
Messages
219
Reaction score
0
Points
16
Location
Near Verona
Website
orbiteritalia.forumotion.com
Thank you very much @Face, now works!!
:woohoo::hotcool:

My aim is to try to create high-level tiles starting from the lowest level...

I duplicated this image from 259 to 518.....

LGaipSc.png



then I took the corner at the bottom left, so we went from level 10 to level 11

rtuJaB7.png


In the transformation there is some error, but I think with tiledit can arrange

qThHfOj.jpg


:hmm:
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
I duplicated this image from 259 to 518.....
then I took the corner at the bottom left, so we went from level 10 to level 11
In the transformation there is some error, but I think with tiledit can arrange

Actually, interpolating an elevation tile to the next higher resolution level is a teeny bit more intricate because of the overlaps between the tiles (see Section 8 of doc\PlanetTextures.pdf):

  • Map from 259x259 to 517x517 by mapping rows/columns n -> n*2-1 (n=1..259)
  • Interpolate rows/columns 2, 4, ... 516 bilinearly from the neighbour rows/columns
  • cut off the edge rows/columns to end up with a 515x515 matrix
  • split this into a 2x2 block of 259x259 matrices, observing the overlaps between them
  • Done!

Of course, there isn't much point in generating this higher level if you just interpolate (Orbiter does that automatically anyway), so I am assuming that you will manually apply additional high-frequency features to the highres elevation maps.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
In the transformation there is some error, but I think with tiledit can arrange

It could be that the error comes from the interpolation used by your graphics editor in combination with the LUT used by OT3. If you've got an editor that understands 16-bit grayscale, please try the -g option while converting from ELV to PNG.
 

marcogavazzeni

Addon Developer
Addon Developer
Joined
Jan 5, 2009
Messages
219
Reaction score
0
Points
16
Location
Near Verona
Website
orbiteritalia.forumotion.com
It could be that the error comes from the interpolation used by your graphics editor in combination with the LUT used by OT3. If you've got an editor that understands 16-bit grayscale, please try the -g option while converting from ELV to PNG.

Now the result is better :thumbup:

Actually, interpolating an elevation tile to the next higher resolution level is a teeny bit more intricate because of the overlaps between the tiles (see Section 8 of doc\PlanetTextures.pdf):

  • Map from 259x259 to 517x517 by mapping rows/columns n -> n*2-1 (n=1..259)
  • Interpolate rows/columns 2, 4, ... 516 bilinearly from the neighbour rows/columns
  • cut off the edge rows/columns to end up with a 515x515 matrix
  • split this into a 2x2 block of 259x259 matrices, observing the overlaps between them
  • Done!

Of course, there isn't much point in generating this higher level if you just interpolate (Orbiter does that automatically anyway), so I am assuming that you will manually apply additional high-frequency features to the highres elevation maps.

Here this is a bit complicated, but I'm trying ....:compbash2:

It seems that it works ....:woohoo:
 
Last edited:

BenSisko

Donator
Donator
Joined
Feb 18, 2008
Messages
419
Reaction score
44
Points
28
I admit I'm out of my element. I'm trying to create a base for O160828 following the format suggested in the .pdf contained here:

[ame="http://www.orbithangar.com/searchid.php?ID=7008"]Bulgaria airports 2016[/ame]

I have created the tiles, textures, and .cfg for O160828 but I can't get ot3 to work. When I extract it to my desktop and type the command path, the command window flashes briefly then disappears. If I extract it to Utils in my O160828 folder I get the same. Where do I extract ot3? I'm running Win7 Ultimate 64 bit.

Thanks for your help!
Ben
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
I have created the tiles, textures, and .cfg for O160828 but I can't get ot3 to work. When I extract it to my desktop and type the command path, the command window flashes briefly then disappears. If I extract it to Utils in my O160828 folder I get the same. Where do I extract ot3? I'm running Win7 Ultimate 64 bit.

In principle, OT3 is a set of command line tools that you can extract anywhere you want. The /Utils/ folder is a good place, because the stock Orbiter utils are already there.

Your description about the command window flashing and than disappearing sounds like you simply double-clicked it in windows explorer. You need to run cmd.exe to get a console to enter command lines.

But besides this: what exactly are you trying to do? Convert old-style base tiles into new one?
 

BenSisko

Donator
Donator
Joined
Feb 18, 2008
Messages
419
Reaction score
44
Points
28
Face,
Thanks for the response. cmd.exe, clearly I'm a novice here.

Gattispilot and I are working on an add-on that requires a new base. I'd created its .cfg and tiles for the base in 100830 and want to convert them to the 160828 format.

Thanks again,
Ben

---------- Post added at 07:19 AM ---------- Previous post was at 04:22 AM ----------

It seems I've run into another issue. OT3 can't open the .cfg of the base (Cheyenne_Mountain) I'm trying to convert. My Orbiter folder is named Orbiter 160828 installed on my desktop. OT3 is also on my desktop. If I type the following commands:

c:\Users\Michael>cd desktop\ot3

c:\Users\Michael>cd desktop\ot3>treeman c:\orbiter_160828\textures\earth Surf -b c:\orbiter_160828\config\earth\base\cheyenne_mountain.cfg c:\orbiter_160828\textures2 -y > surf.txt

I get this either in the command window or generated in the surf.txt:

error: unable to open file c:\orbiter_160828\config\earth\base\cheyenne_mountain, error 3 (the space in mountain is not in my entry or in OT3's response, it's from the forum format)

This happens regardless of whether I type the path c:\desktop\orbiter_160828\..., rename my installation Orbiter160828 with the appropriate path, or if I remove the SURFTILELIST section from Cheyenne_Mountain.cfg.

What am I doing wrong?
Thanks for your thoughts.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
My Orbiter folder is named Orbiter 160828 installed on my desktop. OT3 is also on my desktop. If I type the following commands:

c:\Users\Michael>cd desktop\ot3

c:\Users\Michael>cd desktop\ot3>treeman c:\orbiter_160828\textures\earth Surf -b c:\orbiter_160828\config\earth\base\cheyenne_mountain.cfg c:\orbiter_160828\textures2 -y > surf.txt

You wrote that your Orbiter folder is installed on your desktop, but your paths start at C:\ .
I don't know your folder layout, but perhaps you meant this instead:
Code:
c:\Users\Michael>cd desktop\ot3
c:\Users\Michael\Desktop\ot3>treeman ..\orbiter_160828\textures\earth Surf -b ..\orbiter_160828\config\earth\base\cheyenne_mountain.cfg ..\orbiter_160828\textures2 -y > surf.txt

I.e.: the paths start with a backstep ("..\") instead of at root C:\ , so the Orbiter folder at path c:\Users\Michael\Desktop\orbiter_160828 is used.

Just a guess, though.
 

BenSisko

Donator
Donator
Joined
Feb 18, 2008
Messages
419
Reaction score
44
Points
28
I've actually tried it both ways with the path c:\Users\Michael\orbiter_160828\... and c:\Users\Michael\Desktop\orbiter_160828\...

But I haven't done this

c:\Users\Michael\Desktop\ot3>treeman ..\orbiter_160828\textures\earth Surf -b ..\orbiter_160828\config\earth\base\cheyenne_mountain.cfg ..\orbiter_160828\textures2 -y > surf.txt

I'll try it. I've been flying Orbiter since 2003 and I have to admit that after reading through this thread, I'm amazed at the complexity of it's infrastructure. :blush:

---------- Post added at 10:47 AM ---------- Previous post was at 10:32 AM ----------

No joy

error: unable to open file C:\Users\Michael\Desktop\orbiter_160828\config\earth\base\cheyenne_mountain.cfg, error 3
(the space in ear th is a forum format error)
Here's the .cfg which loads and runs in 160828. I'm stumped?

Code:
BASE-V2.0
Name = Cheyenne_Mountain
Location = -104.848442 38.742474
Size = 1000
ObjectSize = 100
MAPOBJECTSTOSPHERE = TRUE

BEGIN_NAVBEACON
END_NAVBEACON

BEGIN_OBJECTLIST

END_OBJECTLIST

BEGIN_SURFTILELIST
1 -299 109 1
1 -299 110 1
1 -298 109 1
1 -298 110 1
4 -2387 880 1
4 -2387 881 1
4 -2387 882 1
4 -2386 880 1
4 -2386 881 1
4 -2386 882 1
4 -2385 880 1
4 -2385 881 1
4 -2385 882 1
END_SURFTILELIST
 
Last edited:

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
error: unable to open file C:\Users\Michael\Desktop\orbiter_160828\config\earth\base\cheyenne_mountain.cfg, error 3

Is there a file at this path? Your "orbiter_160828" folder is on your Desktop, right? Error 3 is a standard Windows error code when using fopen(): ERROR_PATH_NOT_FOUND. That would mean that there is no such file on that location.

Perhaps there are some access rights problems. Try moving (or copying) the Orbiter folder to a different location, perhaps outside of your desktop.
 

BenSisko

Donator
Donator
Joined
Feb 18, 2008
Messages
419
Reaction score
44
Points
28
Moved it to C:\ and renamed it Orbiter160828 with success:woohoo:
Thanks Face:tiphat:
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,914
Reaction score
2,908
Points
188
Website
github.com
First, let me thank you Face for this set of tools! :thumbup: :hailprobe:

Second, there is a mapping problem in the conversion of 8-bit images to elevation tiles, that shows up as the "horns" in picture marcogavazzeni posted above. The PNG never gets touched, just the process ELV >> PNG >> ELV is executed. That PNG is normal, but a further conversion to PNG shows the problem in the PNG, so it points to an issue in the PNG >> ELV side. This problem shows up in tile 15/000628/000675.elv (8b).
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
Second, there is a mapping problem in the conversion of 8-bit images to elevation tiles, that shows up as the "horns" in picture marcogavazzeni posted above. The PNG never gets touched, just the process ELV >> PNG >> ELV is executed. That PNG is normal, but a further conversion to PNG shows the problem in the PNG, so it points to an issue in the PNG >> ELV side. This problem shows up in tile 15/000628/000675.elv (8b).

Thanks for the report, I'll take a look. I guess it has something to do with error accumulation due to automatic range adjustment in combination with the 16-bit LUT for 8-bit RGBs.
In the meantime - if you need the functionality - you can use the "-r0" option to disable this dynamic range adjustment, or use "-g" to switch to 16-bit grayscale. This should make the round-trip work again.

Just a quick question: treeman doesn't show me tiles at 15/000628/.* for the stock elevation archive on Earth, so could you tell me what package you've got them from? I guess it is the high-res pack at that region.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,914
Reaction score
2,908
Points
188
Website
github.com
Thanks for the report, I'll take a look. I guess it has something to do with error accumulation due to automatic range adjustment in combination with the 16-bit LUT for 8-bit RGBs.
In the meantime - if you need the functionality - you can use the "-r0" option to disable this dynamic range adjustment, or use "-g" to switch to 16-bit grayscale. This should make the round-trip work again.
I thought of the -r0 last night in bed, but didn't get back up to try it. :lol: I'll try it now, thanks!

Just a quick question: treeman doesn't show me tiles at 15/000628/.* for the stock elevation archive on Earth, so could you tell me what package you've got them from? I guess it is the high-res pack at that region.
It comes from a ~15GB archive... which was downloaded from somewhere. :uhh:
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
It comes from a ~15GB archive... which was downloaded from somewhere. :uhh:

Could you please extract the tile in question afresh (e.g. via treeman) and send it to me?
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,914
Reaction score
2,908
Points
188
Website
github.com

Attachments

  • 000675.zip
    17.2 KB · Views: 9

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
Round-trip error on default setting confirmed. Round-trip on "-r0" works. "-g" works, too.

Will investigate!
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,914
Reaction score
2,908
Points
188
Website
github.com
Yep, the -r0 does not produce "horns".
 
Top