Request Base fix for Orbiter 2016?

I've used OT3 for some things. Its a wonderful program, no fault there.
What's hard to handle is the underlying tile tree system and conversions from the old to the new system, not the tool itself.

My advice is to work using .bat files.
Create a .bat and put the command line inputs there.
It helps with editing, copy / paste and sequential actions.
 
You do have a mouse right? Why not put it to good use instead of letting idle?

Oh, I do put it to good use: it serves me very well playing all those shooters from the steam sale :lol: *BAAM* Another headshot....
 
Oh, I do put it to good use: it serves me very well playing all those shooters from the steam sale :lol: *BAAM* Another headshot....
I use my mouse with mesh making....



Code:
treeman C:\orbiter2016\textures\moon Surf -b C:\orbiter2016\Config\Moon\Base\MoonBaseAlpha1.cfg c:\orbiter2016\Textures2-y > surf.txt

Doesn't seem to do anything. But since I am flattening an area don't I need Elev?
 
Ok. so do I need to do the 1st step?

I misled you you there was a long list of the dds.
Code:
treeman C:\orbiter2016\textures\moon Surf -b C:\orbiter2016\Config\Moon\Base\MoonBaseAlpha1.cfg c:\orbiter2016\Textures2-y>surf.txt

But didn't see a surf.txt

So Should that get the tiles that are for the base listed?

But is the elevation a color rather a number?

The command-line you posted up there misses the space between the textures path, "-y", ">" and "surf.txt".

I assume you are trying to flatten the area for your "MoonBaseAlpha1.cfg". If that is no old-style base with "BEGIN_SURFTILELIST" blocks in it, the "-b" option won't help.

What you need is the highest resolution elevation tile(s) that represent the elevation at your base position out of your current tile tree. For this you first need to know the lat/lon position of your base. With the help of Martin's planet texture documentation, you can then calculated what tile "addresses" at what resolution "level" you have to look for.

You can then extract those tile "addresses" with treeman and proceed to convert them to PNG. In the PNG pictures - depending on the options you choose in ele2png - the heights are represented as different colors (or brightness in the case of grayscale). These pictures you can edit with e.g. GIMP or even MSPaint in order to manipulate the color or brightness of the pixels. Same color/brightness equals same height then, so you can flatten areas by overwriting them with the same color in the picture.

Once this picture is stored as PNG again, you can convert it back to elevation tiles with ele2png, which will then show up in Orbiter if the appropriate (set by default) texture engine option is set.
 
Yes it is for Moonbase Alpha


Code:
BASE-V2.0
Name = MoonbaseAlpha1
Location = -9.3 51.599998
Size = 1000
ObjectSize = 100
MAPOBJECTSTOSPHERE = TRUE

BEGIN_NAVBEACON
VOR MBA1 -9.3207 51.5887 121 1
VOR MBA2 -9.3152 51.6095 122 1
VOR MBA3 -9.2782 51.6127 123 1
VOR MBA4 -9.2785 51.5915 124 1
VOR MBA5 -9.3091 51.5844 125 1
END_NAVBEACON

BEGIN_OBJECTLIST

LPAD1
	POS 340.096 0.001 -386.65
	SCALE 0
	ROT 315.000
END
So this this the base.cfg here is the lat/long Location = -9.3 51.599998

Code:
treeman C:\orbiter2016\textures\moon Surf -b C:\orbiter2016\Config\Moon\Base\MoonBaseAlpha1.cfg c:\orbiter2016\Textures2 -y > surf.txt

but it sounds like I don't need this:

looking at planettexturedoc also

---------- Post added at 03:42 PM ---------- Previous post was at 01:58 PM ----------

Looking at Tileedit
'Utils\tileedit.exe is a tile viewer that is useful for navigating the tile quadtree.
It can display multiple layers side by side, and has some basic editing capabilities for
elevation tiles.
Tileedit is a Matlab application and requires the Matlab 2015a runtimes installed.
The runtimes can be found at http://uk.mathworks.com/products/compiler/mcr/
Important: Currently, tileedit only works with tile trees represented by individual
files, not with compressed archive files."

Not sure why it is not working for me.
 
So this this the base.cfg here is the lat/long Location = -9.3 51.599998

According to Martin's documentation, tile indices containing that position are:
Code:
/04/000000/000001
/05/000001/000002
/06/000002/000005
/07/000004/000010
/08/000008/000020
/09/000017/000041
/10/000035/000082
/11/000070/000164
/12/000141/000329
/13/000282/000658
/14/000564/001317
/15/001129/002635

Here is a little Excel sheet that takes lat/lon and produces the path text for you.

The above content was put into a simple text file called testbasecoord.txt. If I put that into my stock moon texture installation, I get the following:
Code:
>treeman ..\Textures\Moon Elev -F testbasecoord.txt
/04/000000/000001.elv
/05/000001/000002.elv
/06/000002/000005.elv
/07/000004/000010.elv
/08/000008/000020.elv
/09/000017/000041.elv

That means that there are levels 4 to 9 available for that position. Using the summary feature of treeman, I can also verify that my tiles contain the position like so:
Code:
>treeman ..\Textures\Moon Elev -s -F testbasecoord.txt
Level  4 tiles:1 size:134262 compressed:117952 lat: -90° to 90° (band 0 of 1) lon: 0° to 180° (band 1 of 2)
Level  5 tiles:1 size:134262 compressed:115753 lat: -90° to 0° (band 1 of 2) lon: 0° to 90° (band 2 of 4)
Level  6 tiles:1 size:134262 compressed:113065 lat: -45° to 0° (band 2 of 4) lon: 45° to 90° (band 5 of 8)
Level  7 tiles:1 size:134262 compressed:105476 lat: -22.5° to 0° (band 4 of 8) lon: 45° to 67.5° (band 10 of 16)
Level  8 tiles:1 size:134262 compressed:90513 lat: -11.25° to 0° (band 8 of 16) lon: 45° to 56.25° (band 20 of 32)
Level  9 tiles:1 size:134262 compressed:86179 lat: -11.25° to -5.625° (band 17 of 32) lon: 50.625° to 56.25° (band 41 of 64)

Using the "-e", I can now extract the elevation tiles to the cache:
Code:
>treeman ..\Textures\Moon Elev -e -F testbasecoord.txt -y > testbasecoord.files
>type testbasecoord.files
/04/000000/000001.elv
/05/000001/000002.elv
/06/000002/000005.elv
/07/000004/000010.elv
/08/000008/000020.elv
/09/000017/000041.elv

Using ele2png, the next step is to convert those tiles to PNGs like so:
Code:
>ele2png ..\Textures\Moon Elev -F testbasecoord.files -y > testbasecoord.pngs
>type testbasecoord.pngs
/04/000000/000001.png
/05/000001/000002.png
/06/000002/000005.png
/07/000004/000010.png
/08/000008/000020.png
/09/000017/000041.png

All those little testbasecoord.* files are so that I can take the full list of files over to the next step and display them here. You could pipe those commands together, too.
 
Thanks.
So i made a file in orbiter2016/textures/moon called testbasecoord
Code:
treeman C:\orbiter2016\textures\moon Surf Textures\Moon Elev -F testbasecoord.txt

but get an error:
error: can't open file testbasecoord.txt
 
Thanks.
So i made a file in orbiter2016/textures/moon called testbasecoord
Code:
treeman C:\orbiter2016\textures\moon Surf Textures\Moon Elev -F testbasecoord.txt
but get an error:
error: can't open file testbasecoord.txt

"-F" gets the PATH to the file as argument, starting in the working directory of the executable. I.e. if you started treeman in e.g. the /Utils/ directory, you also have to put the testbasecoord.txt file there, if you only want to use the relative path "testbasecoord.txt".
So you have 2 options:
  1. Put the file into the same directory as treeman or
  2. specify the path to the file from the directory treeman is in. In your case, you'd have to put "C:\orbiter2016\textures\moon\testbasecoord.txt" instead of "testbasecoord.txt" alone.
There is also a superfluous "Surf Textures\Moon" part in your commandline. I don't know why you've put that there (my examples certainly don't show them), but it is wrong.

EDIT: Oh, I see where the path problem comes from. With the second sentence of "The above content was put into a simple text file called testbasecoord.txt. If I put that into my stock moon texture installation..." I meant my complete Orbiter installation with the stock moon texture in it, not the moon directory. Shows my lack of tutorial skills :lol: .
 
Last edited:
Right now it is not trivial to get the position of the tile of interest in the available tree. Perhaps some feature in treeman would help where you enter lat/lon and get a list of all available archive tiles that contain that coordinate?

This is where the GUI would come in handy, i.e., LONG and LAT. But I'd settle for just a command line interface. :tiphat:

The appropriate request was Loru's here, I think. As DaveS mentioned, OT3 is basically just a CLI tool collection, but there is the idea of a GUI tool to do what tileedit does at least in the navigation aspect.

However, interest in the project has quickly vanished as it seems, so I did not invest much time recently.


:cry:
 
This is where the GUI would come in handy, i.e., LONG and LAT.

I don't understand that. Why would a GUI come in handy in entering longitude and latitude of the base you want to flatten? That would be 2 text-boxes instead of two command-line parameters.

IMHO, a GUI would be cool as tile selection tool, i.e. as visual way to navigate the texture tree to say "oh, around here is my base", then select certain tiles by mouse. The long/lat coordinates are much more precise, though, and a GUI will not help you much in that area. Even if you display the long/lat boundaries of the tiles, you'll have to range-check them yourself, if no text-box to simply enter them is present.

Perhaps I'm misunderstood: I'm not against a GUI tool for that, far from it. It's just that I don't want to start with it before the basic features are stable. Well, at least for OT3... I certainly won't stop anyone from creating a tool-chain with a GUI tool right from start. It could also use OT3 under the hood, I'd have no problems with that. Actually the CLI "do only one thing" architecture was chosen with exactly that in mind.

I also don't plan to abandoning it somehow. My statement there was just a matter of fact: I did not invest time in it recently because it seemed like the interest (maybe even the need) for OT3 vanished quickly. If that drop in interest was due to the lack of a GUI tool in OT3: tough luck. I thought people are happy with the stock GUI tool, anyway, so no need to press something that might be obsolete before it is even out.

Besides: I wanted to focus more on the tree pack aspect and less on the height-editing one, because for the former Martin already relied on it in his Valley addon, while the later is already available as GUI in tileedit.
 
Last edited:
I don't understand that. Why would a GUI come in handy in entering longitude and latitude of the base you want to flatten? That would be 2 text-boxes instead of two command-line parameters.

IMHO, a GUI would be cool as tile selection tool, i.e. as visual way to navigate the texture tree to say "oh, around here is my base", then select certain tiles by mouse. The long/lat coordinates are much more precise, though, and a GUI will not help you much in that area. Even if you display the long/lat boundaries of the tiles, you'll have to range-check them yourself, if no text-box to simply enter them is present.

Perhaps I'm misunderstood: I'm not against a GUI tool for that, far from it. It's just that I don't want to start with it before the basic features are stable. Well, at least for OT3... I certainly won't stop anyone from creating a tool-chain with a GUI tool right from start. It could also use OT3 under the hood, I'd have no problems with that. Actually the CLI "do only one thing" architecture was chosen with exactly that in mind.

I also don't plan to abandoning it somehow. My statement there was just a matter of fact: I did not invest time in it recently because it seemed like the interest (maybe even the need) for OT3 vanished quickly. If that drop in interest was due to the lack of a GUI tool in OT3: tough luck. I thought people are happy with the stock GUI tool, anyway, so no need to press something that might be obsolete before it is even out.

All good points Face. The statement was clumsy and RL prevented me from following the OT3 thread(in specific) and Orbiter(in general)...still no reason to open mouth and insert foot.
 
All good points Face. The statement was clumsy and RL prevented me from following the OT3 thread(in specific) and Orbiter(in general)...still no reason to open mouth and insert foot.

I'll be the last to blame you for following your duty in RL. I also have to carefully balance my time.
 
Ok I finally got to open the ele.pngs.

Not sure where to go now?
Ajn2tCD.jpg
 
Ok I finally got to open the ele.pngs.

Not sure where to go now?
Ajn2tCD.jpg

That's one of the low resolution tiles IIRC. I don't think that it makes much sense to edit there, because your base is perhaps one pixel there. If you also got the stock texture like in my example, I'd start with the level 9 tile.

According to treeman, the appropriate level 9 tile covers the range left to right 50.625° to 56.25° and bottom to top -11.25° to -5.625°. -9.3 is a bit more to the bottom, but in the middle, 51.6 is to the left. I assume it is the little red speck there.
 
Yes that was level 4 this is level 9
Zl49LvC.jpg


---------- Post added 06-25-17 at 07:42 AM ---------- Previous post was 06-24-17 at 04:40 PM ----------

Ok. I tried to match the Level 9 elev to surf:
9vLQo2A.jpg

and a view from orbiter:
u7dh3YX.jpg


closer on mba:
ruoYrJP.jpg
 
Last edited:
So this this the base.cfg here is the lat/long Location = -9.3 51.599998

This is where I made the mistake... -9.3 and 51.6 is not your lat/long coordinates, but the long/lat coordinates. After switching the values in the Excel I've posted, the following list of tiles was spit out:
Code:
/04/000000/000000
/05/000000/000001
/06/000000/000003
/07/000001/000007
/08/000003/000015
/09/000006/000030
/10/000013/000060
/11/000027/000121
/12/000054/000242
/13/000109/000485
/14/000218/000971
/15/000436/001942

I've also checked it with your post above, and the Surf tiles correspond with the screenies.
 
Thanks.
I added this to the file:testbasecoords
Code:
/04/000000/000001
/05/000001/000002
/06/000002/000005
/07/000004/000010
/08/000008/000020
/09/000017/000041
/10/000035/000082
/11/000070/000164
/12/000141/000329
/13/000282/000658
/14/000564/001317
/15/001129/002635
/09/000006/000030

then run:
Code:
ele2png c:orbiter2016\Textures\Moon Elev -F testbasecoord.files -y > testbasecoord2.pngs

but I get this:testbasecoord2.pngs
Code:
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/04/000000/000001.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/05/000001/000002.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/06/000002/000005.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/07/000004/000010.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/08/000008/000020.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/09/000017/000041.elv, error 3

not sure if it matters that all the elevation files have been extracted
 
Thanks.
I added this to the file:testbasecoords
Code:
/04/000000/000001
/05/000001/000002
/06/000002/000005
/07/000004/000010
/08/000008/000020
/09/000017/000041
/10/000035/000082
/11/000070/000164
/12/000141/000329
/13/000282/000658
/14/000564/001317
/15/001129/002635
/09/000006/000030

then run:
Code:
ele2png c:orbiter2016\Textures\Moon Elev -F testbasecoord.files -y > testbasecoord2.pngs

but I get this:testbasecoord2.pngs
Code:
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/04/000000/000001.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/05/000001/000002.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/06/000002/000005.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/07/000004/000010.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/08/000008/000020.elv, error 3
error: unable to open file C:\Users\John Gattis\orbiter2016\Textures\Moon\Elev/09/000017/000041.elv, error 3

not sure if it matters that all the elevation files have been extracted

ele2png.exe only converts elevation tiles to height-maps and vice versa. It doesn't know about tree archives and formats. You have to run through the same procedure as before, if the tiles in question are not already in your cache (folder "Elev" in the texture directory).

EDIT: wait a moment! You omitted the "\" between "c:" and "orbiter2016\Textures\Moon" up there.



---------- Post added at 06:56 ---------- Previous post was at 06:50 ----------

The stuff covered on these last two pages is where a GUI would be useful.
Kind of like Orbiter Base Maker with support for the new tiles and terrain.

What about Base Maker's author? Anybody tried to contact him if he is interested in updating the software for 2016? Or is the source open?

---------- Post added at 08:50 ---------- Previous post was at 06:56 ----------

The stuff covered on these last two pages is where a GUI would be useful.

Would a specialized GUI that covers that workflow make sense? I.e. some simple form that:

  • takes a directory input (editbox and browse dialog),
  • offers two editboxes to input long/lat coordinates of interest,
  • offers a button "Show" to start the extraction/conversion,
  • offers a spin-button to show currently displayed level,
  • shows a picturebox to the right to display the PNG of the heightmap,
  • shows a picturebox to the left to display the PNG of the surface texture,
  • offers a toggle-button to display exact coordinate crosshairs and
  • launches the favorite editor on double-click on one of the pictures.
That might be something I can assemble on a weekend with .NET and WPF. If folks can already see that this wouldn't help much in terms of base development (because the functionality is just the same as if you do it by hand in CLI and Windows-Explorer), though, I don't invest in it.
 
Last edited:
Back
Top