02.01.2008, 11:29
Road and railway textures, an easy method (Updated).
Rail and road use the following greyscale RGB values
Country roads, base RGB = 32
Railway, base RGB = 64
Rail on a sandy bed, base RGB = 96
Highway/main road, base RGB = 128
Highway/main road on a sandy bed, base RGB = 160
Rail on a highway and sandy bed, base RGB = 192
But these change value when they cross a texture of a different RGB value. I.e.
Country roads RGB = 32 when placed on a background texture of RGB = 0
Country roads RGB = 33 when placed on a background texture of RGB = 1
Country roads RGB = 34 when placed on a background texture of RGB = 2 etc
In other works,
Final texture value (RGB) = road or rail RGB + original texture RGB
This can make making a map more difficult. So we could do the following to make it simpler by making the texture and road/rail separately and then combining them with the final map_T file using Gimp. We will look at only the highways, RGB = 128 and rail, RGB =64. For all Road/rail types just use the appropriate RGB value listed above.
1. Open your map_T and set this as the background layer.
2. Make another layer with "Layer Fill Type" set to transparency, call this layer "Road".
3. Make another layer with "Layer Fill Type" set to transparency, call this layer "Rail".
4. Draw in your roads and rail network using the correct RGB values using a 1 (one) pixel wide pen. Ensure dither is OFF.
5. Save this file every 10 minutes or so, saving it as an .xcf file is best as it preserves your layers. This file is your work in progress.
6. When you are ready to test your roads you need to merge your layers.
7. Select the road layer, ensure that "mode" is set to "addition". Merge this layer.
8. Do the same for the "Rail" layer.
9. You should notice that the road and rail now use different pixel values for the Greyscale RGB, depending on the texture RGB value they cross and even when the cross each other.
10. Go to Layer/transparency/remove alpha channel. If you do not do this it will not save correctly.
11. Save this as a .tga, with no compression. Do not overwrite you original .xcf road/rail working files.
"But I want to amend this in FMB" as well you say "and still be be able to separate the road and rail from the map_T"
No problem. The easiest method I have found is this:
1. You should still have you original .xcf file, open it up.
2. Delete or turn off the original background layer.
3. Make a new background layer and colour it RGB = 0 (Black)
4. Merge you road and rail layers into it as described above and save as map_T.tga
5. Use this file in your FMB for your map, you will notice that the textures are all the same.
6. Amend your road/rail network as required and save often!
7. When you have finished in FMB, open the new map_T.tga file created by FMB with Gimp.
8. Using the "select by colour tool" tool select your road network. Copy and paste to a new layer or into your original .xcf file you were using for the road/rail maps.
9. You will notice that where road and rail cross, they make an RGB value of 192, copy this as well and paste onto the same layer as your road.
10. On the road layer you have just created, select these RGB = 192 pixels using the "select by colour tool" Change this colour to RGB = 128. Voila! Your road network back in a form you can easily manipulate in Gimp.
11. Repeat the same process for your rail network using an RGB = 64.
Why would you want to do this?
Well, sometimes it is easier to amend your road and rail in Gimp, sometime in the IL2 FMB and it is useful to be able to flip between the two.
It is also useful because you can use it easily for en_01/02 and 03.tga!
As always, any errors or additions, please get in touch.
CW
Rail and road use the following greyscale RGB values
Country roads, base RGB = 32
Railway, base RGB = 64
Rail on a sandy bed, base RGB = 96
Highway/main road, base RGB = 128
Highway/main road on a sandy bed, base RGB = 160
Rail on a highway and sandy bed, base RGB = 192
But these change value when they cross a texture of a different RGB value. I.e.
Country roads RGB = 32 when placed on a background texture of RGB = 0
Country roads RGB = 33 when placed on a background texture of RGB = 1
Country roads RGB = 34 when placed on a background texture of RGB = 2 etc
In other works,
Final texture value (RGB) = road or rail RGB + original texture RGB
This can make making a map more difficult. So we could do the following to make it simpler by making the texture and road/rail separately and then combining them with the final map_T file using Gimp. We will look at only the highways, RGB = 128 and rail, RGB =64. For all Road/rail types just use the appropriate RGB value listed above.
1. Open your map_T and set this as the background layer.
2. Make another layer with "Layer Fill Type" set to transparency, call this layer "Road".
3. Make another layer with "Layer Fill Type" set to transparency, call this layer "Rail".
4. Draw in your roads and rail network using the correct RGB values using a 1 (one) pixel wide pen. Ensure dither is OFF.
5. Save this file every 10 minutes or so, saving it as an .xcf file is best as it preserves your layers. This file is your work in progress.
6. When you are ready to test your roads you need to merge your layers.
7. Select the road layer, ensure that "mode" is set to "addition". Merge this layer.
8. Do the same for the "Rail" layer.
9. You should notice that the road and rail now use different pixel values for the Greyscale RGB, depending on the texture RGB value they cross and even when the cross each other.
10. Go to Layer/transparency/remove alpha channel. If you do not do this it will not save correctly.
11. Save this as a .tga, with no compression. Do not overwrite you original .xcf road/rail working files.
"But I want to amend this in FMB" as well you say "and still be be able to separate the road and rail from the map_T"
No problem. The easiest method I have found is this:
1. You should still have you original .xcf file, open it up.
2. Delete or turn off the original background layer.
3. Make a new background layer and colour it RGB = 0 (Black)
4. Merge you road and rail layers into it as described above and save as map_T.tga
5. Use this file in your FMB for your map, you will notice that the textures are all the same.
6. Amend your road/rail network as required and save often!
7. When you have finished in FMB, open the new map_T.tga file created by FMB with Gimp.
8. Using the "select by colour tool" tool select your road network. Copy and paste to a new layer or into your original .xcf file you were using for the road/rail maps.
9. You will notice that where road and rail cross, they make an RGB value of 192, copy this as well and paste onto the same layer as your road.
10. On the road layer you have just created, select these RGB = 192 pixels using the "select by colour tool" Change this colour to RGB = 128. Voila! Your road network back in a form you can easily manipulate in Gimp.
11. Repeat the same process for your rail network using an RGB = 64.
Why would you want to do this?
Well, sometimes it is easier to amend your road and rail in Gimp, sometime in the IL2 FMB and it is useful to be able to flip between the two.
It is also useful because you can use it easily for en_01/02 and 03.tga!
As always, any errors or additions, please get in touch.
CW