Jump to content


Photo
- - - - -

Simple tools for moving no-mans land textures


  • Please log in to reply
10 replies to this topic

#1 AnKor85

AnKor85
  • Posts: 1002

Posted 15 November 2012 - 18:02

I was asked a question about moving no-mans land textures. So here is the answer :)

Download attached archive which contains two .exe files: MaskProcessor and WoodProcessor

First, the mask. It defines where "moon craters" texture will appear.
Use ungtp utility to extract graphics3.gtp - you will find the mask for main map in "graphics\landscape\mask" folder.
There are 616 tiles and it is not convenient to work with them one-by-one, that's why I made the first tool. Just drag-n-drop "mask" folder onto MaskProcessor.exe and it will combine them into single huge image: "mask.bmp".

Then you can use your favorite image editor to edit the bitmap.
Rules are as following: single pixel defines texture for 50m square.
Black = Normal fields texture.
Green = Forests.
Red = Sand for rivers.
Blue = No-mans land.

To show fresh or old battlefields just use shades of blue less than 100%.
You can also combine colors to get more effects - like combining blue and red with different ratios to mix sand and dirt.
See here: Re: Modded map

Now, when you finished with editing that huge bitmap - just drag-n-drop it again on MaskProcessor and it will split the image into tiles again and save them into "mask.updated" folder.

Second tool is more interesting.
I suppose nobody knows so far how "special effects" like smoke and explosions over no-mans land are defined. Well, they are defined by… trees.
You may have seen that the game has different tree types - most common are some kind of leaved trees, but near Verdun you can see fir trees.
There's also special "type" of tree: a burned tree which is seen over no-mans land. And this type is tied to smoke and explosions. So where you see burned trees there will be also a battle smoke, ground explosions and ambient flak!
Strictly speaking there may be no actual trees in that area at all, but if the area specified burned trees as its tree type, other effects will appear.

Tree types are controlled by "graphics\landscape\trees\woods.wds" file which contains a bitmap defining which areas use which type. That's why I made WoodProcessor tool - so you will be able to extract and edit this image.
Unlike previous tool it doesn't use drag-n-drop. Instead you need to place woods.wds in the same folder as WoodProcessor and then run the utility. It will generate "woods.bmp".
The image contains 200m per pixel map with black color reserved for burned trees. Other tree types are shown as different shades of green.
So, to get burned trees just paint new areas black. To replace burned trees with normal ones - paint then with green, but be careful - do not introduce any new colors or even shades of the same color. To be safe you may just copy and paste existing green areas over old no-mans land.

After editing woods.bmp just run my tool again and it will combine existing "woods.wds" (it contains additional information, that's why it is still needed) and modified "woods.bmp" into new file "woods.updated.wds".
Just don't forget to rename it back into "woods.wds" when inserting into the game.

Finally, there's one more thing which may be of interest when moving the no-mans land: global forests.
They are already stored as simple bitmap that's why I didn't made any special tool for them. Just get "graphics\landscape\global_forest.bmp" and edit it to change forest placement. Not sure about the pixel resolution there, you have to figure out it yourself.

Attached Files


  • 0

#2 SYN_Vander

SYN_Vander
  • Tester
  • Posts: 4709

Posted 15 November 2012 - 21:55

Great work! This will really help the budding map makers :).
  • 0

#3 Jason_Williams

Jason_Williams
  • Producer
  • Posts: 3467
  • LocationLas Vegas, NV USA

Posted 15 November 2012 - 22:14

Genius. Great work AnKor!

Jason
  • 0

#4 1PL-Lucas-1Esk

1PL-Lucas-1Esk
  • Posts: 1038
  • LocationPoland/Warsaw

Posted 15 November 2012 - 22:21

Great work! It will make things much more simplier.
  • 0

1PL-Lucas
CO of 1.Pułk Lotniczy
http://1pl.boo.pl


#5 Rama

Rama
  • Posts: 338

Posted 15 November 2012 - 23:44

Great job again AnKor… This tool is also useful as a "quick texture editor"

They are already stored as simple bitmap that's why I didn't made any special tool for them. Just get "graphics\landscape\global_forest.bmp" and edit it to change forest placement. Not sure about the pixel resolution there, you have to figure out it yourself.
Normally, if it corresponds to original forest bitmap, resolution is 50m.
  • 0

#6 catchov

catchov
  • Posts: 3986

Posted 16 November 2012 - 04:50

Image

Go AnKor! 8-)
  • 0

#7 AnKor85

AnKor85
  • Posts: 1002

Posted 16 November 2012 - 06:57

Thanks! :)

I think there may be need in a bit more tools related to forests - first, you may want to cut forests clean in some places and clearing global forests is not enough, there are also individual trees tied to field texture. To do this you have to use "forest_cut.wtr", but I haven't researched how it works yet.

Second, you may want to place burned trees without corresponding battle effects, I believe it is possible, but requires more complex changes in "woods.wds".

Both things are relatively minor, so I will reseratch them later if there is any demand.

This tool is also useful as a "quick texture editor"
If you mean splitting/combining carpet textures, then no it won't work for them. The process is very similar, but they have different size and color requirements. I'll make another one for that purpose.

Normally, if it corresponds to original forest bitmap, resolution is 50m.
Well, it is a bit tricky - I didn't have time to check how it works.
Forests bitmap is only 2048 px wide, which for the main map, results in 358400 / 2048 = 175 m/pixel. Quite coarse. And the image is strictly black and white with no intermediate shades.
I don't know though if the resolution is fixed or will change for smaller maps and I don't know whether forests map can be larger than 2048 px.

catchov, :lol:
  • 0

#8 AnKor85

AnKor85
  • Posts: 1002

Posted 16 November 2012 - 10:14

One more note, thanks to DiFiS.
There is yet another important file: graphics\landscape\landtexturesquality\forest_color.dds
It defines the overall color for forests when you look at them from large distance, when individual trees are not visible anymore.
Front line is defined in alpha-channel of this file. I suppose you have to edit it as well, otherwise green forests may appear over NML once you get far enough :)
  • 0

#9 Rama

Rama
  • Posts: 338

Posted 16 November 2012 - 11:22

If you mean splitting/combining carpet textures, then no it won't work for them. The process is very similar, but they have different size and color requirements. I'll make another one for that purpose.
Ok. We will have great use of both tools.

Forests bitmap is only 2048 px wide, which for the main map, results in 358400 / 2048 = 175 m/pixel.
Ok, then it's lower than the original drawn bitmap.
  • 0

#10 Oscar17

Oscar17
  • Posts: 36

Posted 16 November 2012 - 11:25

There's also special "type" of tree: a burned tree which is seen over no-mans land. And this type is tied to smoke and explosions. So where you see burned trees there will be also a battle smoke, ground explosions and ambient flak!
Strictly speaking there may be no actual trees in that area at all, but if the area specified burned trees as its tree type, other effects will appear.

So, you're saying that if I want to create a battlefield - outside the defined no-mans land - I can just plant burnt trees in that area, and the ambient effects will work there? That sure would cut down on the number of artillery batteries that would be needed to simulate the same thing. Can the "intensity" of the barrage be increased?
  • 0

#11 AnKor85

AnKor85
  • Posts: 1002

Posted 16 November 2012 - 11:44

There's also special "type" of tree: a burned tree which is seen over no-mans land. And this type is tied to smoke and explosions. So where you see burned trees there will be also a battle smoke, ground explosions and ambient flak!
Strictly speaking there may be no actual trees in that area at all, but if the area specified burned trees as its tree type, other effects will appear.

So, you're saying that if I want to create a battlefield - outside the defined no-mans land - I can just plant burnt trees in that area, and the ambient effects will work there? That sure would cut down on the number of artillery batteries that would be needed to simulate the same thing.

Yes, exactly. Just paint required area with black color in woods.bmp produced by my tool.
Maybe I've worded it a bit confusing, but you don't have to add actual trees to produce smoke and barrage effects, but if there are already any trees in that area they will appear burned.

Can the "intensity" of the barrage be increased?
I haven't seen any options which control it. Definitely not with map data, but maybe such options are somewhere in luascripts. There is ambient flak remover mod which I never tried, but maybe one can increase effects in the same way.


Ok, then it's lower than the original drawn bitmap.
Yes, it seriously limits "artistic" possibilities like planting trees along roads.

Fortunately forests seem to be smoothed nicely, and they don't look like huge squares. Looks like I was wrong about them being strictly on/off because actual global forests bitmap has intermediate shades. Not sure how they work though.

However the map in woods.wds is not interpolated at all and with 200m/pixel it produces weird effects when green forests meet front line:
Graphical Issues with Trees Around the Front Zone

Image
  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users