ASCII Grid to heightmap for UE4?

I’ve found some files from Finland to make heightmap for UE4 but i am not sure how to do it or what file types to use. I heard that ASCII is best filetype for heightmap but not sure how to convert it to heightmap to use for UE4.

Terresculptor will proces ASC DEM files intp 16bit PNG Tiles in UE4 sizes.

Paul G

1 Like

I tried Terresculptor but didn’t get any data from the ASC.

I use asc data all the time with Terresculptor, it may be that the header file is not what the program is looking for.
Here is a copy of a typical header
ncols 500
nrows 500
xllcorner 446000
yllcorner 377000
cellsize 2
NODATA_value -9999

(Followed by the 500 x 500 height data matrix)

Paul G

1 Like

My copy of the finland map header:

ncols 3000
nrows 3000
xllcorner 434000.000000000000
yllcorner 7152000.000000000000
cellsize 2.000000000000
NODATA_value -9999.000

I am so noob with heightmaps and ascii grids so could you make a fast tutorial if i can make this work then? :slight_smile:
when i import that to terresculptor i get this:

And i realised that my ascii looks a bit different than blank heightmap that i exported from terresculptor. (Left side is my finland heightmap and right is the blank heightmap from terresculptor.)

You don’t need to export an Asc from terresculptor,
I see your asc data is 2m resolution and there are 3000 rows/ columns
This will give you a terrain size of 6KM squ

In terresculptor make UDK landscape sizes option
Start new project with landscape size of 6097 x 6097 (UDK)

Bring your ASC data into terresculptor
Resample to 6097 x 6097 (these are UE4 landscape sizes)
Export as 16 bit PNG Greyscale
Use the PNG directly in UE4 Landscape editor

Paul G

1 Like

For anyone experiencing exact same issue where imported ASCII is showing “blank”, it is caused by some ASCII Heightmaps have DOTS instead COMMA. TerreSculptor reads floating point values by commas, so we need to convert those manually.

  1. Open your ASCII Heightmap in Notepad
  2. Press CTRL + H (Edit → Replace)
  3. Replace all . to , (dots to commas)
  4. Save file
  5. TerreSculptor should now import modified ASCII Heightmap with correct values.