A map texture discussion thread
#1

Thought it's time to have a separate thread discussing what we know and what we don't know about creating textures, about the way the game uses textures and so on. Also if you work on new textures and would like to share them, you may post a download link, or screenshots.


Here's one question to start with: if there's a texture, one pixel from it corresponds to how many meter on the map?
Another one: there are .tga and .tgb files, even for same texture. What are these .tgb's doing?
Another one: what are the .bumph files and how is the game using them?
Another one maybe connected with the earlier: why some game textures look high resolution and others look low resolution (you see the pixels in game)?
Reply
#2

> Here's one question to start with: if there's a texture, one pixel from it corresponds to how many meter on the map?

Nice one but I don't know the answer Sad

> Another one: there are .tga and .tgb files, even for same texture. What are these .tgb's doing?

The .tgb seem to be higher resolution (4x) version of the .tga. Probably they are used at short distance while the .tga are for far distance

> Another one: what are the .bumph files and how is the game using them?

These are bump maps used by the game to create shadows. These seem to be standard TGA files and can be opened modifying the extension to .TGA. They are in grayscale format.

> Another one maybe connected with the earlier: why some game textures look high resolution and others look low resolution (you see the pixels in game)?

Maybe this depends on the resolution the artist used for making the texture. There is also a switch in the load.ini to load the texture t higher/lower resolution (see in Tutorials thread)

This what I can contribute to this interesting discussion...
Maraz
Reply
#3

Maraz, what you say seems resonable. So about the .tgb's maybe we can test with your city textures: create from the tga a tga which is bigger (how many times bigger?) smoothen it and then rename it as tgb. See what happens in game, will it appear higher resolution when looked at it from close? I think this is interesting :?
Reply
#4

Ok, I tested and it works! Took mrz_Centercity.tga which is 256 by 256 and scaled it to 1024 by 1024. Saved as temp.tga then renamed it as mrz_CenterCity.tgb. Added to filelist.txt. Checked in game and you can see clearly the appearance changed. But it doesn't look really nicer lol. When scaling with gimp you can use different interpolation methods or no interpolation at all. With no interpolation there should be no change in appearance. With interpolation you see the change but of course it's better in some ways and worse in some other ways so it needs a lot more work than just scaling. So I think the way to go is to create first high resolution tgb, then scale it back to the tga.
Reply
#5

lowfighter Wrote:Ok, I tested and it works! Took mrz_Centercity.tga which is 256 by 256 and scaled it to 1024 by 1024. Saved as temp.tga then renamed it as mrz_CenterCity.tgb. Added to filelist.txt. Checked in game and you can see clearly the appearance changed. But it doesn't look really nicer lol.

Of course, if you start from a 256x256 texture and enlarge it, no more detail is added, just pixel made larger. We need the TGB files as a starting point to modify texture. Anway this information are good for making new textures from scratch.

Maraz
Reply
#6

lowfighter Wrote:Here's one question to start with: if there's a texture, one pixel from it corresponds to how many meter on the map?

Looking at some of the info posted, colour values R:255 G:255 B:255 is equals to 13 000 ft high. If that is correct then each 50 ft increment in height is approximately equal to increments of 1 in the RGB value. This would tie in with certain printed maps which have contours at 50ft intervals, but this depends on the printed map scale.

13 000ft approx 4000 m
50 ft approx 15m

I need to sit down and do a graded map from RGB = 0 to RGB = 255 and see if the slope is linear or curved. If linear then each increase of 1 in RGB will be an equal increase in height. If the slope is curved though, then it is not a simple calculation. And if I park my plane on the top I will get the height when RGB=255!

May try this when I get home from work tonight.[/quote]
Reply
#7

Using Maps\empty2a and a 255 pixel long, 1 pixel wide strip filled with an R=G=B gradient from 0 to 255, no dither, in Gimp the height changes are NOT linear as the RGB value increases. The scale, roughly is the following:

0 - 600m: 1 RGB increment in value = 3.75m: RGB range 0 to 160
600 - 1100 m: 1 RGB increment in value = 15.6m: RGB range 160 to 192
1100 - 2080m: 1 RGB increment in value = 29.7m: RGB range 192 to 225
2080 - 4030m: 1 RGB increment in value = 65.0m: RGB range 225 to 255

ie, if
RGB = 2, height = 2 x 3.75m = 7.5m
RGB = 160, height = 160 x 3.75m = 600m
RGB = 180, height = (160 x 3.75m) + (20 x 15.6m) = 912m

Curiously, when using photoshop, even with dither off, the gradient produces a wobbly slope!
Reply
#8

Thanks Watcher for this piece of info!
I was suspecting it's not linear because at sea level we see much smaller differences in height possible than at say 3000m. Also using the map builder tool (or mode) raising terrain is possible with more accuracy al lower heights than at higher. By the way, do you have this "map builer tool" already?
Reply
#9

lowfighter Wrote:Thanks Watcher for this piece of info!
....Also using the map builder tool (or mode) raising terrain is possible with more accuracy al lower heights than at higher. By the way, do you have this "map builer tool" already?

Lowfighter, don't have the "map builder tool", do you have a link to where I may find this. At the moment I am using Landserf for working with SRTM and DEM data, and Gimp for all other work. Landserf is free and can be found at: http://www.soi.city.ac.uk/~jwo/landserf/

Is there a tool yet for working with map_c files and decoding actors.static? I have tried to manually split and join map_c files into 32x64 pixel blocks and rearrange them, but the end result is poor.

I am still curious why Photoshop "corrupts" the shape of the test slope with bumps and ridges when dither is off, yet Gimp gives a smooth slope. Have you noticed any other problems when using Photoshop to modify map files?

Cheers
Reply
#10

ClockWatcher Wrote:
lowfighter Wrote:I am still curious why Photoshop "corrupts" the shape of the test slope with bumps and ridges when dither is off, yet Gimp gives a smooth slope. Have you noticed any other problems when using Photoshop to modify map files?

Yes, Photoshop does not handle well images with grayscale method. It only has 100 levels of grey instead of 256, so some levels are collapsed to one.

Maraz
Reply
#11

Please PM fly_zo for getting the map_c tool and the map builder tool.


[quote="ClockWatcherLowfighter, don't have the "map builder tool", do you have a link to where I may find this. [/quote]
Reply
#12

ClockWatcher, please PM me your mail address ...... Big Grin
Reply
#13

Lowfighter, fl_zo thanks for the info on the map builder tool. Fly_zo, you have a PM

Further to the non-linear RGB values for height on map_h causing problems. I have figured out a way of automatically adjusting the height/RGB, especially when based on SRTM or DEM maps. It may aslo work raw picture maps. l will post results later when I get home from work.

There is one problem though regarding height data. At the moment we are limited to roughly 4030m in IL2, that will mean we cannot accurately map certain areas in IL2, ie the Caucasus Mountains (max height 5642m) and areas of New Guinea (4884m). http://www.peakbagger.com/range.aspx?rid=0

I wonder if anyone has a method or idea of changing the way IL2 handles height data to overcome this.

Cheers
Reply
#14

That's nice if you figured out an automatic way of coverting the SRTM to il2 scale!

Hm, Caucasus, such beautiful mountains, when younger I tried organise a hike there, it was not possible due to political problems in the region. Maybe it was better that way, you got to be tough for that mountains...Caucasus in il2, that would be fantastic Big Grin
Reply
#15

We follow very closely in your progress and see that you are excellent.
I tried to make some changes in maps changing heights and textures and the results are satisfactory.
I have followed in the construction of new maps and I am very curious.
My problem is the preparation of map_c and understand how map_c_table works and how change.
It follows a puzzle-like construction, but follows the directives certainly places.
I was enthralling from Malta but I saw that his preparation is a good point thanks to 6S.Maraz that is doing a great job.
With Lowfighter, Fly_zo and all other modder who keep the community informed of their progress.[/img]
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)