JohnLeber / HGT-To-Normal

CUDA code to create normal maps from 1 arc-second resolution HGT/SRTM1 files using the GPU.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HGT-To-Normal

Sample CUDA code to create a normal map from a high resolution HGT file.

The normal map can be used to help create relief maps (bottom image). The code expects a high resolution HGT file ( 1 arc-second ). These files are 3601 by 3601 and contain the height in meters stored as a 16 bit value. The output file is a 3600 by 3600 bitmap file containing the normals in tangent space. For more information about HGT files see my other project.

The code should be reasonably easy to adapt to height maps and depth maps of different sizes.

For a CPU based approach to creating normal maps from HGT files, see my other HGT Relief Map project.

The images below show a normal map and relief map (top and bottom images respectively) of the S44E170.hgt file (West Coast/Southern Alps of New Zealand).

alt text alt text

More samples, in this case Tongariro National Park S40E175.hgt

alt text alt text

About

CUDA code to create normal maps from 1 arc-second resolution HGT/SRTM1 files using the GPU.

License:Creative Commons Zero v1.0 Universal


Languages

Language:Cuda 100.0%