Map (re-)render tool (Full Version)

All Forums >> [New Releases from Matrix Games] >> Flashpoint Campaigns Series >> Mods and Scenarios



Message


WildCatNL -> Map (re-)render tool (11/26/2013 9:19:13 PM)

Here are the first results of a "map renderer" tool I've been working on. The tool simply renders a .png bitmap for a .fp9 "map values" file which resides in your FPRS/Maps folder. The tool is capable of rendering maps in different styles (for example, winter, summer, desert), and with or without certain overlays (1km grid lines, road names, hex ids).



The first image shows Red Storm 11 (Rinteln) in game. The second image (next post) shows the seasonal variants (winter, summer, 'arid') it can generate today, for the middle part of "FPC Interactive Map" (Atteln). Maps take currently around 10 to 15 minutes to render, and I've been able to render all of the game's maps in three variants in the past 24hrs.


The "map renderer" works as follows: it reads the "map values" from the .fp9 file, builds a terrain mesh according to the elevation values and obstacles. It then populates the terrain with houses, trees and roads, per terrain type and mobility/visibility values. Finally, it renders these along with shading, elevation lines and some grid and label overlays. It accepts themed palettes. It also takes hints for village names and road names (since that info isn't in the .fp9 file), including Umlauts and Ringelesses :).


In the ideal case, this "map renderer" tool would allow one to by-pass HexDraw: you'd load up a 20km x 15km Google maps bitmap into the FPC "Map Editor", assign the values for elevation, mobility, visibility, tag cells for their terrain type and obstacles, and leave the rendering to the tool.

However, there's still some work to do to get there. Some of it is easy (improving the fields and houses graphics, alining houses with road direction, halos behind the labels) and some is more complex. Especially "reconstructing" the road network has been in a pain in the behind, and you might spot a few misplaced junctions and missing bridges.
As I understand it, the .fp9 map values file lacks info on how road run from hex to hex (through which hex sides roads enter/exit - 6bits would be sufficient). Instead, it just tells that a hex contains a road. Whether the road is connected to the road on the next hex, or runs parallel to it, is not recorded. That might make perfect sense for the game's AI, but I'm struggling to create plausible looking road networks.

Although I don't expect the maps rendered by this tool to achieve the same quality as some of the artists on this form (hi Nick69), it might make map creation easier. Furthermore, the tool shows the map as the game sees it (once I get the roads in the right place).

As a final note, here is an example of the hint data I create for the tool to label towns and roads. If you happen to have the same need for proper town and road names, please send me this kind of data, and I'll send you your map in return.
hints:
  # NOTE: don't use a 0 prefix for cells on the first 9 columns!
  "CA 2 Red Storm":
    villages:
      2204: "Vierden"
      1509: "Klein\nMeckelsen"
      1108: "Langenfelde"
      1412: "Groß\nMeckelsen"
    cities:
      2213: "Sittensen"
    highways:
      322 : "A1"
      1416: "A1"
      2609: "A1"
      4201: "A1"
    major_roads:
      4218: "N75"
      2430: "N75"
    minor_roads:
      204 : "L124"
      2406: "L130"
      1923: "L130"
      2029: "L130"


William

[image]local://upfiles/31564/5153116ED5434F928F0E11E165B4675F.jpg[/image]




WildCatNL -> RE: Map (re-)render tool (11/26/2013 9:20:05 PM)

The seasonal variants:




[image]local://upfiles/31564/215A3323C8A148548664D6D66AAA4619.jpg[/image]




Mad Russian -> RE: Map (re-)render tool (11/26/2013 11:58:20 PM)

Interesting.

Good Hunting.

MR




wodin -> RE: Map (re-)render tool (11/27/2013 1:23:49 AM)

Oh WOW..the choice is becoming amazing. Would be cool if you could actually create terrain for snow that actually effects movement rate etc. Superb work though mate..big thanks.




wodin -> RE: Map (re-)render tool (12/5/2013 12:46:59 AM)

Hows it going?




NickGen -> RE: Map (re-)render tool (12/5/2013 9:29:31 AM)

Hi,
This project sounds very interesting ....
Can you give me some advice on how to
read FP9 files ?
I would like to directly open this file type
in my map editor ...
but hard to understand how it works ....
thank you

Nick




WildCatNL -> RE: Map (re-)render tool (12/5/2013 7:03:02 PM)

@Nick69:
I'd love to help. Have sent you an email.

@Wodin:
I spent a lot of time on the road network, to be able to straighten roads and smooth bends. Added halos behind the town / road labels for improved readability.
Next up are improved house graphics and city/village differentiation. I'll probably have something to show by the end of the weekend.

William




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.34375