• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Use water elevation from DEM

Messages
73
Hi,

let's say i have a 1m mesh for a large area and the area includes a lot of rivers. As the mesh also covers the water surface, the original water polys have a different altitude, so the rivers are most of the time elevated. I further have a water shp file from OSM but it looks too complex to apply altitudes to all the water segments of the shp file since the area is very large (200sqkm). Is it possible to apply the shp file at any height and then flatten the water area (all with sbuilderx) and then apply the mesh to get the right water altitude? The scenery folder structure would look like this:

AREA_WATER
AREA_FLATTEN
AREA_MESH

P.S. i am aware that there is some legacy setting from FS9 to apply the water altitude to -9999 to let it follow the terrain elevation, but i don't want to use this.

Best Regards,
Thomas
 
Last edited:
Messages
7,450
Country
us-illinois
Hello Thomas:

Is this for use with a custom photo-real aerial imagery land class type of scenery created via FSX / P3D SDK Resample ? :scratchch

If so, you can use a Water Mask and/or Blend Mask to define water bodies using either raster-only methods, or a combination of raster-to-vector methods, and even vector-to-raster methods with graphics and GIS applications to achieve a final resulting water mask that matches the size and shape of any desired water areas otherwise visible within your source photo-real aerial imagery.

The resulting custom photo-real aerial imagery land class type of scenery created via FSX / P3D SDK Resample would be draped by the FS rendering engine onto any underlying terrain mesh and/or CVX vector 'flatten' areas active in the scenery area of interest.

The result, therefore, would be both mesh-clinging and FSX / P3D "non-legacy" SDK compliant. :pushpin:


IIUC what you are trying to achieve, the following is a general conceptual over-view of a possible work-flow:

'Append' / import to SBuilderX the OSM water body data as ESRI Shape (aka "SHP") files (or instead as GIS application converted BLN files, which IIRC, would result in SBuilderX ignoring the Altitude portion of that data) yielding poly-lines / polygons with vertices that can be manually aligned where needed to match the water bodies of the photo-real aerial imagery background map from your choice of tile server within the SBuilderX work-space.

The resulting vector object(s) could be exported as a CVX vector BGL.

That CVX vector BGL could be de-compiled in Patrick Germain's CVXExtractor with output as ESRI Shape (aka "SHP") files.

The resulting Hydro ESRI Shape (aka "SHP") file(s) could be converted from vector-to-raster via special features in a GIS application, then output as GeoTIFF for use in creation of a Water and/or Blend Mask along with your other source photo-real aerial imagery.


However, since OSM vector data may vary in accuracy relative to position and shape in the real world, alternatively, you may wish to instead use the new tile server DLLs Google_api3_Satellite for the photo-real aerial imagery and Google_api3_Water ...in SBuilderX for both the color satellite imagery and matching gray-scale raster water body imagery (derived from the same color satellite imagery).


Each of those imagery types can be output by SBuilderX to BMP files with an accompanying 'world' Geo-referencing file, as SBuilderX creates a 1-piece BMP and a matching TXT Geo-referencing 'world' file when one performs these steps:

1.) SBuilderX Menu > File > Add Map > From Background ...

2.) Select desired aerial imagery area, then download all tiles as directed in "Add Map From Background" dialog

3.) Select desired aerial imagery area from resulting aerial imagery Background displayed in SBuilderX work-space

4.) SBuilderX Menu > File > BGL Compile ... < DO NOT 'click' [Compile] button >

5.) SBuilderX pre-assembles a 1-piece aerial imagery BMP and a matching TXT Geo-referencing 'world' file in:

[SBuilderX install path]\Tools\Work\ sub-folder

...without having actually compiled a BGL. ;)


The resulting 'water' BMP and its matching TXT Geo-referencing 'world' file can be processed in a graphics application to assign the desired Gray-scale value (ex: RGB 128,128,128 or less) that may be used in the Alpha Channel for a transparent water (Hydro) attribute that allows underlying color photo-real aerial imagery to show through.

Alternatively, a 'absolute Black' color (RGB 0,0,0) may be used in the Alpha Channel for a non-transparent water (Hydro) attribute to prevent the water portion of underlying color photo-real aerial imagery from showing through, thus replacing it with FS default water when the scenery is displayed at run time.

If necessary, the resulting 'water' BMP and its matching TXT Geo-referencing 'world' file can be imported into a GIS application


BTW: Also, if necessary, the resulting BMP and its matching TXT Geo-referencing 'world' file can be imported into ScenProc via "ImportGDAL":

https://www.scenerydesign.org/2014/01/import-resample-configuration/

...and then exported as a GeoTIFF via "ExportImage". :pushpin:


And, if necessary, the "water" GeoTIFF can subsequently be converted from raster-to-vector via special features in a GIS application after any desired additional processing.

[EDITED]

PS: The FSX / P3D default "original water polys" (which can also have their own local Altitude and/or Slope attribute values relative to local terrain mesh and/or CVX vector flattens) ...may also need to be excluded via "Exclude Specific" types of CVX vector exclusions which target the GUIDs for the default water bodies you wish to eliminate from display in FS at run time, thus allowing your custom 1-Meter terrain mesh to provide the (only) local surface onto which the water body pixels in the aerial imagery are to be draped.

[END_EDIT]


I hope this might prove helpful with exploring your options. :)

GaryGB
 
Last edited:
Messages
73
Hi Gary,

many thanks for the detailed information. I think i will try sbuilderx with it's new tile server dlls first. Didn't know they exist. :D Btw. where can i find the google_api3_water dll? I only found the google_api3_satellite dll.

Edit: i found it already.

Thanks,
Thomas
 
Last edited:
Messages
7,450
Country
us-illinois
After installing the (1 and only 1) "GoogleServer_api3.dll " to:

[SBuilderX install path]\Tiles\ sub-folder root location, one should see (4) new "Google_api3_*" choices available to select via:


SBuilderX Menu > Edit > Preferences > {Background Tab} > Available Tile Servers


After tile server selection, 'check' "Use {Tile Server Name} ?" checkbox ...to 'apply' named tile server choice

Next, click [INI File] button to set central coordinates / BGL output path for your project location < file opens in Windows NotePad >

[Main]
LonIniCenter=-9.136076 <-- Your own project's central Longitude goes here
LatIniCenter= 38.7813203 <-- Your own project's central Latitude goes here
DecimalDegrees=True
MeasuringMeters=True
BGLFolder=C:\MyPrograms\SBuilderX314\Scenery <-- Your own project's compiled BGL 'active' \Scenery folder path goes here
OriginalTerrainCFG=False


1.) When configuration of your SBuilderX project is completed via editing "SBuilder.ini" in Windows NotePad:

.....a.) In Windows NotePad Menu > File > Save As... > "Save as type" field, set to "All Files (*.*)" (do not click OK yet)

.....b.) In NotePad Menu > File > Save As... > "Save In" field, browse to [SBuilderX install path] folder; double-click to select it


2.) Back in NotePad Menu > File > Save As... browse dialog, click "OK"

.....a.) When prompted to over-write Sbuilder.ini, click "YES" to save your edits to that file.


3.) Exit and re-start SBuilderX (...or the above changes will not yet take effect) :alert:


FYI: W
hen "GoogleServer_api3.dll " tile down-loader runs, it writes tiles for 'layer' types into their own named sub-folder chains:

[SBuilderX install path]\Tiles\Google_api3_NoRoads\

[SBuilderX install path]\Tiles\Google_api3_Satellite\

[SBuilderX install path]\Tiles\Google_api3_BasicMap\

[SBuilderX install path]\Tiles\Google_api3_Water\


Hope this helps ! :)

GaryGB
 
Top