23.12.2007, 21:55
Lowfighter
After I discovered that height did not increase linearly with each change in value in RGB in IL2, I produced a map with a set of height ramps, as shown in the previous pictures, to see where the height changed abruptly. Got RGB values from flying an aircraft along the ramp I made and comparing its position with the map, got the height from the altimeter instruments. I then ran some basic maths on the measurements and came up with a correction table in a spread sheet.
Next stage was to import SRTM data into MicroDEM, firstly remove all voids and pits, then scale the data so 1 pixel =200m. Next I changed the height data colours to 255 greyscale, applied my maths to it to correct the values on the SRTM map then save it as a .tga file. It works reasonably well, but because of the way IL2 uses 225 discrete values for height, maps can never be accurate, so there will always be an error factor.
Here are some more examples as I have refined the data a bit more. Same SRTM data I used before in this thread, links posted above.
SRTM data, voids removed, greyscale, no correction:
The same SRTM data, voids removed, greyscale, version 1 correction:
The same SRTM data, voids removed, greyscale, version 2 correction:
An example of the correction data
MIN Height, MAX Height, RGB Value (greyscale)
0 3 0
4 7 1
8 10 2
11 14 3
15 18 4
19 22 5
23 25 6
.......
3640 3704 249
3705 3769 250
3770 3834 251
3835 3899 252
3900 3964 253
3965 4029 254
4030 5000 255
As you can see, the height changes very quickly at the higher height values.
lowfighter Wrote:This is nice work Watcher, how are you doing the correction in practice? If I understand there must be a correspondence to fulfill like
SRTM RGB GAME RGB
0 0
... ...
50 45
etc
After I discovered that height did not increase linearly with each change in value in RGB in IL2, I produced a map with a set of height ramps, as shown in the previous pictures, to see where the height changed abruptly. Got RGB values from flying an aircraft along the ramp I made and comparing its position with the map, got the height from the altimeter instruments. I then ran some basic maths on the measurements and came up with a correction table in a spread sheet.
Next stage was to import SRTM data into MicroDEM, firstly remove all voids and pits, then scale the data so 1 pixel =200m. Next I changed the height data colours to 255 greyscale, applied my maths to it to correct the values on the SRTM map then save it as a .tga file. It works reasonably well, but because of the way IL2 uses 225 discrete values for height, maps can never be accurate, so there will always be an error factor.
Here are some more examples as I have refined the data a bit more. Same SRTM data I used before in this thread, links posted above.
SRTM data, voids removed, greyscale, no correction:
The same SRTM data, voids removed, greyscale, version 1 correction:
The same SRTM data, voids removed, greyscale, version 2 correction:
An example of the correction data
MIN Height, MAX Height, RGB Value (greyscale)
0 3 0
4 7 1
8 10 2
11 14 3
15 18 4
19 22 5
23 25 6
.......
3640 3704 249
3705 3769 250
3770 3834 251
3835 3899 252
3900 3964 253
3965 4029 254
4030 5000 255
As you can see, the height changes very quickly at the higher height values.