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
  #1  
Old
csanders's Avatar
csanders csanders is offline
Orbinaut
Default Orbiter Base Maker development
by csanders 06-21-2012, 02:41 AM

Been working on some updates for OBM.
In case you're interested - Link to current version which doesn't have these features.


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):


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:


Cape Canaveral added from Orbiter 2010:


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.:


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.



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

Last edited by csanders; 06-21-2012 at 02:58 AM.
Reply With Quote
Views 1443 Comments 25
Total Comments 25

Comments

Old 06-21-2012, 07:10 AM   #2
liber
Orbinaut
 
liber's Avatar
Default

Thanks,this look great.
liber is offline   Reply With Quote
Old 06-21-2012, 07:15 AM   #3
Notebook
Orbinaut
 
Notebook's Avatar

Default

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 by Notebook; 06-21-2012 at 07:39 AM.
Notebook is offline   Reply With Quote
Old 06-21-2012, 07:45 AM   #4
csanders
Orbinaut
 
csanders's Avatar
Default

Quote:
Originally Posted by Notebook View Post
 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 by csanders; 06-21-2012 at 03:02 PM.
csanders is offline   Reply With Quote
Thanked by:
Old 06-21-2012, 08:01 AM   #5
Notebook
Orbinaut
 
Notebook's Avatar

Default

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!
Notebook is offline   Reply With Quote
Old 06-21-2012, 08:10 AM   #6
csanders
Orbinaut
 
csanders's Avatar
Default

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)


Don't worry about the black areas over the ocean, OBM imports the transparency too. Stored in [file name]_a.jpg files:
csanders is offline   Reply With Quote
Old 06-21-2012, 08:30 AM   #7
Notebook
Orbinaut
 
Notebook's Avatar

Default

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:
YBBN Brisbane
(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

N.
Notebook is offline   Reply With Quote
Old 06-21-2012, 01:31 PM   #8
4throck
Enthusiast !
 
4throck's Avatar
Default

Looks great.

For me, other planets, base and tile import from Orbiter are enought to make me happy!
Taxiways would also be nice...
4throck is offline   Reply With Quote
Thanked by:
Old 07-17-2012, 11:50 PM   #9
csanders
Orbinaut
 
csanders's Avatar
Default

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:
Attached Files
File Type: zip OrbiterBasemakerSetup_1.1.0.zip (4.97 MB, 26 views)

Last edited by csanders; 07-17-2012 at 11:57 PM.
csanders is offline   Reply With Quote
Thanked by:
Old 07-19-2012, 08:39 AM   #10
Arthur Dent
Absolutely Mental
 
Arthur Dent's Avatar
Default

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.
Arthur Dent is offline   Reply With Quote
Old 07-19-2012, 12:17 PM   #11
csanders
Orbinaut
 
csanders's Avatar
Default

Quote:
Originally Posted by Arthur Dent View Post
 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.
csanders is offline   Reply With Quote
Thanked by:
Old 07-19-2012, 01:19 PM   #12
4throck
Enthusiast !
 
4throck's Avatar
Default

The latest version works fine for me. Base import is very useful!
4throck is offline   Reply With Quote
Old 07-19-2012, 03:27 PM   #13
Arthur Dent
Absolutely Mental
 
Arthur Dent's Avatar
Default

Quote:
Originally Posted by csanders View Post
 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 by Arthur Dent; 07-19-2012 at 03:35 PM.
Arthur Dent is offline   Reply With Quote
Old 07-19-2012, 04:06 PM   #14
csanders
Orbinaut
 
csanders's Avatar
Default

Quote:
Originally Posted by Arthur Dent View Post
 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 by csanders; 07-19-2012 at 04:12 PM.
csanders is offline   Reply With Quote
Old 07-19-2012, 06:00 PM   #15
Arthur Dent
Absolutely Mental
 
Arthur Dent's Avatar
Default

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 by Arthur Dent; 07-19-2012 at 06:07 PM.
Arthur Dent 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 11:28 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 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2012, Orbiter-Forum.com. All rights reserved.