Board index FlightGear Development Scenery

How to create scenery

Questions and discussion about enhancing and populating the FlightGear world.

How to create scenery

Postby a.zuzek » Thu Jul 30, 2009 1:43 am

I want to create scenery that can be used in the base package. I have TerraGear CS and QGIS with the GRASS plugin installed in my system and I am able to edit shapefiles. Based on the wiki documentation at http://wiki.flightgear.org/index.php/Using_the_Custom_Scenery_TerraGear_Toolset I was able to improve the scenery around the SABE airport, but apparently I did not do it in a way that can be easily added to the base scenery package.

What I did was download the shapefiles of the area of my concern, added each one as a separate layer in QGIS and also added a Landsat image as the background layer to use as reference. I would then edit the shapefiles by moving vertexes, adding new ones, adding 'islands' to existing features or adding rings to existing features. In the parts of the scenery that I edit, I try to remove any overlaping of landclass, but the truth is, there is a lot of overlapping in the existing vmap0 data. My idea was to work incrementally, that is, do some editing, send the shapefiles and then repeat the cycle over and over again till I all the area is fixed. That way, at any point, the shapefiles wouldn't be worse than what I got at the beginning, since, as I understand, the current base scenery package was generated with the unmodified vmap0 data which has a lot of overlapping already.

From what I read in other posts in this forum and some comments on private e-mail, it seems to me that I should not edit existing shapefiles, but that I should creat new ones for the area I am interested in, being careful not to create any overlapping but also making sure that all terrain is covered by one landclass. Is that correct? And if so, what is the reason for doing it that way? Is it related to how the modified scenery is integrated into the existing one? I also read somewhere (I think it was on the custom scenery project site) that editing of shapefiles of all landclasses should be done in one single layer. Is this the way you are doing your editing? If so, why?

Cheers,

Alejandro
a.zuzek
 
Posts: 7
Joined: Wed Jul 22, 2009 1:17 am

Re: How to create scenery

Postby Tuxklok » Thu Jul 30, 2009 3:00 am

I can't think of any reason why you shouldn't use existing files as a starting point. Maybe if they were so messed up and inaccurate or something, dunno. Whether you start from scratch or work from existing doesn't really matter much, I'd pick whichever means less work. Once you've started you can continue to improve and submit whenever you feel it's ready I guess, would be no need to ever grab the files from the map server again, unless you lost your local files of course.

However, after flying around on the wonderful scenery helijah has put out, and now my own work on Innsbruck, I've become quite convinced that third party custom scenery is the way to go. ;)

cheers!
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1326
Joined: Tue Apr 21, 2009 6:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: How to create scenery

Postby statto » Thu Jul 30, 2009 3:46 am

a.zuzek wrote:I want to create scenery that can be used in the base package. I have TerraGear CS and QGIS with the GRASS plugin installed in my system and I am able to edit shapefiles. Based on the wiki documentation at http://wiki.flightgear.org/index.php/Using_the_Custom_Scenery_TerraGear_Toolset I was able to improve the scenery around the SABE airport, but apparently I did not do it in a way that can be easily added to the base scenery package.

What I did was download the shapefiles of the area of my concern, added each one as a separate layer in QGIS and also added a Landsat image as the background layer to use as reference. I would then edit the shapefiles by moving vertexes, adding new ones, adding 'islands' to existing features or adding rings to existing features. In the parts of the scenery that I edit, I try to remove any overlaping of landclass, but the truth is, there is a lot of overlapping in the existing vmap0 data. My idea was to work incrementally, that is, do some editing, send the shapefiles and then repeat the cycle over and over again till I all the area is fixed. That way, at any point, the shapefiles wouldn't be worse than what I got at the beginning, since, as I understand, the current base scenery package was generated with the unmodified vmap0 data which has a lot of overlapping already.

From what I read in other posts in this forum and some comments on private e-mail, it seems to me that I should not edit existing shapefiles, but that I should creat new ones for the area I am interested in, being careful not to create any overlapping but also making sure that all terrain is covered by one landclass. Is that correct? And if so, what is the reason for doing it that way? Is it related to how the modified scenery is integrated into the existing one? I also read somewhere (I think it was on the custom scenery project site) that editing of shapefiles of all landclasses should be done in one single layer. Is this the way you are doing your editing? If so, why?

Cheers,

Alejandro


Hola Alejandro,

I'm not sure what you did exactly to create Buenos Aires - it certainly looks good from your screenshots =) - but I'm hoping you'll send me your shapefiles. I may be able to make it easier for you and get your files into the game.

How were you able to use the LANDSAT image, did you convert it into latitude and longitude?

There are several reasons for creating one single shapefile when digitizing when you're creating it yourself (as opposed to editing a bunch of shapefiles). The two main ones are listed below.

1) Topology (topologia, parece). One shapefile means there are no gaps or overlapping between the shapefiles. This is very important, considering you can't have more than one layer at one point in time in FlightGear!

2) Merging. It's much easier to merge the files into the scenery when you have one big shapefile.

The large shapefile isn't just one landclass, either - you have to designate what landclass goes where.

Here is an example as to how I go about merging the scenery to be included in the database. The following is a picture of Madrid, Spain, an area of scenery I am proud to have finished though I don't think it's been distributed yet in the official database.
spain_coverage_2.jpg.jpg

How to read the map: The gray area is the original vmap0 files - the white area is where there is no vmap0 coverage (other than the shapfile saying it is land). The green areas are the areas I created. To give you a sense of the size of this project, the square is 2x2 degrees!

In order to create this map, I merged all the vmap0 layers together into one single shapefile (preserving their landclass). I also had one custom shapefile. The different polygons represented different landclasses - city, grass, etc. I then "cut" a hole in the vmap0 layer and then added my own scenery into the "hole". This made sure that each point on the map corresponded to only one scenery/land cover type.

If I had a bunch of different shapefiles, some of which overlapped, I would have had to merge them all together in order to achieve the same result.

If any of this doesn't make sense, please feel free to ask! I'll try to explain more clearly =)

Thanks for your interest in flightgear, and please check your private messages (and send me your shapefiles),
Cheers
John
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2112
Joined: Fri Jan 25, 2008 9:57 pm

Re: How to create scenery

Postby statto » Thu Jul 30, 2009 3:49 am

Tuxklok wrote:I can't think of any reason why you shouldn't use existing files as a starting point.


If you're using LANDSAT imagery to create your own data, I can think of two:
1) the LANDSAT and the vmap0 files use different co-ordinate systems;
2) the merging process, as I currently define it, makes it much easier to just create your own shapefile than to try to manipulate the existing scenery, especially because you get snapping as an added bonus (at least in QGIS, I think you can snap to different layers in ArcGIS and you may be able to in QGIS as well).
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2112
Joined: Fri Jan 25, 2008 9:57 pm

Re: How to create scenery

Postby Tuxklok » Thu Jul 30, 2009 5:55 am

Different work flows I guess, always interesting to see how different people tackle the same problem. :)
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1326
Joined: Tue Apr 21, 2009 6:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: How to create scenery

Postby a.zuzek » Mon Aug 03, 2009 11:41 pm

statto wrote:Hola Alejandro,
[...]
How were you able to use the LANDSAT image, did you convert it into latitude and longitude?

[...]

In order to create this map, I merged all the vmap0 layers together into one single shapefile (preserving their landclass). I also had one custom shapefile. The different polygons represented different landclasses - city, grass, etc. I then "cut" a hole in the vmap0 layer and then added my own scenery into the "hole". This made sure that each point on the map corresponded to only one scenery/land cover type.

[...]

Thanks for your interest in flightgear, and please check your private messages (and send me your shapefiles),
Cheers
John


Hi John,

In order to use the landsat image I converted it from UTM projection to latitude and logitude using the r.proj GRASS module. This might sound as if I was an expert QGIS and GRASS user, but truth is I only started learing these tools.

About merging the various shapefiles together and cutting a hole in the vmap0 layer, could you explain in terms of QGIS operations how you do that? (sending pointers to tutorials or other documentation explaining this would be ok too). You also mentioned you had a custom shapefile. What did you use it for?

I'm sending the shapefiles right now. Please check your mail.

Cheers,

Alejandro
a.zuzek
 
Posts: 7
Joined: Wed Jul 22, 2009 1:17 am

Re: How to create scenery

Postby statto » Wed Aug 05, 2009 5:03 pm

In order to use the landsat image I converted it from UTM projection to latitude and logitude using the r.proj GRASS module. This might sound as if I was an
expert QGIS and GRASS user, but truth is I only started learing these tools.


You don't need to reproject the image - you can work in UTM and reproject everything once you're done to make it easier for you,

About merging the various shapefiles together and cutting a hole in the vmap0 layer, could you explain in terms of QGIS operations how you do that? (sending pointers to tutorials or other documentation explaining this would be ok too). You also mentioned you had a custom shapefile. What did you use it for?


You need to set up a GRASS mapset and import all the vmap0 layers files into the mapset. Then, you use the v.overlay.or tool over and over on the vmap0 files until you have one single merged vmap0 file. (You may need to clip and import the landmass file as well. This is because there are areas which don't have any vmap0 file covering them except for the landmass, and if those areas are on the coast, the coastline will be incorrect.)

Then you take the shapefile you've created (with the snapping), use it to cut a hole in the merged data, then merge it with the data. It's a bit more complicated than this so let me know if you get to or understand this stage.

Cheers
John
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2112
Joined: Fri Jan 25, 2008 9:57 pm

Re: How to create scenery

Postby a.zuzek » Wed Aug 12, 2009 12:23 am

statto wrote:
You don't need to reproject the image - you can work in UTM and reproject everything once you're done to make it easier for you,


You need to set up a GRASS mapset and import all the vmap0 layers files into the mapset. Then, you use the v.overlay.or tool over and over on the vmap0 files until you have one single merged vmap0 file. (You may need to clip and import the landmass file as well. This is because there are areas which don't have any vmap0 file covering them except for the landmass, and if those areas are on the coast, the coastline will be incorrect.)

Then you take the shapefile you've created (with the snapping), use it to cut a hole in the merged data, then merge it with the data. It's a bit more complicated than this so let me know if you get to or understand this stage.

Cheers
John


After the feedack I received, mostly from John, I decide to start again and do my digitizing all in one layer. Here is a screenshot of the whole area on which I am working (1x1 degree tile at w59s35).
BsAsQGISScreenshot.gif


The landclasses I know are the vmap0 shapefiles, but I don't think there is a 1 to 1 relation between the vmap0 landclasses and the landclasses defined in FGFS. What I want to know is which landclasses are defined in FGFS and what are the textures for each one of them, so that I can better chose the landclass when I am digitizing. For instance, is there a suburban landclass? Also, somwhere I saw a 'golfcourse' landclass being mentioned. Is that one implemented in FGFS too?

Here is a detail of the screenshot above. The landclasses I used here are grass, deciduous, urban and lake. One thing you'll see is that there are two grass areas that share a border. I would like to merge them into one single polygon, but I can't find the apropriate command in QGIS. Is it ok to leave it as it is now?
BsAsQGISDetail.gif


One other thing I would like to know is how to digitize landclass data when I get to the border of my 1x1 degree tile. Is it ok to end the polygon with a stright border following the latitude or longitude line?

Cheers,

Alejandro
a.zuzek
 
Posts: 7
Joined: Wed Jul 22, 2009 1:17 am

Re: How to create scenery

Postby statto » Wed Aug 12, 2009 11:14 pm

a.zuzek wrote:
statto wrote:
You don't need to reproject the image - you can work in UTM and reproject everything once you're done to make it easier for you,


You need to set up a GRASS mapset and import all the vmap0 layers files into the mapset. Then, you use the v.overlay.or tool over and over on the vmap0 files until you have one single merged vmap0 file. (You may need to clip and import the landmass file as well. This is because there are areas which don't have any vmap0 file covering them except for the landmass, and if those areas are on the coast, the coastline will be incorrect.)

Then you take the shapefile you've created (with the snapping), use it to cut a hole in the merged data, then merge it with the data. It's a bit more complicated than this so let me know if you get to or understand this stage.

Cheers
John


After the feedack I received, mostly from John, I decide to start again and do my digitizing all in one layer. Here is a screenshot of the whole area on which I am working (1x1 degree tile at w59s35).
BsAsQGISScreenshot.gif


The landclasses I know are the vmap0 shapefiles, but I don't think there is a 1 to 1 relation between the vmap0 landclasses and the landclasses defined in FGFS. What I want to know is which landclasses are defined in FGFS and what are the textures for each one of them, so that I can better chose the landclass when I am digitizing. For instance, is there a suburban landclass? Also, somwhere I saw a 'golfcourse' landclass being mentioned. Is that one implemented in FGFS too?

Here is a detail of the screenshot above. The landclasses I used here are grass, deciduous, urban and lake. One thing you'll see is that there are two grass areas that share a border. I would like to merge them into one single polygon, but I can't find the apropriate command in QGIS. Is it ok to leave it as it is now?
BsAsQGISDetail.gif


One other thing I would like to know is how to digitize landclass data when I get to the border of my 1x1 degree tile. Is it ok to end the polygon with a stright border following the latitude or longitude line?

Cheers,

Alejandro


Alejandro,

Looks good!

Not all landclasses I use are currently in the materials.xml file because I hope we can use them in the future. Golf, sand, lake, rock, lava, dirt, industrial, suburban, cemetary are all textures i've used.

Once you have imported your vector file into GRASS you can dissolve the grass together with v.dissolve, but it's fine for now.


Don't worry about getting to the border of the 1x1 tile, we can always create a 2x1 or 1x2 tile from the vmap0 file to merge into.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2112
Joined: Fri Jan 25, 2008 9:57 pm

Re: How to create scenery

Postby tent405 » Mon Mar 11, 2013 12:59 am

I've read through all the documentation worked through my frustrations in an attempt to improve the scenery in my home state (Ohio), but I'm still running into some problems.

When I load the v0 data and the .tif together in qgis, they do not line up and are of vastly different proportions and in different areas. Any idea what I'm doing wrong? The coordinates on the v0 data are correct but the linear measurement tool is way off. The linear measurements for the TIF are correct, but it's HUGE compared to the v0 and in the wrong position.

What I'm really interested in is incorporating OSM data to improve terrain and scenery. Apparently the license is now compatible with GPL. http://www.flightgear.org/forums/viewtopic.php?p=59975

God it would be amazing if we could edit flightgear scenery using the Potlatch2 editor that's used at openstreetmap.org
tent405
 
Posts: 11
Joined: Sat Feb 16, 2013 7:30 am
Location: Ohio, USA
Callsign: T405
Version: 2.10+git
OS: GNU/Linux

Re: How to create scenery

Postby jarl.arntzen » Mon Mar 11, 2013 10:51 pm

@tent405: Yeah. I couldn't get the TIF to line up properly either. Fortunately, there's a really good OSM plugin for QGIS. Simply go Plugins --> Manage Plugins --> Scroll down and enable the Open Street Map Layer plugin. It only shows the default Mapnik bitmap layer but my experience is that it's better to simply draw on top of that layer since OSM is far too detailed compared to FG Scenery. In OSM I typically have one point every 2 meters at the most detailed but it would be almost ridiculous (my opinion) to have less than 10-20 meters between each point in FG Scenery, at least for a normal landscape or a coastline.
Frequent Flyer. Occasional Lander.
jarl.arntzen
 
Posts: 106
Joined: Thu Jan 03, 2013 9:43 pm
IRC name: Jarl Arntzen
Version: 2017.1.1
OS: Ubuntu 14.04

Re: How to create scenery

Postby tent405 » Tue Mar 12, 2013 3:32 am

Sounds great @jarl.arntzen i will try that plugin
Listen, next monday I'm attending a local meetup for GIS, actually specifically focused on qgis and OSM link
If anybody would like to give me some direct, technical questions that I could field across some of the most brilliant minds in my area about GIS, please let me know directly I'll check this thread before I go and bring back answers.
Just an idea.
The meeting is walking distance from BKL
tent405
 
Posts: 11
Joined: Sat Feb 16, 2013 7:30 am
Location: Ohio, USA
Callsign: T405
Version: 2.10+git
OS: GNU/Linux


Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests