Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "TerraGear"

From FlightGear wiki
Jump to: navigation, search
m (added Gentoo)
(Pre-compiled builds: Link fix for the Windows build, and removal of the 'docker image' information as the link is dead.)
 
(44 intermediate revisions by 22 users not shown)
Line 1: Line 1:
'''TerraGear''' is a collection of open-source tools and rendering libraries which can transform publically available GIS data in 3D representations (i.e. 3D models or 3D maps) of the earth for use in real time rendering projects. Terragear can import 3D data sets such as DEM terrain grids, 2D polygon data sets such as coastlines, city outlines, lake outlines, and 2D raster data sets such as the 1 km NAOO land use/land cover data. It also has tools for generating realistic airports, runways, and lighting based on available FAA data.  
+
{{Hatnote|Not to be confused with [[TerraSync]], a tool to download scenery on-the-fly.}}
  
TerraGear is the primary tool used to generate the [[Scenery]] for the [[FlightGear]] project.  
+
[[File:TerraGear The Hague wireframe.png|thumb|270px|A wireframe view of detailed [[CORINE]] and [[OSM]] scenery, generated by TerraGear.]]
 +
'''TerraGear''' is a collection of open-source tools and rendering libraries which can transform publically available GIS data in 3D representations (i.e. 3D models or 3D maps) of the earth for use in real time rendering projects. TerraGear can import 3D data sets such as DEM terrain grids, 2D polygon data sets such as coastlines, city outlines, lake outlines, and 2D raster data sets such as the 1 km NAOO land use/land cover data. It also has tools for generating realistic [[airport]]s, runways, and lighting based on available FAA data.
 +
 
 +
TerraGear is the primary tool used to generate the [[scenery]] for the [[FlightGear]] project.  
 +
 
 +
Without terragear, it is possible to change Terrain '''textures''' but not terrain '''shapes'''. If you want to change the texture for cities, you change the materials file. If you want to change the coast line, you need terragear.
 +
Check the material files in directory FGDATA/Material. Identify the material file that includes Montevideo, which is probably latin_american_cities.xml ([[Howto:Regional texturing]] and this page [[Procedural Texturing]]<ref>{{cite web
 +
  |url    =  https://forum.flightgear.org/viewtopic.php?p=311143#p311143
 +
  |title  =  <nowiki> Re: Improving terrain realism </nowiki>
 +
  |author =  <nowiki> ludomotico </nowiki>
 +
  |date  =  May 25th, 2017
 +
  |added  =  May 25th, 2017
 +
  |script_version = 0.40
 +
  }}</ref>
  
  
 
== Introduction ==
 
== Introduction ==
For a variety of reasons you might want to build terrain yourself, rather than downloading it from the available Scenery on FlightGear. For instance, if you use [[TaxiDraw]] to create or modify an airport layout, you might wish to see how that modified airport would look in the Scenery before deciding you're happy with the results. And normally, to see and use the airport in the Scenery, it's necessary to submit the modifications to the FlighGear Scenery staff and then wait untill the next update of the Scenery of that area is available via [[TerraSync]] or in the [http://www.flightgear.org/Downloads/scenery.html official FlightGear Scenery] build. If you can build terrain yourself, you can start using it right away. <BR>
+
For a variety of reasons you might want to build terrain yourself, rather than downloading it from the available scenery on FlightGear. For instance, if you use [[WED]] to create or modify an airport layout, you might wish to see how that modified airport would look in the Scenery before deciding you're happy with the results. And normally, to see and use the airport in the scenery, it's necessary to submit the modifications to the FlighGear scenery staff and then wait untill the next update of the scenery of that area is available via [[TerraSync]] or in the [http://www.flightgear.org/download/scenery/ official FlightGear Scenery] build. If you can build terrain yourself, you can start using it right away.
Maybe the official Scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher resultion vector data (vmap1, Tiger) to get better roads/rivers. For all these reasons learning how to use TerraGear is a good idea.  
+
  
 +
Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher resolution vector data (vmap1, Tiger) to get better roads/rivers. For all these reasons learning how to use TerraGear is a good idea.
  
 
== Getting TerraGear ==
 
== Getting TerraGear ==
 +
=== Using the download_and_compile.sh script (Linux distros using apt) ===
 +
Get the script download_and_compile.sh if you don't already have it. Copy it into a specific directory, no need to be root.
 +
{{#tag: syntaxhighlight |
 +
wget {{fgmeta url|view=raw|path=download_and_compile.sh}}
 +
mv download_and_compile.sh\?format\=raw download_and_compile.sh
 +
chmod 755 download_and_compile.sh
 +
./download_and_compile.sh SIMGEAR TERRAGEAR
 +
| lang="bash"
 +
}}
 +
This will build SIMGEAR (pre-requisite) and TERRAGEAR properly, installing dependencies if necessary and you will be done for the TG compilation part of the process.
 +
 
=== Pre-compiled builds ===
 
=== Pre-compiled builds ===
* [ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32 Windows builds]
+
* [http://build.flightgear.org:8080/job/TerraGearGUI-Win/lastSuccessfulBuild/artifact/*zip*/archive.zip Latest Windows build], built by the [[FlightGear Build Server]].
 +
 
 +
:*[[TerraGear_Installation_for_Windows|Detailed Windows Installation Instructions]]
  
 
=== Source ===
 
=== Source ===
The source is hold in a [[git]] repository on the [http://mapserver.flightgear.org/git/ mapserver].
+
The source is hold in a [[Git]] repository at SourceForge..
git clone git://mapserver.flightgear.org/terragear-cs
+
{{#tag: syntaxhighlight |
 +
{{terragear clone|post=flightgear-terragear}}
 +
| lang="bash"
 +
}}
  
 +
you have to use the stable branch called "scenery/ws2.0"!
 +
{{terragear url|branch=scenery/ws2.0/~}}
  
 
== Compilation ==
 
== Compilation ==
 
=== Dependencies ===
 
=== Dependencies ===
 
* TerraGear
 
* TerraGear
** [[SimGear]] - '''Not''' simgear-cs!
+
** [[SimGear]] - '''Not''' simgear-cs! (simgear-dev package)
** [[OpenSceneGraph]]
+
*** SimGear can be compiled without OSG support thus eliminating many deps, like OSG. Use "-DSIMGEAR_HEADLESS=YES" for a minimal build.
** [[plib]]
+
** [http://www.cgal.org/ CGAL] - For high accuracy geometric calculations
** libnewmat - at least version newmat11 (which is beta at the time of writing) <BR>See [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README.newmat;h=95570b6b279d3d00bd7664cd4f00d6c4802aed1b;hb=HEAD README.newmat] for info on how to obtain and install it.
+
** [http://www.gdal.org/ libgdal]
** gpc - See [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README.gpc;h=226e185b1ce1d1578006b48bb426e35848cce93b;hb=HEAD README.gpc] for info on how to obtain and install it.
+
** libgdal
+
** libproj
+
** libogdi
+
** Feel free to add more required libs here!
+
  
 
=== Building ===
 
=== Building ===
Please, have a look at [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README;h=7dae654283ca0b1447aeb3aa398287219f4b57df;hb=HEAD README] and/or [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README.cygwin;h=d0436ec0371dd9fa255a8a560a388818432600d6;hb=HEAD README.cygwin] of the terragear-cs sources.
+
  cmake . [options]   
./autogen.sh
+
  ./configure [options]  
+
  sed s/-O2// -i src/Lib/TriangleJRS/Makefile
+
 
  make install
 
  make install
<tt>./configure</tt> options:
+
<tt>cmake</tt> options:
  --prefix=/path/to/install-dir
+
  -DCMAKE_PREFIX_PATH="/path/to/lib/install/prefix"
I am missing reliable data here. Please, revise/complete the list if you have more info!
+
--with-gdal=/path/to/gdal-config
+
--with-gpc=/path/to/libgenpolyclip.a
+
--with-newmat=/path/to/libnewmat.a
+
--with-plib=/path/to/libplib*.a
+
--with-simgear=/path/to/libsg*.a
+
  
=== Plattform specific ===
+
=== Platform specific ===
 
* Debian: [[Building FlightGear - Debian#TerraGear]]
 
* Debian: [[Building FlightGear - Debian#TerraGear]]
* Gentoo: <tt>emerge -av terragear-cs</tt> <BR>See [[Building Flightgear - Gentoo]].
+
* Gentoo: <tt>emerge -av terragear</tt> <BR>See [[Building Flightgear - Gentoo]].
* Ubuntu: [[Building terragear-cs in Ubuntu_64]]
+
* Ubuntu: [[Building terragear in Ubuntu 910 (32- or 64-bit)]]
 
+
  
 
== GUI Tool ==
 
== GUI Tool ==
 
A [[TerraGear GUI]] is available for those that would like to use TerraGear without knowing/using the command line options.
 
A [[TerraGear GUI]] is available for those that would like to use TerraGear without knowing/using the command line options.
 
  
 
== Related content ==
 
== Related content ==
 
* [[Using Terragear]]
 
* [[Using Terragear]]
* [[Terragear Corine]]
+
* [[TerraGear CORINE]]
 
+
* [[TerraGear Documentation]]
 +
* [http://api-docs.freeflightsim.org/terragear/ TerraGear API docs]
  
 
{{Terra}}
 
{{Terra}}
 
{{Building}}
 
{{Building}}
[[Category:Scenery enhancement]]
+
 
 +
[[Category:TerraGear]]
 +
 
 +
[[es:TerraGear]]
 +
[[fr:TerraGear]]

Latest revision as of 04:07, 26 September 2017

A wireframe view of detailed CORINE and OSM scenery, generated by TerraGear.

TerraGear is a collection of open-source tools and rendering libraries which can transform publically available GIS data in 3D representations (i.e. 3D models or 3D maps) of the earth for use in real time rendering projects. TerraGear can import 3D data sets such as DEM terrain grids, 2D polygon data sets such as coastlines, city outlines, lake outlines, and 2D raster data sets such as the 1 km NAOO land use/land cover data. It also has tools for generating realistic airports, runways, and lighting based on available FAA data.

TerraGear is the primary tool used to generate the scenery for the FlightGear project.

Without terragear, it is possible to change Terrain textures but not terrain shapes. If you want to change the texture for cities, you change the materials file. If you want to change the coast line, you need terragear. Check the material files in directory FGDATA/Material. Identify the material file that includes Montevideo, which is probably latin_american_cities.xml (Howto:Regional texturing and this page Procedural Texturing[1]


Introduction

For a variety of reasons you might want to build terrain yourself, rather than downloading it from the available scenery on FlightGear. For instance, if you use WED to create or modify an airport layout, you might wish to see how that modified airport would look in the Scenery before deciding you're happy with the results. And normally, to see and use the airport in the scenery, it's necessary to submit the modifications to the FlighGear scenery staff and then wait untill the next update of the scenery of that area is available via TerraSync or in the official FlightGear Scenery build. If you can build terrain yourself, you can start using it right away.

Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher resolution vector data (vmap1, Tiger) to get better roads/rivers. For all these reasons learning how to use TerraGear is a good idea.

Getting TerraGear

Using the download_and_compile.sh script (Linux distros using apt)

Get the script download_and_compile.sh if you don't already have it. Copy it into a specific directory, no need to be root.

wget https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw
mv download_and_compile.sh\?format\=raw download_and_compile.sh
chmod 755 download_and_compile.sh
./download_and_compile.sh SIMGEAR TERRAGEAR

This will build SIMGEAR (pre-requisite) and TERRAGEAR properly, installing dependencies if necessary and you will be done for the TG compilation part of the process.

Pre-compiled builds

Source

The source is hold in a Git repository at SourceForge..

git clone git://git.code.sf.net/p/flightgear/terragear/ flightgear-terragear

you have to use the stable branch called "scenery/ws2.0"! https://sourceforge.net/p/flightgear/terragear/ci/scenery/ws2.0/~/tree/

Compilation

Dependencies

  • TerraGear
    • SimGear - Not simgear-cs! (simgear-dev package)
      • SimGear can be compiled without OSG support thus eliminating many deps, like OSG. Use "-DSIMGEAR_HEADLESS=YES" for a minimal build.
    • CGAL - For high accuracy geometric calculations
    • libgdal

Building

cmake . [options]  
make install

cmake options:

-DCMAKE_PREFIX_PATH="/path/to/lib/install/prefix"

Platform specific

GUI Tool

A TerraGear GUI is available for those that would like to use TerraGear without knowing/using the command line options.

Related content

  1. ludomotico  (May 25th, 2017).  Re: Improving terrain realism .