Jump to content


Photo
- - - - -

Map Editor Tool


  • Please log in to reply
29 replies to this topic

#1 AnKor85

AnKor85
  • Posts: 1001

Posted 30 December 2013 - 18:19

Hi!

Some of you may have known that I have a map editing tool in the work. It is ambitious project which started long ago but met some obstacles - with the main one undoubtedly being the lack of time and (I will be honest here) another one is my waning interest unfortunately.

Anyway, I think it is time to present some results of my work, especially since there are some ongoing mapping projects.
Although the tool is called "editor" in its current state actual editing is to be done in Photoshop (preferably, because it uses Photoshop specific features) or any other image editor. The tool just converts game data to editable bitmap and vice versa.

Download it here MapBuilder.20140331.zip and extract somewhere.
As always it requires Microsoft .NET 4.0 which you most likely already have and Microsoft XNA Framework 4.0 which you can get here http://www.microsoft...s.aspx?id=20914" onclick="window.open(this.href);return false;">http://www.microsoft.../en-us/download … x?id=20914 if you haven't installed it before.

Some instructions.

When you load a map you will be presented with its overview which you can pan while holding the right mouse button and use mouse wheel to zoom in and out.
Channel map is only partially supported - the editor will not save global forest properly and special care must be taken while editing masks there to avoid mixing colors.

As you know buildings, bridges and other static stuff are not a part of the map, but stored in missions files. To populate the map with them you should use Objects menu. It has two options: load standard groups from template files (for-trunc/no-trunc.group) or import your own mission or group file.

Find your area of interest on the map, let's say it is Pomacle on the main summer map and draw a selection rectangle around it while holding the left mouse button.

After you release the mouse button a dialog with area settings will appear.
There you must enter a name for the area and choose which layers you want to work with.
Attached File  SelectArea.jpg   205.25KB   1355 downloads

I hope layer names are obvious, perhaps except "Forest Cut" which is a special layer used to completely remove all trees at specific areas like airfields.

After you click OK the editor will saved exported bitmaps into MapBuilder\Areas subfolder inside your map folder, i.e. Rise of Flights\graphics\LANDSCAPE\MapBuilder\Areas for the main map.
Exported files include (assuming area name is "Pomacle"):
Pomacle.area - text file with some metadata.
Pomacle.tif - main bitmap file, more about it below.
Pomacle.Height.tif - height map, 16 bit grayscale tiff, 50m per pixel.
Pomacle.Objects.png - overlay image containing flat view of building and other objects.
Pomacle.RoadSystem.png - overlay image with roads, railways and trenches drawn as lines.
Pomacle.Substrate.png - overlay image with substrate textures.

Both TIFF images are editable. This means that any changes you do there can be applied to the actual map. PNG images are for reference only.

Now, the most interesting part - open Pomacle.tif in the Photoshop:
Attached File  MainImage.jpg   316.36KB   1353 downloads
It contains carpet data as RGB and other layers from Main Image section as extra alpha channels, all scaled to the same resolution. And everything is editable!
Note that for usability purposes alpha channels are actually inverted - for example if you are going to draw a river you should use black brush over white background.
Also make sure to use the brush of adequate width - you can't draw a river with a width of 3 meters, because water data will be scaled down to actual ingame resolution (10m/pixel). This is especially important for global forest layer which has resolution of 175m/pixel.
You must not rename channels, but you may reorder them or change their color for better visibility.

To simplify the editing, you can add layers with PNG images to see where roads and buildings are currently placed. All images have correct relative DPI so the easiest way to add new layers is to use Place command in Photoshop.
Attached File  Overlays.jpg   378.87KB   1353 downloads
Just make sure you turn these layers invisible (or just delete them) and use "Discard Layers and Save a Copy" option when saving an image, otherwise they will be imprinted on textures.
Of course, alpha channels must be saved unlike layers.

Now, assuming you have painted something useful and saved the tiff, go back to my editor and select "Load Image into Map" for Pomacle area.
The editor will process the image and show results:
Attached File  LoadIntoMap.jpg   180.83KB   1357 downloads
It is smart enough to decide which carpet and mask images were updated and which were not so it will not produce redundant textures which waste memory.

Save the map. And see the results in game.
Attached File  Result.jpg   263.46KB   1349 downloads
Ooops… Global forest didn't appear although I tried to paint it (you can see it faintly to the left of airfield in previous image). This is an example why it is important to make sure you use wide enough brush!

Carpet textures are saved as TGA instead of DDS. They consume more memory but more suitable for editing, because DDS compression degrades image quality. It is up to you to decide when you want to convert TGA into DDS.

Important note. Verdun and Lake maps share some data with the main map, as well as winter and autumn versions share data with summer one. This means that there is a good change you will break something else if you edit the main map, or vice versa - break the main map if you edit verdun or lake. There is relatively simple workaround, but I will explain it later if needed. Of course any changes only affects "mods on" mode and can be reverted with my mod removal tool (for example).
  • 1

#2 AnKor85

AnKor85
  • Posts: 1001

Posted 30 December 2013 - 18:30

Some additional notes (I will reserve this post for them, to avoid excessive editing of original one).

Water is editable and results are generally OK, however there are two things which are not quite correct.
First, there is an additional height data file (water.eat) which supposedly has some data related to water reflection. Since I don't actually know what it does I do not update it at all.

And another one is related to how the water is drawn in game. Strictly speaking its resolution is NOT 10m/pixel as usually assumed, but a bit less. This is caused by special preprocessing required to avoid breaks at water tile edges. The problem is that this preprocessing is intended to be a final step and applying it multiple times to changing image may degrade its quality.
I haven't yet implemented it in my editor.
So, in short, while you can use it to create new water bodies they might appear in game with some sort of "seams" every 400 meters. Or not - the appearance of seams depends on how bent the shore is in that place.
I will add correct processing in later versions.
  • 0

#3 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 30 December 2013 - 18:44

Oh AnKor, Now I am really happy I did not do writeup of how to implement texures/villages into the game. Would have been obsolote.
Congrats on accomplishing this tool and a BIG THANKYOU!
This willmake Life mch easier and maybe some more people join in modding the landscape :D
  • 0

#4 BaronVonMyakin

BaronVonMyakin
  • Posts: 333

Posted 30 December 2013 - 19:40

Thank you much, AnKor! This tool can be really helpful!
  • 0

#5 Genius

Genius
  • Posts: 576

Posted 30 December 2013 - 23:16

Thanks for your great works, a very useful tools for moders!

Bye
Genius
  • 0

#6 SYN_Vander

SYN_Vander
  • Tester
  • Posts: 4703

Posted 30 December 2013 - 23:45

Looks great! I have to take some time to study this carefully! :)
  • 0

#7 Genius

Genius
  • Posts: 576

Posted 08 January 2014 - 01:02

Hi,

I think i have a conversion problem in gimp ?

Here the file open in picasa viewer:

Image



The file open in gimp with mask activated:

Image



The file open in gimp with mask deactivated:

Image

Bye
Genius
  • 0

#8 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 08 January 2014 - 05:59

Yes genius,
Gimp can't import & export Tiffs correctly.
  • 0

#9 AnKor85

AnKor85
  • Posts: 1001

Posted 08 January 2014 - 06:29

Gimp assumes that alpha is transparency which obviously is not right. I'm not sure what to do about it, I can add an option for the tool to produce and read back separate images without alpha, but they are less convenient to edit than having everything in one file
  • 0

#10 Genius

Genius
  • Posts: 576

Posted 08 January 2014 - 07:39

Hi,

Thanks for your help.

It's a uncompressed tiff?

I will do some test with other freeware like paint.net

Bye
Genius
  • 0

#11 =AH=_Sid

=AH=_Sid
  • Posts: 1229

Posted 08 January 2014 - 09:11

Hi,

Thanks for your help.

It's a uncompressed tiff?

I will do some test with other freeware like paint.net

Bye
Genius

If it helps, I think you can still get Adobe Photoshop CS2 Free
  • 0

#12 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 08 January 2014 - 13:56

Genius,

If you want to paint something you can underlay your objects I would recommend using a substrate-texture which can be used within the missioneditor. It has the same resolution like painting directly onto the landscape textures [512x512px = 800x800m]. But brings less problems :)

If thats not your plan try to get photshop (trial or old free one), it works flawless for the mapeditor.
  • 0

#13 Genius

Genius
  • Posts: 576

Posted 08 January 2014 - 22:44

Hi,

Don't work with Paint.net but works with photoshop cs2 (thanks for the link)

What is the advantages and disadvantages of the two solutions ?

I think modify directly the landscape texture will save fps or memory usage than several substrate textures, especially for object which must be at a specific location like forts, no ?

Your solution have the advantage of a better flexibility (choice location) for the mission builder, correct ? Is typical use is for object which are intended to be placed anywhere in the editor (like zeppelin shed or factory) ?

The two method can supress trees ?

Sorry, it's very new for me :mrgreen:

Genius
  • 0

#14 AnKor85

AnKor85
  • Posts: 1001

Posted 09 January 2014 - 09:02

I think modify directly the landscape texture will save fps or memory usage than several substrate textures, especially for object which must be at a specific location like forts, no ?
Substrate shouldn't affect FPS, they have really good optimization. I once made a test with thousands of them placed along roads and it worked without an issue.

Your solution have the advantage of a better flexibility (choice location) for the mission builder, correct ? Is typical use is for object which are intended to be placed anywhere in the editor (like zeppelin shed or factory) ?
Unfortunately substrates are fixed on the map, they can't vary from mission to a mission. So there is no real flexibility. DiFiS and I asked devs to change this but apparently they have a reason to keep it as is.

The two method can supress trees ?
Substrates can hide trees, but the problem is that collision box stays in place and you will get frustrating collision with invisible trees.
Landscape textures however have full control of tree placement - you can add new trees or remove existing ones.
  • 0

#15 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 09 January 2014 - 13:44

Substrates on the other hand can more easily be placed and corrected/ deleted and replaced just inside the Mission-editor. Also they work with every season. If you paint on the landscape tiles, you have to paint it for every season.
As AnKor said, painting on the landscape-tiles brings you the possibilty to plant trees. That why I use this method. I want to have the villages and airfiels have trees at the correct place.
I think you won't need that for the forts.
  • 0

#16 Genius

Genius
  • Posts: 576

Posted 09 January 2014 - 22:49

@Ankor & _Paf thanks to make it clear !

I will try to begin with a simply substrate file. Firt test

dds file:
Image


In rof editor
Image

Image

Image

First comment:
1) i try to make a road but it don't appear on front texture while it works on a textured "grass"
2) the purple that appears in rof editor is this normal?
3) Supress trees work

Bye
Genius
  • 0

#17 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 10 January 2014 - 12:06

1. the nomandsland-texture is overlaying the landtextures & substrates controlled by the masktextures. You can lessen the nomandsland from 100% to 60% or 50% in that region so theunderlaying texture shimmers through but it may look weird from distance…

2. The purple rectangle is normal for the substrates. But it looks like its alsoon the texture?
  • 0

#18 Genius

Genius
  • Posts: 576

Posted 10 January 2014 - 23:49

1. the nomandsland-texture is overlaying the landtextures & substrates controlled by the masktextures. You can lessen the nomandsland from 100% to 60% or 50% in that region so theunderlaying texture shimmers through but it may look weird from distance…

2. The purple rectangle is normal for the substrates. But it looks like its alsoon the texture?

Ok,

I will try with a darker color for the runway to test.

For the purple, I do think that I could leave on the texture of substrate. :xx:

Bye
Genius
  • 0

#19 Genius

Genius
  • Posts: 576

Posted 12 January 2014 - 16:23

Hi,

@Ankor: Your tool is awesome ! very useful. :shock:

I just diverted from its primary function to easily create a substrate.

The advantage of your tool is that it allows you to quickly make textures using existing ones with correct color. The import object functionality and the map navigation is very useful.

I also use object layer for the substrate :) :) :)

Is it possible to define the size of the area recovered (apparently not, as selected by predefined square)?

I explain, I use your map tool and i obtain several tga files.

Image


I work on tga files in photoshop and i crop it to a 512x512 px size.

Image


In the rof editor, i generate substrate file at 800mx800m but the scale does not look right (I lined the road on the map), one idea ? Edit: maybe it's a elevation problem (it looks okay on relatively flat terrain) ?

Image



Finally, in order to avoid future conflict should I use a pre-determined number of layer in textures.ini (the last tumber used is 8 on the stock game / 16 on the modded game) and tga file name (the last name used is layer9 in the stock game)?

Thanks

Byes
Genius
  • 0

#20 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 12 January 2014 - 17:15

Hi Genius,
the predefined/ exported square is the landtexture-tile (512x512px).
So it already has the 800m x 800m dimensions.
So don't crop anymore in PS.
  • 0

#21 Genius

Genius
  • Posts: 576

Posted 12 January 2014 - 17:27

Hi, thanks but the exported tga files by map editor is 4 square: the size is 1024x1024 => crop is needed, no ?
  • 0

#22 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 12 January 2014 - 17:59

Oy yes you are right, now I see you exported 4 there.
Hmmm, no idea then, except triple check that the substrate-texture is correct size in the ROF-Editor…
  • 0

#23 Genius

Genius
  • Posts: 576

Posted 12 January 2014 - 20:09

Re,

Yes substrate are in correct size (800x800), may be it is a elevation terrain problem ?

Do you wish to reserve layer number on textures.ini ? (I've updated Gunsmith86 shared spreedsheet for it https://docs.google.com/spreadsheet/ccc?key=0ArMJenZLYNoqdExoUzZGNHlDbC1JbXU4QWdwMGFPUGc#gid=1

On the other hand I would like to create a fade effect, I tried with an Alpha layer with a mask but it gives me this:

Image


Bye
Genius
  • 0

#24 WW1EAF_Paf

WW1EAF_Paf
  • Tester
  • Posts: 1458

Posted 12 January 2014 - 22:16

Do you wish to reserve layer number on textures.ini ? (I've updated Gunsmith86 shared spreedsheet for it https://docs.google.com/spreadsheet/ccc?key=0ArMJenZLYNoqdExoUzZGNHlDbC1JbXU4QWdwMGFPUGc#gid=1

Thats a good idea, totallyforgot about that doc.


On the other hand I would like to create a fade effect, I tried with an Alpha layer with a mask but it gives me this:
Image

Its absolutely possible to make an fadeout. I make it this way: Draw texture. Draw alpha-channel as seperate Layer (black/white) and export as DXT5 DDS. You don't have to use tga, its leftover from the old ROF-days.
  • 0

#25 Genius

Genius
  • Posts: 576

Posted 12 January 2014 - 23:07

Thanks _Paf :S!:
  • 0

#26 AnKor85

AnKor85
  • Posts: 1001

Posted 13 January 2014 - 08:40

Is it possible to define the size of the area recovered (apparently not, as selected by predefined square)?
Well, technically I can add this as an option, but I didn't expect such use :)

I'm not sure why you have all these problems, by the look of it you are doing everything right.
  • 0

#27 Genius

Genius
  • Posts: 576

Posted 13 January 2014 - 21:58

Sorry, I understand now ! :xx: :oops: :oops: very confused.

I simply don't import correctly object layer on layer texture (gimp have a useful tool for this "open as a layer" but photoshop not).

I had a shift in the location of the fort.

I should use layer=>duplicate layer => select layer texture file

Well, technically I can add this as an option, but I didn't expect such use :)

You are right, is not very needed we can crop simply the files in image editor like photoshop or gimp. :S!:

Sorry :oops: :oops: :oops:
Genius
  • 0

#28 Oscar17

Oscar17
  • Posts: 36

Posted 06 February 2016 - 16:52

Is this tool still current, or, is there a newer version?
  • 0

#29 Bluhm

Bluhm
  • Posts: 38
  • LocationBavaria, Germany

Posted 26 April 2017 - 12:39

Important note. Verdun and Lake maps share some data with the main map, as well as winter and autumn versions share data with summer one. This means that there is a good change you will break something else if you edit the main map, or vice versa - break the main map if you edit verdun or lake. There is relatively simple workaround, but I will explain it later if needed. Of course any changes only affects "mods on" mode and can be reverted with my mod removal tool (for example).

 

Hi,

 

how can I edit the main map, without breaking the season maps?

 

Bluhm


  • 0

logo_1470049335_cp.png


#30 Genius

Genius
  • Posts: 576

Posted 29 April 2017 - 15:02

Re,

 

I don't know.

 

Maybe PM Ankor or WW1EAF_Paf ?

 

Good luck

 

Genius


  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users