HeightmapFromGridFloat

Author: Jeff Craighead (jeffcraighead)

Description
Uses a USGS GridFloat topo file as the heightmap for the terrain. The GridFloat files for at least the US, maybe elsewhere are available on the USGS seamless map server. Updated Link: The National Map Viewer GridFloat files are just a sequence of 4-byte floating point numbers. There is a header file that must accompany the file with the extension .hdr. In the header file there should be at least 2 fields nrows and ncols.

Usage
You must place the script in a folder named Editor in your project's Assets folder for it to work properly.

To turn a texture into a heightmap, click on the .flt in your project (make sure the .hdr is in the same folder), then select the Heightmap From GridFloat item in the Terrain menu. This irretrievably overwrites the existing heightmap (but not any terrain textures etc.), so you'll be asked to confirm this action. The script is set for 1/3 arc-second scans. Those have a cell size of 10m. If you use a different resolution scan you will need to adjust the cellSize value in the script in order for the terrain size to be in meters.

Sample
This terrain was generated using the HeightmapFromGridFloat script.