- 1 meter by 1 meter spacing between each vertex in the heightmap (or between each pixel in the png). This makes sense as each Unreal unit maps to 1 cm. Therefore, 100 cm = 1 meter.
- 100 factor on the Z axis means that the height values get mapped to -255 m to +255 m range.
Now, I know the vertex resolution of my data is 9 arc seconds and if I take the simplified assumption that 1 arc second = 30.87 meters (true at the equator but changes as the longitude lines converge around the poles). Therefore, each vertex has a separation of (30.87*9) = 277.83 meters.
Because my original heightmap had a resolution of 1776x521 we are talking of a heightmap that would span 493+ km x 144+ km if scaled appropriately!
So, I had to break this png into a smaller chunk for this experiment and I turned to imagemagick (which I happened to have installed in my Ubuntu box) to get this done while preserving my 16 bit depth grayscale. Cropping in other tools, even GIMP, resulted in a reduction of the bit depth back to 8 bits grayscale . Anyways, the following command broke my png into smaller 512x512 chunks as much as possible.
convert Rainier.png -colorspace Gray -depth 16 -crop 512x512 +repage +adjoin Rainier_chunks%02d.png
However, I ran into another problem which is depicted in Figure 1. Turns out I didn't have a correct size for my heightmap. Documentation does do a good job explaining how to arrive to a size that is good for the engine so I settle for 505x505. Further, I used the command below to generate a 505x505 around the feature of interest: Mt. Rainier. Figure 2 depicts this heightmap.
convert Rainier.png -crop 505x505+720+0 +repage Rainier_505.png
Figure 3 shows how my rendering looks like with the new scaling factor (which looks more like the real life Mt. Rainier).
- In Project settings, under Engine - Rendering, enable 'Generate Mesh Distance Fields' checkbox. Then restart the editor.
- With the directional light selected, under Details panel, Look for Distance Field Shadows section and enable 'Use Ray Traced Distance Field Shadows' checkbox.
- Build the level.