Understanding Terrain Data Overlay in Prepar3D

Overlaying global scenery with real-world terrain data in Prepar3D creates a dramatically more immersive flight simulation environment. Rather than relying solely on default elevation models that often flatten or generalize terrain features, this technique replaces those approximations with high-resolution elevation data sourced from actual satellite measurements and aerial surveys. The result is a simulation world where ridges, valleys, coastlines, and mountain passes match their real-world counterparts with remarkable precision.

The default Prepar3D scenery system uses a combination of Vector, Landclass, and elevation data to generate the visual landscape. While this approach covers the entire globe, it often lacks detail in remote regions and can produce noticeable inaccuracies in terrain elevation. By integrating real-world terrain data, you correct these elevation errors and create terrain that responds realistically to aircraft performance, weather effects, and visual cues.

Before proceeding, it is important to understand the difference between terrain mesh and scenery texture. Terrain mesh defines the shape of the ground, while textures provide visual surface appearance. Overlaying terrain data primarily addresses mesh accuracy, though many workflows also incorporate orthophoto imagery for enhanced surface details. This guide focuses on mesh elevation correction, which forms the foundation for all other scenery improvements.

Core Concepts and Technical Background

How Prepar3D Renders Terrain

Prepar3D uses a quad-tree terrain rendering engine that loads and displays terrain data in tiles based on your aircraft position and altitude. Each tile contains elevation data stored as grid points, which the engine interpolates to create continuous surface geometry. The default terrain data ships with the simulator and typically uses 1-arc-second resolution in developed regions and coarser 3-arc-second resolution elsewhere.

Real-world terrain data sources such as the Shuttle Radar Topography Mission (SRTM) and the Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER) provide global elevation data at resolutions ranging from 1 arc-second (approximately 30 meters per pixel) to 3 arc-seconds (90 meters per pixel). More detailed datasets from national mapping agencies and commercial providers can achieve sub-meter resolution for specific areas.

When you overlay terrain data, you are essentially replacing the default elevation grid points with higher-resolution values derived from these external sources. The simulator then re-renders the terrain surface using this improved data, resulting in more accurate hills, valleys, and terrain features.

Understanding Terrain Resolution and Quality

Terrain resolution is measured in arc-seconds or meters per pixel. Higher resolution data captures finer terrain details but requires more storage and processing power. For Prepar3D, the optimal balance depends on your hardware and the regions you fly. Key resolution tiers include:

  • 1 arc-second (30m): Suitable for general global coverage and regional flying. SRTM 1-arc-second data provides a good balance of quality and performance.
  • 3 arc-second (90m): The default level for most Prepar3D installations. Acceptable for high-altitude flying but shows blocky terrain features at low altitudes.
  • 0.5 arc-second (15m) and higher: Reserved for airports, cities, and highly detailed scenery areas. Requires significant storage and may impact frame rates.

For most users, targeting 1 arc-second data across your primary flying regions provides a dramatic improvement over defaults while maintaining acceptable performance. You can use higher resolution data for specific airports or approach paths where terrain accuracy matters most.

Tools and Software Requirements

Successfully overlaying terrain data requires a combination of tools for data download, conversion, and integration. The following software is necessary or highly recommended for the workflow:

  • Prepar3D v4 or v5: The simulator must be installed and functioning correctly before any scenery modifications.
  • Global Scenery or Base Scenery files: These provide the foundation onto which new terrain data is overlaid. Ensure your base scenery is properly installed and configured.
  • Terrain data source: SRTM data from the USGS EarthExplorer or USGS EarthExplorer portal provides free global elevation data. For enhanced detail, consider commercial providers or regional datasets from national mapping agencies.
  • Resample.exe: This command-line tool included with Prepar3D converts elevation data into the simulator's proprietary .BGL format that the terrain engine reads.
  • Terrain editing tools: Airport Design Editor (ADE) can overlay and adjust terrain data. For more advanced editing, GDAL (Geospatial Data Abstraction Library) provides command-line utilities for geospatial data processing.
  • Optional GIS software: QGIS offers advanced terrain analysis, contour generation, and data merging capabilities for complex projects.

Step-by-Step Procedure for Overlaying Terrain Data

1. Backup Your Existing Scenery Files

Before modifying any Prepar3D scenery files, create a complete backup of your installation directory. The key folders to protect include the main Prepar3D root folder, the scenery.cfg file located in the ProgramData or user AppData folders, and any custom scenery add-ons you have installed. A backup allows you to restore the original state quickly if something goes wrong during the modification process.

To back up efficiently, copy the entire Prepar3D directory to an external drive or a separate location on your main drive. Alternatively, use a backup tool that supports incremental backups to save only the changed files. At minimum, preserve the Scenery folder and the Prepar3D.cfg configuration file.

2. Obtain and Prepare Real-World Terrain Data

Begin by identifying the geographic area you want to overlay. Open Prepar3D and note the coordinates or use a flight planning tool to determine the latitude and longitude boundaries of your target region. For global coverage, you may need to download multiple tiles.

Download elevation data from reliable sources:

  • SRTM data: Available in 1-arc-second resolution for most of the globe. Download GeoTIFF files from the USGS EarthExplorer after creating a free account.
  • ASTER GDEM: Global coverage at 1-arc-second resolution, though it may contain more artifacts than SRTM.
  • Regional datasets: For specific countries, national mapping agencies often provide higher-resolution data, such as 5-meter DEMs from the USGS 3DEP program.

Once downloaded, convert the raw elevation data into a format that Resample.exe can process. The standard workflow involves converting GeoTIFF files to 16-bit integer BIL files using GDAL or QGIS. The conversion command using GDAL looks like this:

gdal_translate -of EHdr -ot Int16 -scale input.tif output.bil

The -scale parameter ensures the elevation values fit within a 16-bit signed integer range. This step is critical because Resample.exe expects elevation data in meters multiplied by 10, stored as 16-bit integers.

If your source data uses different vertical units or datums, reproject it to WGS84 with meters as the vertical unit. This ensures compatibility with Prepar3D's coordinate system.

3. Create an INF File for Resample.exe

The INF file tells Resample.exe how to process your elevation data and where to output the BGL file. Create a text file with the following structure:

[Source]
Type = Elevation
SourceDir = "C:\path\to\your\data"
SourceFile = "your_data.bil"
Layer = Elevation
Scale = 1
NullValue = -32768

[Destination]
DestDir = "C:\path\to\output"
DestBaseFileName = "terrain_overlay"
DestFileType = BGL
LOD = Auto

Adjust the SourceDir, SourceFile, DestDir, and DestBaseFileName to match your actual file locations and naming conventions. The LOD (Level of Detail) parameter controls the mesh density. Setting it to Auto allows Prepar3D to determine the appropriate level based on your simulator settings, but you can specify values from 1 (highest detail) to 10 (lowest) for custom control.

4. Run Resample.exe to Generate Terrain BGL

Open a command prompt with administrator privileges and navigate to your Prepar3D installation folder where Resample.exe is located. Typically, this is in the root Prepar3D directory. Execute the following command:

Resample.exe your_inf_file.inf

Resample.exe reads the INF file, processes the elevation data, and generates one or more BGL files in the output directory specified. The process may take several minutes depending on the size of your data and the resolution. Monitor the command prompt for any error messages indicating missing files or data format issues.

If Resample.exe reports an error, verify that your BIL file uses the correct format (16-bit signed integer, little-endian byte order) and that the geographic extents match what is specified in the INF file. Common errors include mismatched coordinate systems or corrupted source files.

5. Integrate the Terrain BGL into Prepar3D

Place the generated BGL file into the appropriate scenery folder. For global overlays, the best practice is to create a dedicated folder outside the main Prepar3D directory structure. Create a folder such as C:\Users\yourname\Documents\Prepar3D v5 Add-ons\Terrain Overlay\scenery and copy your BGL file there.

Launch Prepar3D and navigate to the Scenery Library via the Options menu. Click Add Area and browse to the folder containing your BGL file. Set the layer priority appropriately. Terrain overlay BGL files should generally be placed above the default base scenery but below add-on airports and detailed scenery. A layer priority between 2 and 10 works well for most configurations, but you may need to adjust based on your other installed scenery.

Click OK to confirm the addition. The scenery library will now include your custom terrain overlay material.

6. Fine-tune the Overlay

After integrating the terrain BGL, test the results by flying over the modified area. Pay attention to terrain features that should match known landmarks. Common issues include:

  • Sharp elevation changes or spikes: These often result from data artifacts or incorrect null value handling. Re-examine your source data and reprocess with appropriate filtering.
  • Mismatched terrain along tile boundaries: Ensure your source data covers the entire area without gaps. Use GDAL's gdal_merge.py to combine multiple tiles and create seamless data.
  • Texture elevation mismatch: If the terrain shape shows correctly but textures do not align, your texture files may need separate updating. Terrain mesh and texture overlays are independent in Prepar3D's rendering pipeline.

For airports and populated areas, use high-resolution source data to capture runway alignments, buildings, and other structures. Many airports have specific terrain requirements, and using 5-meter or better resolution data is recommended for these locations.

If you notice issues, adjust the INF file parameters or source data and repeat the Resample.exe process. Iterative refinement is normal and expected for complex scenery projects.

Advanced Techniques and Optimization

Using Multiple Data Sources

Combining different elevation datasets can yield better results than relying on a single source. For example, use 1-arc-second SRTM data for general coverage, then overlay a high-resolution lidar DEM for a specific valley or mountain range. To merge multiple sources, use GDAL's gdalbuildvrt command to create a virtual raster that references all your source files, then convert the VRT to a single BIL file for Resample.exe.

The merge command looks like this:

gdalbuildvrt merged.vrt input1.tif input2.tif input3.tif
gdal_translate -of EHdr -ot Int16 -scale merged.vrt output.bil

This approach allows you to combine data from different sources while ensuring seamless transitions between regions.

Performance Optimization

High-resolution terrain data consumes system resources, particularly VRAM and CPU time for terrain rendering. To maintain smooth performance while maximizing visual quality, consider these optimization strategies:

  • Use LOD Auto: Let Prepar3D manage level of detail based on distance from the camera. This reduces processing for distant terrain while preserving close-up detail.
  • Limit high-resolution zones: Apply detailed mesh only to areas you fly frequently. Use coarser data for background regions where you rarely fly low.
  • Optimize source data: Remove null values and reduce noise through filtering before conversion. Clean data produces cleaner BGL files and improves runtime performance.
  • Monitor frame rates: After adding the overlay, fly over varied terrain and check your FPS. If you experience significant drops, consider reducing the data resolution or using lower LOD settings.

Dealing with Water Bodies and Coastlines

Terrain overlays can affect water bodies if your elevation data incorrectly shows water as land. To preserve accurate coastlines, filter your elevation data to mask water bodies before conversion. QGIS provides tools to clip elevation rasters to land areas using coastline vector data. Alternatively, use a land mask to set water areas to a null value, which Prepar3D interprets as no data and uses default water rendering.

Testing and Validation

Thorough testing ensures your terrain overlay performs correctly across different flight conditions. Begin with a visual check from various altitudes and aircraft types. A large aircraft at 30,000 feet provides a broad perspective on terrain accuracy, while a small aircraft at 2,000 feet reveals fine details. Key validation steps include:

  • Certify that known mountain peaks, valleys, and ridges match real-world maps.
  • Verify airport terrain aligns with runways and taxiways. Incorrect elevation data can cause aircraft to appear to float above the ground or sink into it.
  • Check for terrain abrupt changes at tile boundaries, which indicate data discontinuities.
  • Test weather effects such as cloud shadows and precipitation interactions with the new terrain to ensure they behave correctly.

If you discover errors, revisit your source data and processing steps. Most issues stem from data artifacts, incorrect coordinate handling, or improper null value masking. Refer to the DirectX 11 resource documentation for understanding how Prepar3D's rendering engine interacts with terrain buffers, which can help diagnose rendering anomalies.

For persistent problems, consult community forums such as the Prepar3D Forum or dedicated scenery development communities. Experienced users often share pre-processed terrain data and INF templates that can accelerate your project.

Maintenance and Updates

Terrain data accuracy depends on the currency of your source data. As new elevation datasets become available from space missions, aerial surveys, and government mapping programs, update your overlays to maintain realism. Set a schedule to check for updates every 6-12 months, especially for regions undergoing construction or natural landscape changes.

When updating, replace only the BGL files for affected areas rather than rebuilding the entire overlay. Keep your original source data organized in a dedicated folder structure so you can quickly identify and replace outdated tiles.

Final Recommendations

Overlaying global scenery with real-world terrain data transforms Prepar3D from a good simulation into an exceptionally accurate one. Start with a small, familiar area to master the workflow before expanding to larger regions. Invest time in learning GDAL and QGIS, as these tools provide the flexibility needed for complex projects. Always maintain backups and keep meticulous records of your INF files and source data paths.

With proper execution, the technique yields terrain that matches real-world geography closely, enhancing every flight from a cross-country route to a low-level scenic tour. The effort required to generate accurate terrain is rewarded with a simulation environment that responds authentically to your aircraft and provides a deeper sense of connection to the landscapes you fly over.