Sign in to follow this  
SPowell42

How to get started - terrain mesh?

Recommended Posts

Hi, I was flying over the Outer Banks in Prepar3d last night, and notice that even though the "sand" for Jockey's ridge is there...the terrain itself is (very) flat, instead of having the 90+ foot high sand dunes. I've never really done scenery design for either FSX or Prepar3d before. Can anyone point me towards some good tutorials?

 

To get started I assume I need to learn how to edit the terrain mesh, but later on I'd want to add new objects to the scenery (like the Hatteras lighthouse, etc.)

 

Appreciate the help!

Scott

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Have you thought of buying a comprehensive mesh package? Either FS Global 2010 for the entire globe or their Ultimate line for just the continent you need. Depending on how you value your time, it may be a better option...

Share this post


Link to post
Share on other sites

Yes, but I'm hoping to branch out and build out the Outer Banks with custom scenery - after adding a better mesh so Jockeye's Ridge shows up, I'd like to add the lighthouses, and then maybe start on customizing the airports. Just looking for some guides on how to get started.

 

Thanks!

Scott

Share this post


Link to post
Share on other sites

If you're just getting started on scenery in general, have a look at Luis Feliz-Tirado FSX tutorials in the library.

http://library.avsim.net/search.php?SearchTerm=Luis+Feliz-Tirado&CatID=fsxsd&Go=Search

 

Also look at the FSX SDK docs on terrain and scenery, BGL compiler etc. If you haven't installed the SDK yet make sure to follow the install instructions in the fsdeveloper wiki.

 

Sign up at fsdeveloper.com and look the tutorials and forums.

 

For USA mesh, there is good data from the National Map Viewer. I just gave Jockeys Ridge a go and it looks pretty good. The steps I followed are something like this:

  1. Download the 1/9 arc second DEM (NED for USA) data for the selected area. You'll likely get an IMG file with a bunch of metadata files but there can be other formats
  2. Reproject to latlong, WGS84 reference (EPSG:4326)
  3. Save as a geotiff

I use QGIS and other tools from http://trac.osgeo.org/osgeo4w/ for reprojecting and converting to geotiff.

 

Make a .inf file like this:

 

[source]
Type=GeoTIFF
Layer=Elevation
SourceDir="."
SourceFile="jockeys_ridge.tif"
 
[Destination]
DestDir="."
DestBaseFileName="jockeys_ridge"
LOD=Auto
DestFileType        = BGL

 

 

Then drop the inf file on resample.exe. You'll get jockeys_ridge.bgl. Put it in Addon Scenery\scenery and look at it in the sim.

 

This is how it looks after following the above process:

 

jockeys_ridge_zpswmm5vyex.png

 

 

I haven't yet figured out a good way to "edit" mesh data if it looks bad or has anomalies, but for USA and some other countries the available data is very good and doesn't need editing.

Share this post


Link to post
Share on other sites

Barry - this is very helpful, thank you very much! I've been having a lot of trouble trying to understand the scenery systems - most of the tutorials say "do x then y" but don't explain why. But I just found the .chm file in the SDK that seems to contain the info I need.

 

Again I appreciate the help. At some point I'm hoping to redo the entire Outer Banks - elevation, maybe photoreal, adding custom airports, etc. Looking forward to learning!

 

Thanks!

Scott

 

Share this post


Link to post
Share on other sites

Hi Barry, could I trouble you for a bit more help? I'm trying to follow along with what you've suggested, so far:

 

1. I got a .IMG file (and all the other related files) for Jockeys Ridge from the national map view NED 1/9 data

2. I'm able to open it up in QGIS

3. I found the option to "warp" it into the WGS84 reference

 

But I just can't quite figure out how to save it into a GeoTiff file. I see both "TIF" and "TIFF" listed under "save as image", but neither one seems to give a  GeoTIff...or at least when I try to execute the .inf file on resample.exe, it complains with warnings like "Pixel Width and Height must be greater than zero". Also the image looks "odd" after the WGS84 warp...maybe I hosed that up?

 

Thanks!

Scott

Share this post


Link to post
Share on other sites

Hi Scott,

 

It should be possible in QGIS to right-click on the original DEM raster file and choose Save As... then change the CRS to EPSG:4326 (WGS84) and browse for a file and give a name, something like jockeys_ridge_wgs84.tif

 

I use the GeoTiffToInf tool here to generate the basic inf file:

http://fsdeveloper.com/forum/resources/geotiff-to-inf.119/

 

Then change Layer to Elevation (from Imagery).

 

I made my inf file look like the following based on this recent discussion (dimensions below are generated from the DEM file I downloaded):

http://fsdeveloper.com/forum/threads/discussion-thread-about-the-wiki-article-create-mesh-using-global-mapper.433307/

 

 

[source]
Type=TIFF
Layer=Elevation
SourceDir="."
SourceFile="jockeys_ridge_wgs84.tif"
PixelIsPoint=0
ulxMap=-75.7501851851852
ulyMap=36.0001851851851
xDim=3.08641975308614E-05
yDim=3.08641975308614E-05
Variation=Day
[Destination]
DestDir="."
DestBaseFileName="jockeys_ridge_wgs84"
CompressionQuality = 97
LOD = 4,11
FractionBits = 2
 
 
 
Then drop the inf file onto resample.exe to get the BGL. Preview the result in tmfviewer to make sure it looks right.
 
If you're still having trouble I'll make a tutorial video.

Share this post


Link to post
Share on other sites

I'll give this a try later today - thanks again for the help - I really appreciate it!

Scott

Share this post


Link to post
Share on other sites

Barry - this worked out perfectly. Took me a bit to get everything going properly - but I'm able to generate the BGL, and when flying in FSX can now see that the sand dunes are there. Thanks a million for all of your help!

 

Scott

Share this post


Link to post
Share on other sites

Interesting stuff, but I'm unlikely to open my wallet to the tune of $500 just to play with some terrain :(

Do they have a cheaper/free/student-academic version at all? Or could this be accomplished in something like QGIS rather than GlobalMapper? Cheers K

Share this post


Link to post
Share on other sites

I would start with QGIS, so far I've been happy with it, but I'm still a beginner at using GIS tools. QGIS uses gdal for converting DEM raster data and it's handled most formats I've come across.

Share this post


Link to post
Share on other sites

Hi Barry, one question if I might - have you had to deal with "clipping" terrain mesh? I.e. the 9 arcsecond NED data comes in pretty big chucks. One of the local airports I fly out of (KDLZ) has a small rock quarry just off the end of the runway. I'd like to pull down photoreal imagery for it, and combine it with mesh data so that it sinks down appropriately....but in QGIS I haven't been able to figure out how to do that. And I don't want to muck around with mesh data for 20 miles around the quarry (although maybe I should just give that a try...)

 

Have you had to "clip" downloaded NED data to just a small area?

 

p.s. just realized I'm going to hit a similar situation when I get good enough to move on to the real scenery I want to do - the Outer Banks. There's lots of the NED data that's just water, I'd love to be able to remove that.

 

Thanks!

Scott

Share this post


Link to post
Share on other sites

Hi Scott,

 

I'm not at my main computer now but some quick suggestions:

  • Make sure via the QGIS plugins menu you have OpenLayers and GdalTools plugins (you should have included gdal in your osgeo4w installer)
  • Add your DEM raster
  • In OpenLayers menu (might be under Web or Plugins depending on QGIS version), choose OpenStreetMap (OSM)
  • In layers panel drag OSM layer so its below your DEM layer
  • Right-click DEM layer and in Properties set transparency to around 50%
  • Now you can pan/zoom to find the airport/quarry
  • In Raster menu, choose Extraction and then Clipper
  • Browse to set your output file and then check Clipping Mode to Extent and drag a box around the area you want to clip
  • Click OK and it will clip the original DEM file

clip_dem_zpstev3sgph.png

 

If you want a non-rectangular clip you can add a vector shapefile layer and use that as a mask layer in the Clipper dialog instead of dragging a rectagular extent.

 

Make sure to also check the the new file's properties to ensure it's using CRS  EPSG:4326

 

For removing sea-level water, I wouldn't worry about it as it'll probably get compressed (lot's of zero values), but you could try using NullValue = 0 in the [source] section.


By the way, there's a really nice online course using QGIS here: https://foss4geo.wordpress.com/. On each course module page there are links to PDF tutorials and also YouTube videos.

 

The course material files are here: https://github.com/FOSS4GAcademy. You can use the Download ZIP button on each course module to download a zip file of the current materials.

 

I'm still working on GST101.  :lol:

Share this post


Link to post
Share on other sites

Barry, can't say enough how much I appreciate the help. Thanks for the links to the training, I'll try to get through that before asking more dumb questions ;)

 

Thanks for teaching me how to fish!

Scott

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this