Map (re-)render tool

Post new mods and scenarios here.

Moderator: MOD_Flashpoint

Post Reply
User avatar
WildCatNL
Posts: 924
Joined: Fri Mar 27, 2009 5:21 pm
Location: Eindhoven, the Netherlands

Map (re-)render tool

Post by WildCatNL »

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.

Code: Select all

 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
Attachments
redstorm11ingame.jpg
redstorm11ingame.jpg (532.22 KiB) Viewed 277 times
William
On Target Simulations LLC
User avatar
WildCatNL
Posts: 924
Joined: Fri Mar 27, 2009 5:21 pm
Location: Eindhoven, the Netherlands

RE: Map (re-)render tool

Post by WildCatNL »

The seasonal variants:




Image
Attachments
seasonsFP..ap_small.jpg
seasonsFP..ap_small.jpg (279.96 KiB) Viewed 277 times
William
On Target Simulations LLC
User avatar
Mad Russian
Posts: 13255
Joined: Sat Mar 15, 2008 9:29 pm
Location: Texas

RE: Map (re-)render tool

Post by Mad Russian »

Interesting.

Good Hunting.

MR
The most expensive thing in the world is free time.

Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
User avatar
wodin
Posts: 10709
Joined: Sun Apr 20, 2003 3:13 am
Location: England
Contact:

RE: Map (re-)render tool

Post by wodin »

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.
User avatar
wodin
Posts: 10709
Joined: Sun Apr 20, 2003 3:13 am
Location: England
Contact:

RE: Map (re-)render tool

Post by wodin »

Hows it going?
User avatar
NickGen
Posts: 149
Joined: Thu Nov 01, 2007 9:59 pm
Contact:

RE: Map (re-)render tool

Post by NickGen »

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
Nick
User avatar
WildCatNL
Posts: 924
Joined: Fri Mar 27, 2009 5:21 pm
Location: Eindhoven, the Netherlands

RE: Map (re-)render tool

Post by WildCatNL »

@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
William
On Target Simulations LLC
Post Reply

Return to “Mods and Scenarios”