Board index FlightGear Support osgEarth

Buildings in OsgEarth

osgEarth renders the terrain scene by building the textured geometry at runtime from raw source imagery and elevation data. An experimental FlightGear integration is currently available.

Buildings in OsgEarth

Postby Slimer » Thu Apr 02, 2015 6:11 pm

Hello all. I new in FlightGear and OsgEarth. I'm impressed by features of OsgEarth, but I can't find clearly answer on one question. Is it possible to create buildings on OsgEarth's terrain?
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby poweroftwo » Thu Apr 02, 2015 9:26 pm

Slimer wrote in Thu Apr 02, 2015 6:11 pm:Hello all. I new in FlightGear and OsgEarth. I'm impressed by features of OsgEarth, but I can't find clearly answer on one question. Is it possible to create buildings on OsgEarth's terrain?


The osgEarth integration supports buildings. After "Load Building / Structures" check the "All" box.

Image

build details are here:
http://wiki.flightgear.org/Building_Fli ... ntegration
poweroftwo
 
Posts: 100
Joined: Tue Mar 05, 2013 3:35 am
Location: USA - Alabama

Re: Buildings in OsgEarth

Postby Slimer » Sat Apr 04, 2015 3:29 pm

Thank you so much! I did not notice this feature in earlier version of OsgEarth. I successfully realized combination OsgEarth + osm2city buildings. Great approximation to real world!
Wish you success, poweroftwo!
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby Slimer » Sat Apr 04, 2015 9:16 pm

I just found out that osgEarth doesn't create buildings, if "cache only" checkbox is on. It's important for me. Is it solvable?
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby poweroftwo » Mon Apr 06, 2015 1:11 pm

Slimer wrote in Sat Apr 04, 2015 9:16 pm:I just found out that osgEarth doesn't create buildings, if "cache only" checkbox is on. It's important for me. Is it solvable?



I just tested on my machine. With "cache only" selected, the buildings still show up. I have terrasync enabled. Here is my command line:

fgfs.exe --fg-root=./fgdata --fg-scenery=./bin/0 --terrasync-dir=./bin/0 --airport=KSFO --aircraft=ufo --control=joystick --console --disable-random-objects --prop:/sim/rendering/random-vegetation=false --disable-ai-models --disable-ai-traffic --disable-real-weather-fetch --bpp=32 --timeofday=noon --enable-terrasync --disable-fgcom
poweroftwo
 
Posts: 100
Joined: Tue Mar 05, 2013 3:35 am
Location: USA - Alabama

Re: Buildings in OsgEarth

Postby Slimer » Wed Apr 08, 2015 6:49 pm

poweroftwo wrote in Mon Apr 06, 2015 1:11 pm:
Slimer wrote in Sat Apr 04, 2015 9:16 pm:I just found out that osgEarth doesn't create buildings, if "cache only" checkbox is on. It's important for me. Is it solvable?



I just tested on my machine. With "cache only" selected, the buildings still show up. I have terrasync enabled. Here is my command line:

fgfs.exe --fg-root=./fgdata --fg-scenery=./bin/0 --terrasync-dir=./bin/0 --airport=KSFO --aircraft=ufo --control=joystick --console --disable-random-objects --prop:/sim/rendering/random-vegetation=false --disable-ai-models --disable-ai-traffic --disable-real-weather-fetch --bpp=32 --timeofday=noon --enable-terrasync --disable-fgcom

I used your commandline, but everything is still the same. I tried redownload cache of osgEarth's terrain, but nothing... Proofs:
No cache, Internet on. Just perfect.
Image
Cache on, Internet off. Trouble :(
Image
Sometimes 10-15% buildings appear after reload FlightGear to switch on Cache Only mode.
2-5% buildings from osm2city appear always around airport in cache only mode. I can't understand logic...
Maybe there is trouble due to osm2city buildings? It isn't native objects of FlightGear.
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby Catalanoic » Wed Apr 08, 2015 7:48 pm

I noticed you're using Windows. What have you done to have FG with osgEarth working with Windows? If you've compiled it yourself, what steps have you followed? :shock:
User avatar
Catalanoic
 
Posts: 1018
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Buildings in OsgEarth

Postby Slimer » Wed Apr 08, 2015 8:32 pm

Catalanoic wrote in Wed Apr 08, 2015 7:48 pm:I noticed you're using Windows. What have you done to have FG with osgEarth working with Windows? If you've compiled it yourself, what steps have you followed? :shock:

I just downloaded the archive, which was provided by poweroftwo. I couldn't complie osgEarth on FG >=3 on Linux, therefore I had to use windows version.
But I use osm2city on Linux and move objects files to windows.
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby poweroftwo » Wed Apr 08, 2015 9:53 pm

Catalanoic wrote in Wed Apr 08, 2015 7:48 pm:I noticed you're using Windows. What have you done to have FG with osgEarth working with Windows? If you've compiled it yourself, what steps have you followed? :shock:


Another option for building Flightgear with OsgEarth on Windows (64 bit only) is to use this autobuild script listed in the link below. Not trying to compete with the super build script but this is one that i understand and can maintain. It does require that you install Visual studio 2010. It will work with the Express version of 2010 but you must also install the Microsoft SDK to support 64 bit.

http://forum.flightgear.org/viewtopic.php?f=81&t=23404#p213447


Here is the link to the pre-built binaries for version FG 3.1

http://forum.flightgear.org/viewtopic.php?f=22&t=25000&start=15#p228522
poweroftwo
 
Posts: 100
Joined: Tue Mar 05, 2013 3:35 am
Location: USA - Alabama

Re: Buildings in OsgEarth

Postby poweroftwo » Wed Apr 08, 2015 10:00 pm

Slimer wrote in Wed Apr 08, 2015 6:49 pm:
Sometimes 10-15% buildings appear after reload FlightGear to switch on Cache Only mode.
2-5% buildings from osm2city appear always around airport in cache only mode. I can't understand logic...
Maybe there is trouble due to osm2city buildings? It isn't native objects of FlightGear.


Hmm, not sure about osg2city buildings. I have not tried that before. I will try to find time to investigate.
poweroftwo
 
Posts: 100
Joined: Tue Mar 05, 2013 3:35 am
Location: USA - Alabama

Re: Buildings in OsgEarth

Postby Hooray » Thu Apr 09, 2015 12:54 am

poweroftwo wrote in Wed Apr 08, 2015 9:53 pm:Another option for building Flightgear with OsgEarth on Windows (64 bit only) is to use this autobuild script listed in the link below. Not trying to compete with the super build script but this is one that i understand and can maintain.


It is true that the Superbuild script isn't very well documented for people interested in maintaining/extending it - on the other hand, cmake itself is relatively straightforward, and we should be able to work out what is needed to also build your osgEarth branch using the Superbuild. The main thing that the Superbuild is built around is the ExternalProject notion, which is included at the top of the file: http://sourceforge.net/p/flightgear/fgm ... sts.txt#l3

To actually use this, the main directive is ExternalProject_Add() - e.g. see the section which builds boost: http://sourceforge.net/p/flightgear/fgm ... ts.txt#l26

This directive is highly flexible and supports a huge variety of options (e.g. downloading options etc) - which are extensively covered at: http://www.cmake.org/cmake/help/v3.0/mo ... oject.html

An introduction can be found at: http://www.kitware.com/media/html/Build ... ke2.8.html

However, we should be able to extend the script even without spending tons of time reading the docs and playing with examples, simply by looking at other instances of the ExternalProject_Add() command.

I still do believe that we shouldn't be using so many different build scripts - even the d&c script should ideally be absorbed into the Superbuild, which also applies to non-trivial topic branches like the osgEarth effort - and I am volunteering to help with that, we just need to agree that this is indeed how we want to proceed. As you may remember, I also didn't mind helping out with the initial build system fixes for Linux/Unix. And quite frankly, the Superbuild is the right tool for the job, and it is already being used by the project, as well as being actively maintained, too. In fact, it is even used on the build server - so I'd say ensuring that "fgmeta" is optionally able to also build the osgEarth branches is a good thing for this effort, as well as lowering the barrier to entry for possible inclusion on the build server.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11267
Joined: Tue Mar 25, 2008 8:40 am

Re: Buildings in OsgEarth

Postby Slimer » Thu Apr 09, 2015 6:41 pm

Hmm... Today I tried to start Flightgear+OsgEarth+osm2city buildings on another computer without internet (i moved the osgEarth cache on this computer) and all's okay! But i want to note that "cache only" mode was disabled. OsgEarth built terrain without internet, getting information from cache, i guess. On my computer osgEarth couldn't completely built terrain from cache in the same situation (it was stopped on bad quality of terrain). I think, I have some problem on my computer. Thank you for attention and responsiveness!
Slimer
 
Posts: 8
Joined: Sat Mar 28, 2015 11:11 am

Re: Buildings in OsgEarth

Postby Hooray » Thu Apr 09, 2015 7:37 pm

Here's the link to poweroftwo's Windows-specific batch file which would need to be ported to cmake superbuild style: https://bitbucket.org/simperative/fgbui ... gEarthNext
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11267
Joined: Tue Mar 25, 2008 8:40 am


Return to osgEarth

Who is online

Users browsing this forum: No registered users and 1 guest