Board index FlightGear Development Scenery

LiDAR Experiment

Questions and discussion about enhancing and populating the FlightGear world.

LiDAR Experiment

Postby xDraconian » Fri Mar 13, 2020 7:13 pm

Experimenting with LiDAR this weekend. Hoping to leverage this for an increased level of detail at some custom regional airports.

Image

The LiDAR tools seem to have become quite good at the moment.
The US has set a goal of having a complete LiDAR model of the USA by the end of 2023. I'd guess about 1/3rd has already been scanned and is currently available.

I'm quite happy with the experiment results thus far. The tricky part will be the resampling to eliminate unwanted detail (trees, houses), but maintaining a sufficient level of detail in the base mesh.
The usefulness of this as a scenery artist reference is pretty good - e.g. extracting a rough terminal building base mesh - but the quality depends on the LiDAR quality. I've seen some artists leveraging just the point data within the cloud as a modeling guide for custom asset creation.

Scott
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: LiDAR Experiment

Postby Hooray » Fri Mar 13, 2020 7:57 pm

I number of contributors have previously toyed with the idea of establishing an abstract terrain API, so that alternate terrain/scenery engine approaches could be evaluated - among them former core developers like FredB, Norman Vine, Manuel Massing, and most recently Jeff Biggs (poweroftwo on the forum, osgEarth)

Originally, the idea discussed on the devel list was to generalize the interface to such a degree, so that it would be brought up to par with the FDMShell mechanism, which already allows us to suppport different FDM engines (mainly JSBSim and YASim).

Manuel Massing had been wanting to implement this in FlightGear: https://cg.cs.uni-bonn.de/aigaion2root/ ... alable.pdf


https://www.mail-archive.com/flightgear ... 29483.html
Norman Vine wrote:I think an abstract Terrain API is a great idea however please
keep in mind that FlightGear uses a round earth model and that
this should be reflected in any FGFS Terrain API


https://sourceforge.net/p/flightgear/ma ... /27604206/
FredB wrote:My terrain engine is not ready and this project stalled another time
because of lack of
time on a long period. The code has nothing to do with FG except it uses
few classes
from SimGear, and the graphic engine is OSG. The file format is totally
different and
includes a precomputed LOD scheme (ROAM 2 for who's interested). It is
pictured in
this video


The data used in the most recent videos are from the Custom Scenery
project and
the elevations are from SRTM. So it is real world data with the
potential to add some
procedurally generated small details to enhance detail levels at close
distance.

There is nothing that could prevent to release it under the GPL, but in
the light of
recent events (read FPS) I am not fond of releasing something that
couldn't be used
directly, but just stolen very easily. I am ok to think about some
restricted access
to the sources to known (core) developpers that are willing to
contribute to make
it usable and then included to the core if it pass the smell test.

Main current issues are :
1. realtime engine needs to be re-done using latest OSG DB features
2. atmospheric model (Bruneton's) produce artefacts for spheroidal earth
3. artefacts in shapefile clipping (something to do with the cylindrical
nature of longitudes)

context: https://sourceforge.net/p/flightgear/ma ... sg20451335


As can be seen, given that we've meanwhile seen more than half a dozen more or less finished projects attempting to implement alternate terrain/LOD schemes, it might not have been such a bad idea to implement an abstract terrain API, as suggested originally back in 2004 ;-)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: LiDAR Experiment

Postby xDraconian » Fri Mar 13, 2020 9:24 pm

Thanks. I've seen the ROAM2 video. We'll get essentially the same thing when we implement Virtual Plant Builder.

The LiDAR experiments I'm doing will not require a new terrain engine. I'm expecting it to integrate into the existing BGL model.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: LiDAR Experiment

Postby montagdude » Mon Mar 16, 2020 3:36 am

I'm interested to see what you come up with. It would be cool if this could be automated somehow to generate buildings, kind of like osm2city. Having some experience with laser-scanned data myself, I know that would probably be very tricky, though.
montagdude
 
Posts: 266
Joined: Tue Dec 31, 2019 7:04 am

Re: LiDAR Experiment

Postby Hooray » Mon Mar 16, 2020 7:03 pm

montagdude wrote in Mon Mar 16, 2020 3:36 am:It would be cool if this could be automated somehow to generate buildings, kind of like osm2city.


There's an open source project called "PIxelCity" (cross platform,C++, OpenGL) that's been repeatedly discussed on the forums/devel list.
The basic idea back then was to take that code, turn it into a "city generator" for OSG, and then use OSM data to drive the generator heuristics.
TorstenD and Stuart mentioned previously that the PixelCity code base would use "fixed function pipeline" OpenGL code, and would thus need to be ported to use shaders instead.

In conjunction with other vector/shape file data we have already in FlightGear, this would make it possible to generate fairly sophisticated cities procedurally:

[PixelCity] Autogen Cities
Torsten wrote:Thanks for pointing this one out, it definitely looks interesting.
I just fetched the source and built and ran it. It really looks cool from the distance and close up.
Implementing it into FlightGear requires porting the OpenGL calls to be OpenSceneGraph compatible, probably by implementing osgDrawable.
The current implementation only shows night-time views, so this has to be tweaked, too.
Another issue to take care of is interaction with existing scenery models, so the generated buildings do not interfere with our scenery models. The same is true for our landcover, roads and elevation data.
Definitely worth some thinking. Probably as a google summer of code http://wiki.flightgear.org/index.php/GSoC project?




search.php?st=0&sk=t&sd=d&sr=posts&keywords=pixelcity
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: LiDAR Experiment

Postby xDraconian » Mon Mar 16, 2020 11:12 pm

Some degree of automation would be needed to make "generate buildings" a viable option for World Scenery. Presently, that is covered pretty well with osm2city, so I don't see a need to mess with that.
I could see some benefit if the osm2city team adopted some concepts from PixelCity to enhance the variety of generated buildings.

I would like to get some automation working for a single building - such as a terminal building. That would be a quick way to make a base mesh to work from and I would not expect that to be too difficult.
I'm getting mixed results with a manual process - classification is buggy and DTM is maybe 85% accurate - so an automated process would need a more stable toolset then what I'm currently experimenting with.

My focus is supplemental to the existing scenery efforts:
- Increased DEM detail at airports
- Dam
- Quarry
- the stretch goal would be realistic elevated roads, bridges, and offramps.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: LiDAR Experiment

Postby Hooray » Tue Mar 17, 2020 8:53 am

xDraconian wrote in Mon Mar 16, 2020 11:12 pm:I would like to get some automation working for a single building - such as a terminal building. That would be a quick way to make a base mesh to work from and I would not expect that to be too difficult.


FWIW, a couple of years ago a few contributors used dTPPs (digital terminal procedures) charts to extract vector information to generate airport/terminal buildings in a semi-automated way. This was back in the DAFIF times, so such data would have been in the public domain anyway (in the US at least).

Back then, the tool was called "svg2ac", beause the vector graphics in the PDF would be extracted, turned into SVG, which was then used to create AC files.

Original thread to be found here: https://sourceforge.net/p/flightgear/ma ... patico.ca/

https://www.mail-archive.com/flightgear ... 01581.html
Ampere wrote:Tiago and I have been working on a svg to ac converter to create airports
from pdf files.
Most of it is done, however we still have 2 problems, the first is that the
code can't at the moment produce the accurate location of the origin
(lat/long) and the second is that most of the polygons making the buildings
are non convex, thus the ugly result in the following screenshot.

Also svg2ac automatically fetches the altitude of the buildings from a
running FG via telnet.


http://wiki.flightgear.org/Dynamic_Airport_Generation

Obviously, all the screen shots have disappeared since then - and that probably applies to the code, too.
Nevertheless, some of the talks/ideas may still be interesting today, e.g.:

Well we have an SVG parser that reads the input svg file and extract
the polygons for the keywords buildings, runways taxiways. The
vertices are then stored and duplicated to create the roof. The side
polygons are computed by duplicating again 2 consecutive nodes that
form an edge.
The altitude is fetched from a running session of FlightGear via telnet for the location of the center of each building.
All the coordinates are then converted to meters using the 4 Lat/Long
lines present in the SVG file and then the Lat/Long coordinates of the
origin is obtained, this is needed in the .stg file.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Scenery

Who is online

Users browsing this forum: No registered users and 6 guests