A map texture discussion thread
#16

IL2 definitely does not have a linear height change as the RGB values increase. I have used Gimp with a 256x256 map (map empty2a).

The following pictures show what I have found.

[Image: slopes1.jpg]

from the front to the back:

Slope 1, 2 = Linear greyscale spread from 0 - 255. with dither and adaptive supersampling
Slope 3, 4 = Linear greyscale spread from 0 - 255. with dither no adaptive supersampling
Slope 5 = Linear greyscale spread from 0 - 255. no dither no adaptive supersampling
Slope 6 + 7= Corrected RGB Greyscale curve to get a linear height change

[Image: slopes2.jpg]

This shows the other end of the slopes, description is the same. Note that the corrected RGB Greyscale has a lip at the far side, this is something still to be sorted on my RGB correction curve.

What these pictures prove is that IL2 has sudden changes in height as the RGB increases. (see my above posts) This makes it difficult to get DEM and SRTM data from real world maps into IL2 if the height is above 600m since the scale starts to change dramatically. I have managed to correct basic SRTM data using my correction curves and Gimp, but at higher altitudes there is a difficulty in getting smooth slopes without steps.

More experimenting required!
Reply
#17

This is nice work Watcher, how are you doing the correction in practice? If I understand there must be a correspondence to fullfill like
SRTM RGB GAME RGB
0 0
... ...
50 45

etc
Reply
#18

Carried out some SRTM data manipulation. This is still very rough and involves RGB correction and SRTM correction curves. My RGB correction curves still need some wok to be done to get more accuracy. Maps are based on the Scottish highlands, SRTM data link:

ftp://e0srp01u.ecs.nasa.gov/srtm/versio ... 3/Eurasia/

File: N56W005.hgt

This has been suitably scaled so that 1 pixel = 200m. The lowest level terrain is still not mapped properly, need to tweak my correction curves to sort this out. If you look very carefully at the "before" picture you can see the very small undulations before they are corrected.

Before:
[Image: NEVISUNCORRECTEDROUGHscreencapture.jpg]

After:
[Image: NEVISCORRECTEDROUGHscreencapture.jpg]

Software:
MicroDEM
Gimp
Reply
#19

Lowfighter

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:
[Image: UnrevisedSRTMHighlandsV1.jpg] [Image: UnrevisedSRTMHighlandsV1screencaptu.jpg]

The same SRTM data, voids removed, greyscale, version 1 correction:
[Image: RevisedSRTMHighlandsV1.jpg] [Image: RevisedSRTMHighlandsV1screencapture.jpg]

The same SRTM data, voids removed, greyscale, version 2 correction:
[Image: RevisedSRTMHighlandsV2.jpg] [Image: RevisedSRTMHighlandsV2screencapture.jpg]

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.
Reply
#20

Then Watcher, when your done with the scale maybe you can share it here?
For getting precise values of height in game you can also go in FMB map builder mode, in 3D the height is indicated at bottom of the screen (among other things).
Reply
#21

Lowfighter,

I don't have access to a file server. Could you PM me with your email and I'll send a copy to you to upload. The file is designed to be used with MicroDem. Once the file is uploaded I can write a brief tutorial on how to use it. It is still only rough as I tweak the curves.

Never knew about the height being shown on the FMB, dohhhhhhh!!!!!!!

I also had an idea about textures. Since they are also RGB based and on a seperate map file you could do the follwing in Micro DEM to automatically place them:

water0= RGB=28,assign SRTM heights -1m - 0m to this RGB value
water1= RGB=29,assign SRTM heights 0.1m - 0.5m to this RGB value
water2= RGB=30assign SRTM heights 0.6m - 1m to this RGB value
water3= RGB=31,assign SRTM heights 1.1m - 2m to this RGB value

lowland0=RGB=0, assign SRTM heights 2.1m - 200m to this RGB value
lowland1=RGB=1, assign SRTM heights 200.1m - 350m to this RGB value
etc................
mount3=RGB=11, assign SRTM heights 3500m - 4000m to this RGB value

You will still need to place cities and towns though, but I may actually have an idea about this but I need to experiment.
Reply
#22

To correct the Northeast France map_h I used the Tone Curve tool in Corel Paint.

this allows you to remap RGB values to new values.
Any number of reference points may be chosen. I used three.
The Tone Curve tool then interpolates a smooth curve variation between the chosen values.

Whilst not absolutely accurate this gives reasonable results, in gaming terms, and is quite quick to do.

The full story of how I prepared the map_h is here.

viewtopic.php?p=16246#16246
Reply
#23

Asheshouse,

I have been following your work and it looks fantastic.

I originally used a correction curve as you did, but I found that assigning specific heights to specific RGB values in MicroDEM was more accurate, and very fast. It now takes me 20 seconds to load an SRTM file, remove voids, scale it to 200m = 1 pixel (for map_h), apply the correction curve, then save as an image to be used in IL2. All that needs to be done is cropping (not scalling) it to the map size in Gimp or another paint package.

I reckon it could also be used to do the bulk of the textures as well at this speed. Final tweaking, especially towns etc , would be by hand though. But as I have hinted at earlier, there may also be a way to do it automatically with roads, rail and built up areas by downloading road and rail data maps into MicroDEM.
Reply
#24

An update to some of the stuff I have been messing around with. I am using MicroDEM to automatically assign texture RGB values to certain heights. Textures are are in the load.ini file.

[Image: texturetrialv1.jpg]
[Image: texturetrialv2.jpg]

Heights determined by the following RGB elevation file in MicroDEM, values are:
Min height, max height, R,G,B.

1 200 0 0 0
201 350 1 1 1
351 450 2 2 2
451 600 3 3 3
601 900 4 4 4
901 1200 5 5 5
1201 1650 6 6 6
1651 1999 7 7 7
2000 2500 8 8 8
2501 2999 9 9 9
3000 3499 10 10 10
3500 4000 11 11 11

And a taster with water
[Image: texturetrialv3.jpg]
Reply
#25

Watcher, had the same idea some time ago (posted here) about assigning map_T regions according to map_h intervals. Didn't know about the microDEM though, I'll try it thanks!
Nice work!
It's good to have this sort of fast automatic first draft of a map, then concentrate on detail. Otherwise you just get tired with the draft and lack energy to do the details which are actually those which makes a map look realistic (good) or schematic (boring)...
Reply
#26

Lowfighter, PM me your email and I will post my correction curves to you to use in MicroDEM. You could probably teak them further.

Still having problem though with the way terrain is handled at high altitudes in IL2, looks like a set of steps. Did a map of Mount Etna on Scilly. At low altitudes it looks good, but at high ones the landscape is very lumpy.
Reply
#27

PM sent Watcher.
About high altitude il2 handling, I agree there's a problem in fact two, besides the big height step for high alt there's also the pretty big size of one pixel (200 meter) so especially sharp mountain peaks are impossible to render well, when you fly close by you'll always notice the mountain is made from HUGE straight lines. The 200 meter pixel is ok for lowland or mild hillland but it's not enough for slopes more than say 15 degrees when flying close to it. Too bad but I think nothing can be done about it.
Reply
#28

sorry, don't know if this is the good threat for this, but just want to show you my beta desert city texture surrounded by the new desert factory texture (finished), made on the desert texture found in desert_online map.

[Image: factorycitydesert.jpg]
Reply
#29

Excellent!
Reply
#30

JV69_BADA Wrote:sorry, don't know if this is the good threat for this, but just want to show you my beta desert city texture surrounded by the new desert factory texture (finished), made on the desert texture found in desert_online map.



Nice, well done!! Smile


Cheers, Neil Smile
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)