Jump to content
Sign in to follow this  
tonywob

Speed up and further development for OSM2XP

Recommended Posts

 

 


Tony, first of all I just want to say your works looks really awesome :D!
 
I wondered what kind of objekts does your script link into the generated scenery, just the X-Plane Standard ones or also objects from librarys like OpenSceneryX? Using objects from OpenSceneryX could make the impression much more realistic since most american buildings don't really fit into Europe or even Asia :D.
 
Also it would be really cool if you could tell us what your plans with this tool are? Are you thinking of earning money with it (by selling generated scenerys) or do you consider publishing it as open source on a platform like github (which would enable other coders to send in patchs to support other tags in OSM for example)? The later one would be really awesome and I think this tool could become a very powerful scenery generator to make x plane even more awesome ;).

 

Thank you for your kind words. It links to anything you ask it to, it's up to the person generating the scenery. In my examples, I link to bits of OpenSceneryX, R2 Czech Buildings library, and some default objects. If someone makes a set of buildings and facades for Japan for example, they can change the config to use those buildings and facades instead. The idea is to make it highly configurable. 

 

Regarding my plans, it would be hypocritical of me to charge for the generated data, since I openly dislike other companies who charge people for OSM data conversions (e.g. OpenVFR and Orbx Global)  :lol: . More than likely it will be donationware (download for free, if you like it and wish to see further development, you send a donation). I don't have the means or time to host it, write manuals, and offer support. It's hosted privately on github, however I'm undecided if I'll opensource it. OSM2XP has been opensourced for over a year and nobody has touched it unfortunately.

 

Also, the program will let developers write scripts which can be placed into the pipeline (essentially plugins). So, if somebody wanted to do something crazy or unsupported with a particular tag/object, they could write a plugin to do so and call it from the config file when a particular condition is met.


 

 


Hey, I used to try ModelconverterX and scenproc for Fsx had only succeeded once :) that was last year, don't how it had worked. Maybe you give that a try. Of not scenproc but Modelconverterx.

 

I don't know much about the internals of FSX and the scenery formats, but I'd be interested to see how it works. If it somehow merges the textures into one sheet, then that would be very interesting.

Share this post


Link to post
Share on other sites

do you have a model which I can try in modelconverterx , of course it will be a try and error method, modelconverterx has support for .obj which to my guess is supported XPX. in fact it shows as a wavefront    .obj I don't know what that is.


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

 

 


do you have a model which I can try in modelconverterx , of course it will be a try and error method, modelconverterx has support for .obj which to my guess is supported XPX. in fact it shows as a wavefront    .obj I don't know what that is.

 

Try this one -> http://sketchup.google.com/3dwarehouse/details?mid=855e7070ae291bd5f59311a5bf4c9e27&prevstart=0

 

The wavefront .obj format is not the same as the X-Plane obj format unfortunately. 

Share this post


Link to post
Share on other sites

Yeah, shortly after I asked whether you'd release it as open source, I figured OSM2XP is open source as well, didn't know that before :huh: . I think the main reasons why people decide to work on open source projects is on the one hand that they want to work with the software as well (and therefore want to improve its quality) and on the other hand that it is relativly easy to get started coding. To be honest I didn't browse through the osm2xp code, but this projects sounds like currently it is at stage where the amount of code is not too big...

 

So if I understand you correctly it would be possible to assign a bunch of objects from a scenery library to a certain OSM tag (and maybe only in a certain area) and the resulting scenery would use those objects in this area. Or to take this concept one step further, theoretically I could map an entire scenery library like OpenSceneryX to OSM tags and your scripts would build a scenery with many, many different objects which fit to the local area?

I also like your idea of creating a highly configurable program and being able to add scripts into the pipleline B) . I guess this will enable the user to create truely plausible scenerys, as one could write scripts to do cool stuff, just like alpilotx did when he randomly added trees along the streets and farmbuildings in rual areas (take a look at http://www.alpilotx.net/downloads/x-plane-10-tree-lines-and-farms/ and his before and after screenshots here: https://plus.google.com/photos/101666907909842492197/albums/5765374892383381569?banner=pwa). So one could write scripts to place reeds at the shore of lakes, put traffic signs at intersections (if no OSM data is avaiable), place shrubs and grasses all over the world, put farm animals on the meadows, replace trees with smaller plants in higher altitudes, etc. Basically the idea is just to add "random noise" objects if OSM data is insufficent to make the scenery even more plausible.

 

Sorry for the many questions and ideas, I am just a little bit excited about this project :P .

Share this post


Link to post
Share on other sites

 

The wavefront .obj format is not the same as the X-Plane obj format unfortunately. 

 

 

Thanks, let  me try.

 

Hmmm damn,

 

Hey got a small request , can you try Cape Town data ? 


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

So if I understand you correctly it would be possible to assign a bunch of objects from a scenery library to a certain OSM tag (and maybe only in a certain area) and the resulting scenery would use those objects in this area. Or to take this concept one step further, theoretically I could map an entire scenery library like OpenSceneryX to OSM tags and your scripts would build a scenery with many, many different objects which fit to the local area?

 

 

Exactly yes, here is a sample of some config options so you get an idea:

<rule type="forest">
    <filter type="key-value">
        natural=wood,type=deciduous
        landuse=forest,type=deciduous
    </filter>
    <forests>
        <density>255</density>
        <forest>lib/g8/broad_cld_dry.for</forest>
    </forests>
</rule>

This is a simplistic rule, which picks up forests which have decidious trees and builds a forest

<rule type="object">
    <filter type="key-value">
        man_made=crane
    </filter>
    <objects>
        <angle>0</angle>
        <object>opensceneryx/objects/buildings/industrial/cranes/1.obj</object>
    </objects>
</rule>

This will insert a crane

<rule type="building">
    <filter type="key-value">
        building=*,building:colour=grey
        building=*,building:material=concrete
        building=*,building:color=grey
    </filter>
    <facades>
        <facade>buildingComplexShape3.fac</facade>
    </facades>
</rule>

This adds a building, when it's marked as grey and concrete

<rule type="object">
    <filter type="key-value">
        building=*,building:levels=1
    </filter>
    <min-area>9</min-area>
    <max-area>10</max-area>
    <objects>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10a.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10b.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10c.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10d.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10e.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10f.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10g.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10h.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10i.obj</object>
        <object>R2_Library/budovy/domky/1-2p/domek_1p_10j.obj</object>
    </objects>
</rule>

This last one will insert and rotate one of the objects (houses from the R2 library) inside an area tagged as a building, having one storey and meeting the area requirements. This could also include wall size restrictions, etc.

 

I'm still writing the options, but you could easily build your rules so they only apply at specific latitudes. So forests could switch to mediterrean style when you go below 40'C north, for example.

 

I like your idea of random objects placed inside a closed way, i.e. You could place cattle on fields. I'll add this in as an option as a random placement.

 

 

Hey got a small request , can you try Cape Town data ? 

 

Sure, I'm trying Chicago out at the moment. But will give it a go and see what's there

Share this post


Link to post
Share on other sites

:(  model converterx imported the .kmz perfectly and can the see 3d model but there is no export to X plane .obj, others are .3ds , wavefront , ac3 , .flt and fsx and fs9.

 

wow that model looks awesome. 


As I could not convert it to XPX format , now modelconverterx has a facility to extract it .shp and that's what I have done and it has given three files.

 

.shp   . dbf    .shx 

 

Maybe this could help.


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

 

 


As I could not convert it to XPX format , now modelconverterx has a facility to extract it .shp and that's what I have done and it has given three files.
 
.shp   . dbf    .shx 
 
Maybe this could help.

 

I'm actually interested in how it manages textures. Has it produced any images, e.g. When you export an object, can you see if it's merged all the images into one texture? Files to look for are .dds .png, etc..

Share this post


Link to post
Share on other sites

I'm actually interested in how it manages textures. Has it produced any images, e.g. When you export an object, can you see if it's merged all the images into one texture? Files to look for are .dds .png, etc..

 

 

I donwloaded OSM2XP and opened the starbuck (this is north of KSEA ) and it asked if it is buildings or forest, so I selected buildings and created more than 100 facades for that one commercial center.


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

Those config rules seem really straight forward but really flexible at the same time :). If I understand your code snippets correctly by using <filter> one can exactly specify certain criteria. Can you use two (or multiple) filters like one for longitudes and latitudes and one for land type (rual, city, etc.) to make a even more precise selection as well? Also I wondered how long does the program take to run? Is it as slow as osm2xp or is it faster? And whats the bottleneck when running it?

I believe the random placement feature could improve the plausiblity and the awesomeness of the entire scenery a lot :). Sometimes the OSM data is just not sufficient enough (which is now displayed as empty space which is of course not the reality) or nobody cares to record the data to OSM because it is too tedious to record it (like every single tree). Random placement would fill these empty spots (just like alpilotx tree placement alongside of roads) and could create even more detail like cattle on fields or the expamples I mentioned above.

Share this post


Link to post
Share on other sites

 

 


Those config rules seem really straight forward but really flexible at the same time :). If I understand your code snippets correctly by using one can exactly specify certain criteria. Can you use two (or multiple) filters like one for longitudes and latitudes and one for land type (rual, city, etc.) to make a even more precise selection as well?

 

Yes, you can use and/or statements, regular expressions, etc.. You also have access to it's longitude, latitude, area, width, height, wall sizes, etc. So filter rules can be pretty powerful

 

 

 


Also I wondered how long does the program take to run? Is it as slow as osm2xp or is it faster? And whats the bottleneck when running it?

 

Well this depends on how big the files are you work with. It runs about the same speed as osm2xp, but it all depends on what you ask it to do. If it's generating custom textures and reading through lots of rules, it will run slower. Generating an entire continent will take a very very long time, in OSM2XP Europe took me about 6 days. Generally, it's faster to generate individual countries

Share this post


Link to post
Share on other sites

There are some multiple textures created in the folder  , can I send you those three files (osm files)  ? and it has a navdata of 40 + 130.


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

 

 


There are some multiple textures created in the folder  , can I send you those three files (osm files)  ? and it has a navdata of 40 + 130.

 

No need, that answers the question (it uses multiple textures :( ) 

Share this post


Link to post
Share on other sites

No need, that answers the question (it uses multiple textures :( ) 

 

 

I am confused , I thought you wanted more than one texture ? scratching my head now. but can you try modelconverterx it is free and it's only 10-20 mb download size, maybe you could figure what to do with.


Ryzen 5 1600x - 16GB DDR4 - RTX 3050 8GB - MSI Gaming Plus

Share this post


Link to post
Share on other sites

 

 


I am confused , I thought you wanted more than one texture ?

 

I wanted to know if it created more than one texture, if it did, then it's not compatible with X-Plane. If it created just one texture, then it could be converted to X-Plane's format

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...