Board index FlightGear Development Scenery

Azores Custom Scenery with Terragear

Questions and discussion about enhancing and populating the FlightGear world.

Re: Azores Custom Scenery with Terragear

Postby BecOzIcan » Mon Jun 21, 2021 4:33 am

Arent you supposed to remove Airport from your list of materials ?

viewtopic.php?f=5&t=35618&hilit=+terragear
"Parsing data using OGR-decode
Now, after doing all CORINE, I opened up TerraGearGUI and the materials tab. First, I right-clicked on Airports to remove it."
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Mon Jun 21, 2021 2:07 pm

I added the Airport land class from CORINE after reading this note on the "CORINE to materials mapping" wiki page:
"Note about Airports

AirportArea, generated by genapts850, will partly override the Airport landclass. However, it is still suggested to build it as to avoid discontinuity (i.e. "holes" filled by Default material) between the airport boundaries defined in the apt.dat file and the surrounding landclasses. "

Further, I have already tested the tg-construct without the Airport landclass and the problem persists. Could it be due to insufficient memory allocated to the command line?
I will check the CLC shapefiles one by one to see if I can find any error. And test the tg-construct with a minimum of land classes.

And after all, where are the materials and textures applied with the --area-type option of the ogr-decode command? Perhaps I do not have them all, as listed in the priorities file...
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Tue Jun 22, 2021 6:07 pm

Another quick update, just to inform that I found where the problem lies: the materials.xml file in the $FG_ROOT folder does not have any entry for a road area type!! No Road-Primary, Road-Secondary or any type of it!

Taking the roads work folders from tg-construct resulted in getting a [Finished successfully] message after more than one hour of processing.

So, to complete the process, where can I get such a materials.xml file and how to install it in my FlightGear? Is just a matter of editing that file?
FYI, I am using the saiarcot895 ppa for the stable version of FlightGear; currently still at 2020.3.8.
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby BecOzIcan » Wed Jun 23, 2021 1:00 am

No such thing as Road Primary material. Roads (and rivers) are line data. All roads whatever their type must be mapped to 'road' or 'asphalt'. the width of each type comes as a parameter in the next (width) column as per
https://wiki.flightgear.org/OSM_to_materials_mapping
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Azores Custom Scenery with Terragear

Postby lomar » Wed Jun 23, 2021 1:52 am

remember that everythong you put as a material has to be on the default-priorities.txt
lomar
 
Posts: 479
Joined: Mon Jun 30, 2014 2:38 am
Location: Rio de Janeiro, Brazil
Callsign: lomar
Version: nightly
OS: win 10

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Fri Jun 25, 2021 12:17 am

BecOzlcan, Iomar, thanks for the advice. I have followed the mappings in OSM_to_materials and generated new work folders for the roads with the "Asphalt" material, but the problem remains when giving the tg-construct command. The "Asphalt" is absent from the materials in the $FG_ROOT/Materials/default folder, and only appears in the $FG_ROOT/Materials/base folder (materials-base.xml).
I noticed there is also a "regions" folder with an "azores.xml" file, but the coordinates in that file do not cover the entire archipelago (some islands are left out).

Should I do some editing in any of those xml files?

Being short of ideas on how to complete the scenery generation, now that is so close to an end...

Unless that I could send the entire work folder to a volunteer wiling to compile it in your own equipment.
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby merspieler » Fri Jun 25, 2021 8:16 am

You can take a look at the australian scenery project.
frtps has somehow managed to get the roads directly into the scenery (modifiactions to fgdata required for it to show correctly)
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Azores Custom Scenery with Terragear

Postby ludomotico » Fri Jun 25, 2021 8:43 am

You can edit the xml files, but they are not your issue at the moment. They are going to be your next step for sure, once you have the scenery built.

tg-construct builds areas and, if a recall correctly, it is oblivious to how the areas are rendered. If you build an area not recognized by FG because they are not in the xmls (such as Road-Primary or Road-Secondary), they are going to be black areas but you can define them in the xmls any time after building them. In any case, I don't think using areas not in the xml files is a good idea because your users will also have to change the xml files.

So, back to tg-construct. Check again this command:

Code: Select all
/home/jph/TerraGear/install/terragear/bin/tg-construct --work-dir=./work --output-dir=./output/Terrain --threads --min-lat=36.386 --max-lat=40.2461 --min-lon=-31.9043 --max-lon=-24.1699 AirportArea SRTM-1 AirportObj Rivers Stream Roads Secondary Track Port Airport Beach Lake Town Urban Bog ComplexCrop CropGrass DeciduousForest DryCrop EvergreenForest Grassland Heath MixedForest NaturalCrop Rock ShrubGrassCover Vineyard Default


Notice the areas you build must be the ones created with ogr-decode. I can't see the ogr-decode for Roads, for example, you are creating Road-Primary and Road-Secondary. Check also the rest of the list. If the list is correct, just remove some of them to check whether it is builds correctly. For example, you can run tg-construct only on Default, and check if it works. Then, add additional areas in groups

BTW: you must ogr-decode roads using the --texture-line switch (or similar, I can't remember the name exactly) , to be able to have directional roads. This switch is not necessary for rivers.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Azores Custom Scenery with Terragear

Postby D-ECHO » Fri Jun 25, 2021 9:22 am

Also please note that Materials/regions simply overrides the defaults set by Materials/base. Thus, if a given material is present in Materials/base, like Road or Asphalt, it will be rendered in FG correctly (even though not different per region). As brought to my attention by IskenderWang (iirc), it is advisable to use Road instead of Asphalt for roads, because this makes them illuminated more densely at night.
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Azores Custom Scenery with Terragear

Postby ludomotico » Fri Jun 25, 2021 10:09 am

Also, if I'm not mistaken, the material defined in the xmls is Road, singular, not Roads.

The material xml files hierarchy is complex. For example, $FG_ROOT/Materials/default/materials.xml loads global.xml, which loads FG_ROOT/Materials/base/materials-base.xml Regional textures work similarly. If I recall correctly, the Azores are covered by azores.xml and southern_europe.xml. Your landclass can be loaded from any of these files.

I don't think using areas types that are not already defined in the xml files is a good idea, because your users will also have to change the xml files.

Anyway: the existence or not of the material in the xml files is not important for tg-construct. Most probably, you are trying to build an area that you have not created with ogr-decode (such as Road), or there was some error while building some area type that prevented the creation of the files relevant to this area type.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Azores Custom Scenery with Terragear

Postby BecOzIcan » Fri Jun 25, 2021 3:40 pm

Correct Ludomatico,

No change required to any material xml
The OSM data must be mapped to Road (Title Case, Singular) in the TerragearGUI panel as shown below

Image
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Fri Jun 25, 2021 6:51 pm

Thanks for all the help and advice!

I had already tested tg-construct with the CORINE data, and successfully built the terrain. All the area types I have used exist in the default and base folders, so I do not expect to get any "black" areas in the result. This is true for all the area or polygon shapes. The problem lied in the OSM line data.

The commands I used now to generate the files in the work folder are as follows:
Code: Select all
/home/jph/TerraGear/terragear/src/Prep/OGRDecode/ogr-decode --max-segment 500 --line-width 6 --texture-lines --area-type Road work/Track data/osm/osm-track
/home/jph/TerraGear/terragear/src/Prep/OGRDecode/ogr-decode --max-segment 500 --line-width 7 --texture-lines --area-type Road work/Secondary data/osm/osm-secondary
/home/jph/TerraGear/terragear/src/Prep/OGRDecode/ogr-decode --max-segment 500 --line-width 8 --texture-lines --area-type Road work/Roads data/osm/osm-primary
/home/jph/TerraGear/terragear/src/Prep/OGRDecode/ogr-decode --max-segment 500 --line-width 3 --area-type Stream work/Stream data/osm/osm-stream
/home/jph/TerraGear/terragear/src/Prep/OGRDecode/ogr-decode --max-segment 500 --line-width 8 --area-type Stream work/Rivers data/osm/osm-river


And the only one which results in a crash of tg-construct is the Rivers work folder. So now I will try to generate a custom scenery with no rivers, just to see if it completes, and on the other hand, carefully examine the OSM shape to see if there are some strange features... The geometry validation in QGIS did not detect any problems in any of the shapes, being OSM or CORINE.

Hope to have a first (almost complete) result soon, and post here a few pictures! :D
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Sun Jun 27, 2021 5:15 pm

Project Update:

I have examined the Rivers shapefile, and did find some strange features, like the one in the picture below (using QGIS), and some shapes with a negative zed-order (corresponding to tunneled parts of the Rivers), but even after eliminating this odd features, the problem persisted. It even persisted after getting the rivers from the overpass-turbo query "Waterway = River" and then exporting the Geojson to shapefile.

The plan for now is to generate the scenery with no rivers, but all the other features. A test scenery I have produced, still with no rivers neither roads, shows a more varied landscape with diverse land classes and improved elevation mesh. The airports are now 3D, with slope runways with an "arching" structure which globally gives better results than the previous flats. The groundnets, as expected, are now aligned with the scenery, namely the markings.
I have also added the osm2city buildings from merspieler, and the overall result looks great.

Off course, there are still much room for improvements. For instances, the land classes are prepared for a summer in the southern European region, so this results in rather arid landscapes in the Azores, which are not realistic. The regular landscape there is predominantly green all year round. It is not a "Mediterranean" kind of landscape, but pretty much "Atlantic"!

I plan to have a working scenery you might download during this following week (28 june to 4 july).

The "strange" rivers I found in São Miguel island:
Image
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby AzulProfundo » Thu Jul 01, 2021 12:24 am

Quick update:

I managed to get a first complete scenery (except for the Rivers). tg-construct took over my system during one and a half hour, but managed to put a total of 76 Mb in the Terrain folder. The picture below shows an instant of the procedure (my notebook as a total of 8 i5 cores and 8Gb memory).

Now is just a matter of packaging everything in a custom scenery zip to be shared via Google Drive, so you can finally enjoy the result!

My plan is to add the airports (groundnets and thresholds) produced in FG-Airports, the Buildings from the osm2city project by merspieler concerning the Azores, the Terrain by TerraGear (airport scenery by D-ECHO, plus the CORINE and OSM data, and the SRTM-1 by NASA) and also a documents folder with two short odt files: Sources and Licenses and the Scenery Development process - short description.

Picture: tg-construct at working speed... :D
Image

Scenery screenshots and the custom scenery zip file soon (2nd of July deadline still holds :wink: )
__________________________________________________________________________
Slimbook ES (Ubuntu Notebook)
AzulProfundo
 
Posts: 97
Joined: Sat May 09, 2020 12:54 am
Location: Portugal
Version: 2020.3.8
OS: Ubuntu 20.04

Re: Azores Custom Scenery with Terragear

Postby frtps » Thu Jul 01, 2021 10:45 am

About those strange "rivers" at https://www.openstreetmap.org/edit#map= ... /-25.78717 : they are tunnels under a road between two lakes. They do have the "tunnel" tag so you could filter them out that way, and because they are under a bridge the road has level = 1. OSM says that this should be tagged tunnel=culvert so I've added that, not sure if that will help your river extraction.

I discovered that to find a feature by ID, you just have to go into the edit mode of OSM and search by ID.
frtps
 
Posts: 145
Joined: Sun Aug 05, 2018 10:58 am

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 12 guests