Jump to content

XP Scenery Generator [WIP]


tonywob

Recommended Posts


I'm not familiar with compiler, is there a way to compile just a small area to test under the sim, something like saving a OSM file under Josm and use that file to generate a scenery for xplane?

 

You can use Osmconvert - download it from here: http://wiki.openstreetmap.org/wiki/Osmconvert

 

If you're on Windows, the conversion is as easy as putting the downloaded Osmconvert and the .osm file in the same folder, and when you start Osmconvert it will ask if you want a short, step-by-step guide to help you with the conversion.

Link to comment
Share on other sites

You can use Osmconvert - download it from here: http://wiki.openstreetmap.org/wiki/Osmconvert

 

If you're on Windows, the conversion is as easy as putting the downloaded Osmconvert and the .osm file in the same folder, and when you start Osmconvert it will ask if you want a short, step-by-step guide to help you with the conversion.

 

Thank you Jacques,

if I create only buildings do you know if other layers will be excluded, like roads or woods?

Link to comment
Share on other sites


I'm not familiar with compiler, is there a way to compile just a small area to test under the sim, something like saving a OSM file under Josm and use that file to generate a scenery for xplane?

 

Yes, as Jacques posted, save the area you want inside JOSM and then convert it using osmconvert. I often do this when testing small areas.

 


if I create only buildings do you know if other layers will be excluded, like roads or woods?

 

This depends, if you use the default config files then it will generate a full scenery and exclude everything even if your scenery only contains buildings. You can just edit the config file though and at the top you will see the section about what to exclude.

Link to comment
Share on other sites

How to fix it all ?

 

OK, finally found the problem here, and it's that the line has a mixture of power=tower, and power=pole tags, so the rule at the bottom of the config file needs to be changed from 

 

<rule type="vector"><filter type="key-value">       power=line       power=tower    </filter>    <vector-definition>220</vector-definition>    <nodes-as-points>true</nodes-as-points>    <pass-through>true</pass-through></rule> 

to

<rule type="vector"><filter type="key-value">       power=line       power=tower       power=pole    </filter>    <vector-definition>220</vector-definition>    <nodes-as-points>true</nodes-as-points>    <pass-through>true</pass-through></rule>

The problem was that the tags with poles were being skipped, so the line took a big shortcut across the water :-). I've fixed this for 0.6.1, but you can apply the fix yourself above and regenerate.

Edited by tonywob
Link to comment
Share on other sites

 

OK, finally found the problem here, and it's that the line has a mixture of power=tower, and power=pole tags, so the rule at the bottom of the config file needs to be changed from 

 

<rule type="vector"><filter type="key-value">       power=line       power=tower    </filter>    <vector-definition>220</vector-definition>    <nodes-as-points>true</nodes-as-points>    <pass-through>true</pass-through></rule> 

to

<rule type="vector"><filter type="key-value">       power=line       power=tower       power=pole    </filter>    <vector-definition>220</vector-definition>    <nodes-as-points>true</nodes-as-points>    <pass-through>true</pass-through></rule>

The problem was that the tags with poles were being skipped, so the line took a big shortcut across the water :-). I've fixed this for 0.6.1, but you can apply the fix yourself above and regenerate.

 

Un très grand merci !!  / a big thank you! !!   :)

Link to comment
Share on other sites

  • 2 weeks later...

 

OK, finally found the problem here, and it's that the line has a mixture of power=tower, and power=pole tags, so the rule at the bottom of the config file needs to be changed from 

 

<rule type="vector"><filter type="key-value">       power=line       power=tower       power=pole    </filter>    <vector-definition>220</vector-definition>    <nodes-as-points>true</nodes-as-points>    <pass-through>true</pass-through></rule>

The problem was that the tags with poles were being skipped, so the line took a big shortcut across the water :-). I've fixed this for 0.6.1, but you can apply the fix yourself above and regenerate.

Sorry to come back to the problem ...
it is unfortunately not solved!
If I have more high voltage lines ghosts, for it is against railway lines that become high-voltage lines
 
The scenery With W2XP v 6.0 :
iiGKgN.jpg
 
The same scenery with W2XP v 6.1 :
UEP6Ea.jpg
 
The train lines viewed from X-Plane: they become power lines :
axAGX3.jpg
 
Other train lines in the same region :
vy50Ou.jpg
Link to comment
Share on other sites

I guess the issue here is that somebody has tagged on the train line power=tower (If I remember from the OSM in the area), so pylons are being placed along the tracks. There doesn't seem to be a standard way of tagging train power lines in OSM, so we can't easily determine which ones are part of the electricity network, and which ones are for electric train lines. Have a look and see if you can see anything specially tagged on these pylons in OSM, maybe they can be excluded?

Link to comment
Share on other sites

IMHO clearly a case of bad/unfortunate OSM tagging.

 

As there seems to be no clear best practice in order to tag single power poles of an electrified railway line your best bet would be NOT to tag the catenary masts and instead use the additional tag electrified=contact_line for specifying the correct type of railway line.

 

Or, if you want to preserve the data about the masts then changing the node tags from power=tower to power=catenary_mast is perhaps a viable solution.

 

See here if you want to read up on what some "railway experts" think about tagging electric lines in OSM :)

Edited by Daikan
Link to comment
Share on other sites

I guess the issue here is that somebody has tagged on the train line power=tower (If I remember from the OSM in the area), so pylons are being placed along the tracks. There doesn't seem to be a standard way of tagging train power lines in OSM, so we can't easily determine which ones are part of the electricity network, and which ones are for electric train lines. Have a look and see if you can see anything specially tagged on these pylons in OSM, maybe they can be excluded?

Yet the OMS Map region's, high-voltage lines are indicated "high voltage" while being poles are marked "low or medium voltage."
 
Difference between high and low voltage :
 
A  :  high voltage :
jo0GVz.jpg
B2Z6rk.jpg
Edited by Glah Salamanthe
Link to comment
Share on other sites

but version 6.1 so confused lines, low and high voltage

 

There is no version 0.6.1, so don't know which version you are using?

 

I've checked a few other areas, and Daikan is right in that the tagging is very very inconsistent. Some major lines have the voltage etc tagged, but some minor lines are tagged as major lines and no extra information is given. I'm afraid for the most part there are going to be errors until the data in OSM is standardised (Probably never). I suggest you add some filters into the rules you have to generate powerlines so it works in the area you want to generate in Switzerland.

Edited by tonywob
Link to comment
Share on other sites

Just a little question on building walls.

 

Could we imagine having side walls of some buildings made with something like water texture to make it reflect sun light in cities.

We could have some building shining in cities that could bring another realism level.

 

Is it possible ?

Link to comment
Share on other sites


Is it possible ?

 

Yes, but I'd hate to see the effect it has on framerates ;-), we're already really pushing it.

 

You can define inside a 3D model that a particular surface is shiny, so you could model one of the walls to reflect the sunlight. I'm not sure about facades, but I guess this also possible. 

Link to comment
Share on other sites


This maybe could be interesting to be tried on the kind of blue colored building type only made of glass. Just to see the behavior

 

I'll give it a go :-). We are actually removing those blue buildings and replacing them with a new facade set, as they look like plastic lego bricks.

  • Upvote 1
Link to comment
Share on other sites

There is no version 0.6.1, so don't know which version you are using?

 

I used this new filter, it was he who gave me the results. : 

 

 

 

<rule type="vector">

<filter type="key-value">

       power=line

       power=tower

power=pole

    </filter>

    <vector-definition>220</vector-definition>

    <nodes-as-points>true</nodes-as-points>

    <pass-through>true</pass-through>

</rule>

The problem was that the tags with poles were being skipped, so the line took a big shortcut across the water :-). I've fixed this for 0.6.1, but you can apply the fix yourself above and regenerate.

This is why I speak of 6 .1

 

With the old filter, I had lines that went into the lake but no confusion between the two kinds of lines.
With the new filter (I called 6.1) I have no line in the lake, but confusion between "high voltage" and "low voltage"
 
 
 

 

 

Glah, do you live in the area? If so, can you take me a photo or find a photograph of how the power lines should look including the poles/towers?
Yes, the affected areas are about 40 km from my home.
When I have time I will take pictures!
 
Thank you for all the wonderful work !!
Link to comment
Share on other sites

Hi Tony, it seems that airports which don't have proper exclusion areas get filled with tree rows along taxiways as well as runways! I've tried LIRN for example with w2xp italy 0.6.0-hd. Does it depend upon OSM mapping or does it have to do with the w2xp algorithm placing trees in urban areas and along roads? Thanks.

Link to comment
Share on other sites

It's to do with w2xp placing trees along meadows and farmland. It's likely that around the airport somebody has traced the farmland and fields, and w2xp will randomally place trees and shrubs along field boundaries. It shouldn't place them if the airport boundary has been tagged inside OSM however.

Link to comment
Share on other sites

Hi Tony

 

This is slightly off-topic. Just stumbled over this entry in Ben's x-Plane developer Blog:

http://developer.x-plane.com/2014/12/nvidia-4-ben-0/

(Ben is writing about hardware instancing relating to a specific GPU driver issue that was discovered by Rob-ART Morgan while he did some Hardware tests for me.)

 

The interesteting aspect in regards to W2XP are Ben's general comments about hardware instancing:

 

"Hardware instancing is the ability to tell the graphics card to draw a lot of copies of one  object with a single instruction.  (We are asking the GPU to draw many “instances” of one object.)  Hardware instancing lets X-Plane draw more objects with lower CPU use.  X-Plane’s rendering engine will use hardware instancing for simple scenery objects* when available; this is what makes possible the huge amounts of buildings, houses, street signs, and other 3-d detail in X-Plane 10.  X-Plane has supported hardware instancing since version 10.0."

 

"In order to draw an object with hardware instancing, it needs to avoid a bunch of object features: no animation, no attributes, etc.  Basically the object has to be simple enough to send to the GPU in a single instruction.  Our artists specifically worked to make sure that most of the autogen objects were instancing-friendly."

 

I was wondering if this is something already considered and applied in the wolrd models master library?

If not, it could be very helpful for object contributors if someone who understands these things could write a little turorial/checklist about how one would have to edit his objects to be hardware instancing friendly.

Link to comment
Share on other sites


I was wondering if this is something already considered and applied in the wolrd models master library?

 

Hi Caruso,

 

Funny you should write about this as I've been doing some experimentation this past week. I basically created a custom config file just for the UK, removed the three sets of facades OSM2XP, Simheaven and others facades, and hundreds of different models from the various libraries (i.e. The R2 Library, FF Library, Blacky75 and Uwespeed libraries) and just used a smallish group of 100 or so UK building models. I was amazed to see performance increase quite substantially, it doubled the frame rates in most instances, and loading times improved also. This I guess is the hardware instancing coming into play, with fewer varieties of buildings to deal with, instancing really kicks in and less of the horribly complicated/inefficient lego brick facades we currently have, it's possible to get decent performance. Additionally, by using fewer varieties of buildings, the scenery looked more realistic, housing estates looked like housing estates with similar houses and not a random mash of coloured buildings from various European countries which look unrealistic.

 

Another important thing I noticed is that it seemed to solve the judder often seen when panning around. I think we've (I've) been going down the wrong direction with world-models and regionalism. Basically, I think the way to get better performance is reducing our object set down to small groups suitable for certain regions and not mixing lots together just for the sake of hiding out facades. e.g. Reducing the German building set to 100 different types of models I think will really improve the loading and performance time (Just, I wish someone could come along and help create/identify these 100 buildings). Instead of trying to get buildings to fix exactly into the footprint, we can lower the tolerance so that more buildings from the smaller set will be used.

 

In v0.7.0, additionally we are going to make better used of facades. The current facade sets we have from the OSM2XP days aren't optimised. So if you have 14-storey tower block, X-Plane will stack 6 lots of 2 storey facade walls on top of each other, basically making the building far more complex than it needs to be, and let's admit, the facades look horrible and like lego bricks, so they won't be missed. Instead, World2XPlane will work with facades like it currently works with objects and pick a best fit facade type for the building, e.g. If a facade specifies it is most efficient at 14-stories high, then this will be used. I've already made a few of these and noticed an improvement in framerates when flying around New York. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...