Project Orbiter Base Maker development

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
Been working on some updates for OBM. [ame="http://www.orbithangar.com/searchid.php?ID=5607"]In case you're interested - Link to current version which doesn't have these features.[/ame]

New features:
- add bases to different planets
- object editor will show a grid - helpful for judging scale
- object editor has a "snap to grid" feature - good for aligning objects accurately
- object editor has undo/redo feature (ctrl-z/ctrl-y)
- can add existing bases from orbiter
- can add image files (.jpg or .bmp, possibly .png) to tiles - currently working on this. Hard to find a good user-interface for this. Kind of a pain to require separate files for each tile, and adding each one separately.

Choose your planet. List composed from your Orbiter install, so you will be able to add bases to custom planets (if they're in the sol.cfg file):
makenewbase.jpg


Select where on the planet (or moon) to place base (I haven't yet added the size adjustments for different DPI settings for this window). Planet images rendered straight from Orbiter .tex files:
findonmap.jpg


Cape Canaveral added from Orbiter 2010:
mainmenu.jpg


Cape Canaveral in the object editor with 10 meter grid. EDIT: just realized the "sun" on the image. That's from my laptop's brightness setting. Just ignore it.:
editstructures1.jpg


Snap to grid - perfectly aligned hangars and landing pads. The "snap to grid" feature also restricts rotation to 15 degree increments. I thought that number was best to hit 0, 30, 45, 60 and 90 degree rotations.
snaptogrid.jpg



Current "add image" UI. Right click on grid to add image (the planet image is also composed from the .tex file):
addimage.jpg
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Excellent stuff csanders, keep it coming!

One function you could consider. Is it possible to have a "snap-to Object" function?
Useful for aligning buildings and objects that are not at the default snap angles.

N.
 
Last edited:

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
Excellent stuff csanders, keep it coming!

One function you could consider. Is it possible to have a "snap-to Object" function?
Useful for aligning buildings.

N.

Yes! I do want something like that. It's a hard problem though.

I've been thinking about how exactly to go about that.

One option I've been toying with is a "complex object". It's where you can set up a bunch of objects together, and then place them as a group. I.e. you create a "complex object" that consists of more than one object (say a landing pad and a hangar), then you can rotate and move them together.

Another would be to "snap" objects together if they have the same angle alignment. I.e. a building rotated at 30 degrees, and another building rotated at 30 degrees would "snap" together if they came within the "snap" distance. (or some 90 degree offset from that 30 degrees - 120 degrees, 210 degrees... basically if the sides have the same angle).

The later is more doable now with angles being limited to every 15 degrees if you have the "snap" feature on. Before, a building rotated at .5 degrees and another rotated at 1 degrees would look the same on screen, but a "are angles equal" check in the code would say "nope."

I don't even want to get into runways and trains being described as 2 endpoints, and hangars and buildings having a nice neat rotation angle.

I think the "complex object" route is the way to go. It seems to me to make more sense to align a group of things then place them. The "align if they're close enough" route could be confusing - especially if it works when the "snap to grid" feature is on, and doesn't when it's off.

Seriously, I've been thinking about this for a while. It's a surprisingly hard problem. Any suggestions would be welcome.
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Wow, quick service!

I like the compound idea, it also gives the advantage of breaking large bases into groups.

You could still have a "Align to Object" function as long as you define the source and target?

I'm greedy, so can we have both!:blush:
 

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
I've been also toying with the idea of how one could add images to the base to make tiles. I'm thinking about removing the current "tile editor" and replacing it with the "object editor" interface.

There would be an "add image" button, then one would place the image on the map. From there, the base maker would judge (based on resolution) which tile level to place it as. Then divide it up and render it as needed.

Here's the current image of cape canaveral in the "object editor" window. Notice the blocks that are higher resolution. They're from the current tiles. It would look like that, only one could move them around - somehow. The problem here is someone anal (like myself), would want the tiles exactly aligned (which really is only a problem for Earth)
zoomout.jpg


Don't worry about the black areas over the ocean, OBM imports the transparency too. Stored in [file name]_a.jpg files:
tiles.jpg
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Its stating the obvious(not like me..!), but I think you must have the final surface tile levels for all the area that your base covers.
The largest base I've made so far is Brisbane:
[ame="http://www.orbithangar.com/searchid.php?ID=4926"]YBBN Brisbane[/ame] (shameless plug)

Followed my usual practice, level 9 tiles inside the airport boundary, then gradually lowering the tile levels till level 0, I think. This is a big sprawling airport, and your compound object function would have been a real time saver.
All the buildings and runways were done the usual way, edit the .cfg file, and see if it fits, modify, and try again. Same as every one else.

Tedious and time consuming, thats why I went to small islands!

I don't know how you are going to do it, but good surface tile handling is as important as object and mesh handling. But, you probably know that already!

Keep up the good work:cheers:

N.
 

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
If anyone wants to beta test V1.1, I've attached the install file. Unfortunately I haven't updated the manual yet, but I will get to that soon.

Known issues:
-Beacon Array handling is a little wonky, especially if one does vertical arrays (OBM won't let you do this right now). So currently one can't add them. If one imports a base that has them, they will show up in the editor though.
-OBM won't recognize widths for runway lights. It automatically sets them to the runway width for the runway they correspond to.

Undocumented features:
-when one is adding/editing objects (not tiles), they can hit ctrl-z to 'undo' and ctrl-y to 'redo.'
-in the tile editor, 'right-clicking' on tiles will bring up a menu of options.
-OBM uses 512X512 for the tile texture size. If an imported base has 1024X1024 sized tiles, it will break them up into 4 tiles, and it will import them as 4 higher level tiles.
-The above "breaking high-resolution tiles into multiple higher-level tiles" doesn't happen if you make a tile from an image file (done from inside the "tile editor").
-If you want to add transparency to a tile, find the tile name in the tile editor window inside OBM, then go to "[My Documents]\Orbiter Base Maker\cache" directory, and edit the tile with that name ending in "_a.jpg" (black = transparent, white = opaque).

Post any issues or suggestions here.

FYI, when I say "tile editor," I mean this window:
addimage.jpg
 

Attachments

  • OrbiterBasemakerSetup_1.1.0.zip
    5 MB · Views: 28
Last edited:

Arthur Dent

Absolutely Mental
Donator
Joined
Feb 8, 2008
Messages
336
Reaction score
1
Points
18
Location
Dresden
Website
wasa.pottyland.de
Great tool!
Where does the tile editor gets the source background image from? Orbiter texture file, from a tileserver or is it hardcoded?

The reason I'm asking is that I use a custom planetary texture (to replace the Earth with an alternative version of Earth) for a project and being able to use a custom texture would be great.
 

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
Great tool!
Where does the tile editor gets the source background image from? Orbiter texture file, from a tileserver or is it hardcoded?

The reason I'm asking is that I use a custom planetary texture (to replace the Earth with an alternative version of Earth) for a project and being able to use a custom texture would be great.

It gets it straight from Orbiter.

First it looks for: "[orbiter root]\Textures\[planet name].tex"
If it can't find that, it looks for: "[orbiter root]\Textures\[planet name].dds"

However, OBM does NOT use the high resolution .tex file found in the "Textures2" folder.

FYI: the folder OBM uses for [orbiter root] can be changed in the "configuration" window.
 

Arthur Dent

Absolutely Mental
Donator
Joined
Feb 8, 2008
Messages
336
Reaction score
1
Points
18
Location
Dresden
Website
wasa.pottyland.de
It gets it straight from Orbiter.

First it looks for: "[orbiter root]\Textures\[planet name].tex"
If it can't find that, it looks for: "[orbiter root]\Textures\[planet name].dds"

However, OBM does NOT use the high resolution .tex file found in the "Textures2" folder.

FYI: the folder OBM uses for [orbiter root] can be changed in the "configuration" window.

Awesome! I'll give it try and see if I can make better ground tiles with OBM than with my current approach (you don't want to know what that looks like - it's based on the the "competence in compensating for incompetence" principle.)

Edit: So it has the option to make a tile from an image file? Can It also make an image file from a tile?
Say, I have a fictional planet texture (tex). I want to export some tiles for my base as an Image file. Then I want to edit these images, that will serve as an orientation for costal lines. I want to give them I higher resolution and draw some roads on it. Then I want to re-import the enhanced image as I tile.

Is that possible?
 
Last edited:

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
Edit: So it has the option to make a tile from an image file? Can It also make an image file from a tile?
Say, I have a fictional planet texture (tex). I want to export some tiles for my base as an Image file. Then I want to edit these images, that will serve as an orientation for costal lines. I want to give them I higher resolution and draw some roads on it. Then I want to re-import the enhanced image as I tile.

Is that possible?
Not yet, but that's actually what I'm working on right now.

I'm thinking it will work something like this:
-Right-click on tile and some options will come up. One will be "edit tile with image editor"
-If the tile doesn't exist in OBM's "tile cache", OBM will make it from the .tex file, and put it in its "tile cache"
-It will then make a command line call to open the file in an editor, something like: Paint.exe "tile file name"

User Interface issues:
-Have to make the user select their image editor at some point. Probably editable in the "Configuration" window.
-Right now, the background image (from the planet.tex) is really low resolution. When OBM draws the cached tiles over top it, they are (should be) higher resolution, so they look distinct. If a tile is created from the texture, it will be the exact same image, so it will be "invisible" so to speak. One wouldn't be able to see the cached tiles from the non-cached ones as easily (currently can still tell with a mouseover though). So I'm thinking of highlighting cached tiles with yellow, the way I've highlighted the tiles in the base list with green. Also maybe have a check box that enables/disables the drawing of the background .tex image.
-Depending on their image editor, it may not be able to load with a command line call. And the image editor may not save it back to the same file. I'll have to test it with some popular ones to see how it works. I'm thinking: paint.Net, gimp, photoshop (elements version), MS paint.

Here's a question for people: I'm a developer, and I know the internal workings of the program, so I'm calling the stored available images as images that are in the "cache." Makes sense to me, but might be confusing to others. Is there some other word/phrase that might make more sense?
 
Last edited:

Arthur Dent

Absolutely Mental
Donator
Joined
Feb 8, 2008
Messages
336
Reaction score
1
Points
18
Location
Dresden
Website
wasa.pottyland.de
This is exactly what I need! This is going to make my life so much easier and will be a huge time saver. I'm eagerly looking forward to it. :)

No need to make it open in an external image editor if it requires too much effort. For me, it is fine if it justs export the tile als an image file.

Instead off caling it "tile cache" you could just call it "existing surface tiles".

Edit: The "Edit structures" window shows a higher Level (= higher resolution surface tiles) than the "Tile List Editor". Would it be possible to show the same surface tiles in "Edit structures" and "Tile List Editor"?
 
Last edited:

Felipi1205

Spaceflight enthusiast
Addon Developer
Joined
Mar 30, 2010
Messages
798
Reaction score
0
Points
16
Location
Brusque, SC
I'm having this problem of "Unable to Download Map. Sometimes this is the result of too many map downloads in a short period of times (throttiling at the server)".
Should I wait some time? I'm waiting for almost 4 hours, and this message is still there.
I'm using the latest beta version.
 

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
I'm having this problem of "Unable to Download Map. Sometimes this is the result of too many map downloads in a short period of times (throttiling at the server)".
Should I wait some time? I'm waiting for almost 4 hours, and this message is still there.
I'm using the latest beta version.
Have you been able to download any tiles at all?
 

Felipi1205

Spaceflight enthusiast
Addon Developer
Joined
Mar 30, 2010
Messages
798
Reaction score
0
Points
16
Location
Brusque, SC
Yes, some level 1 tiles. But now, it just stopped. Probably it's the problem (throttiling at the server), but wait some hours shouldn't solve it?
 

csanders

Addon Developer
Addon Developer
Joined
Jan 18, 2012
Messages
219
Reaction score
0
Points
0
Location
Plymouth
Yes, some level 1 tiles. But now, it just stopped. Probably it's the problem (throttiling at the server), but wait some hours shouldn't solve it?

Well, if you have downloaded some tiles, it shouldn't be a fundamental network problem.

The "blackout" times do seem to vary though. Usually it's a few minutes, but I've had it last half a day before. If it isn't working tomorrow, it might be some other problem.
 
Top