New theater tool coming (very) soon

F4Browse, CATE, Tacedit, Terrainview & TheaterMaker etc utility related

Moderators: Lone Wolf, Snake Man

Post Reply
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-18 22:08:00

Hi everybody,

Washout asked me to make a new little tool for theater makers. There's already a working version, so expect to see it released soon.

If you have ideas of what this program should or should not do, it's time for you to let them know ;)

Here's the readme :
quote:
Purpose of this program

This program was done mainly to ease the making of new theaters for Falcon4, at the request of C. « Washout » Carter.

The idea is to analyse a given Bitmap, and by reading a configuration file, transform certain colors into a CVS format. This can be used, for example, to retrieve the roads, powerlines, trees (etc. ... whatever) positions given by a bitmap and translate them into F4 coordinates.

The bitmaps supported are standard Windows BMP, with the following parameters :
 Size : 1024x1024 or 2048x2048 or 4096x4096 (corresponding to the different F4 theater sizes)
 Colors : 256


Installation of Bmp2Cvs

Just create a folder somewhere on your hard disk, and put all Bmp2Cvs files in this folder. You’ll need to have all Visual Basic 6 runtime files (Comdlg32.ocx included) installed on your Win98 PC for Bmp2Cvs to run. These files are not provided with Bmp2Cvs, but you’ll have no problem finding them on several web sites.

How to use Bmp2Cvs ?

First , configure it. Read the provided example configuration file, which is rather basic. The format is :

Keyword1=r1,g1,b1 r2,g2,b2
Keyword2=r3,g3,b3

Where keyword is a word describing the feature you want to retrieve, and « r,g,b » are of course the color(s) corresponding to these features.

The result will be a Cvs file with this format :

Keyword1,x1,y1
Keyword1,x2,y2
….
Keyword1,xn,yn
Keyword2,x3,y3
Keyword2,x4,y4
….
Keyword2,xm,ym

Where « x,y » are of course the coordinates in the F4 terrain.

When your conf file is done, launch Bmp2Cvs. Input the name of the BMP file, the name of your conf file, and the name of the result CVS file (there are tooltips on all buttons if you don’t know what they are supposed to do. Should be pretty obvious though).

You should see your conf file appearing in the middle text box.

Then click on Start, and wait until the program gives you the number of features found. Your CVS file should then be where you specified it should be …

Quick example

If you have a BMP showing roads and power lines in a F4 theater, and let’s say that roads are in plain blue, and power lines in plain white or in plain green, you should use a conf file looking like this :

Powerline=255,255,255 0,255,0
Road=0,0,255

Important note : You can use different colors for a same feature. But never use two times the same feature name, or the results could be strange. I did not test it, but you should be able to use the same color for different features.

Some thanks

Well, they’ll be quick ;) : thanks to Washout who asked me to make this little utility. And thanks to Snake Man too, for whom I did my first F4 tool (known as CATE).


Version history

 V 1.01 : 18 December 2002

Added a preview window of the Bmp you’re working on. Click on the appropriate checkbox to show it. For now, the picture is stretched to the size of this window (which is resizable), but will always stay square.

 V 1.00 : 16 December 2002

Errhm, first version, I think ;)
Regards.

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: New theater tool coming (very) soon

Post by Snake Man » 2002-12-19 02:29:00

quote:Originally posted by Skyfire76:
If you have ideas of what this program should or should not do
I have no idea what/why this program does, anyone want to explain?

PMC TFW
Snake Man
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

ccc
Chief of Staff
Posts: 4857
Joined: 2000-08-06 22:01:01

Re: New theater tool coming (very) soon

Post by ccc » 2002-12-19 04:44:00

set up some obj link automatically?

diomedea
Recruit
Posts: 47
Joined: 2002-06-05 22:01:01
Location: Rome, Italy

Re: New theater tool coming (very) soon

Post by diomedea » 2002-12-19 07:20:00

Idea 1.
In a photographic image, a feature stands out from the surrounding because of contrast. The feature itself has different "colors" within it (by colors I mean also degrees of grey, recon photo are B&W because of greater contrast), just because of various degrees of lighting. So, the best way to extract a feature coordinates from the image is to:
- first determine at least one pixel that belongs to the feature for sure (this could be hand-made);
- from each such pixel scan the adjacent pixels and assign them to the feature if they do not contrast too much (threshold to be assigned) from the previous one; threshold could be a variable, based on the "color" average of those pixels already determined to be part of the feature that are closest to the one under scrutiny;
- after getting a general direction of the feature, exclude (or warn the user about it) those pixels that start pointing in a totally different way (what if different roads cross each other? we would get out the entire net at once, however we want the different roads).

Idea 2.
Coordinates are to be referenced to the Falcon world/theater. The BMP could represent a landscape of any size, at any angle and in any position (point of view). So I think every coordinate coming from the tool has to be converted to be of any use.
Lots of spatial calculations, however it is just the inverse procedure than the one used to display a feature (mapped in the theater) out in the 3D view in Falcon. So, I think the coders already know how that could be done.

Diomedea out.
diomedea out.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-19 08:39:00

quote:Originally posted by Snake Man:
I have no idea what/why this program does, anyone want to explain?

PMC TFW
Snake Man
Lol, Snake Man :D

The program allows you to transform a BMP showing a certain number of features into a CVS file giving all the F4 coordinates of these features.

And if I'm not mistaken, Washout uses after that a program of his own to transform the created CVS in a Tacedit compatible format, or something like that.

Got it now ? ;)

Regards.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-19 08:42:00

quote:Originally posted by diomedea:
Idea 1.
In a photographic image, a feature stands out from the surrounding because of contrast. The feature itself has different "colors" within it (by colors I mean also degrees of grey, recon photo are B&W because of greater contrast), just because of various degrees of lighting. So, the best way to extract a feature coordinates from the image is to:
- first determine at least one pixel that belongs to the feature for sure (this could be hand-made);
- from each such pixel scan the adjacent pixels and assign them to the feature if they do not contrast too much (threshold to be assigned) from the previous one; threshold could be a variable, based on the "color" average of those pixels already determined to be part of the feature that are closest to the one under scrutiny;
- after getting a general direction of the feature, exclude (or warn the user about it) those pixels that start pointing in a totally different way (what if different roads cross each other? we would get out the entire net at once, however we want the different roads).

Idea 2.
Coordinates are to be referenced to the Falcon world/theater. The BMP could represent a landscape of any size, at any angle and in any position (point of view). So I think every coordinate coming from the tool has to be converted to be of any use.
Lots of spatial calculations, however it is just the inverse procedure than the one used to display a feature (mapped in the theater) out in the 3D view in Falcon. So, I think the coders already know how that could be done.

Diomedea out.
Idea 1 : seems very complex to me ;) But could be useful ...

Idea 2 : not sure. Just using your favorite paint program to convert the picture in a usable (by the program) format should be enough, no ?

Regards.

Washout
LeadPursuit
Posts: 134
Joined: 2001-04-19 22:01:01
Location: Wallingford,Oxon,UK
Contact:

Re: New theater tool coming (very) soon

Post by Washout » 2002-12-19 09:38:00

Hi

Skyfire is absolutley right - I had been agonising over how to place several thousand powerline objectives in the Balkans. With this tool and some monochrome maps I have of the powergrid in the theatre, I can get a csv dump of the pixel coordinates for each objective. This can then be batch processed with a template powerline record to populate the powergrid around the Balkans rather than having to place all the objectives manually.

A great way of saving time.

I'm also going to experiment with placing tree populated forest objectives and provided I can keep under the objective ID limit in F4 it should lead to LOMAC style forests which match the dense forest tiles underneath. I will be using the theatre relief map from TACEdit to do this.

Essentially it will be a way of "painting" large numbers of similar objectives onto your theatre.

Hope that explains the tools purpose.

Later

Chris
Chris "Washout" Carter
F4 Balkans Terrain Team
CO: The Vulture Squadron

diomedea
Recruit
Posts: 47
Joined: 2002-06-05 22:01:01
Location: Rome, Italy

Re: New theater tool coming (very) soon

Post by diomedea » 2002-12-19 14:45:00

quote:Originally posted by Skyfire76:

Idea 2 : not sure. Just using your favorite paint program to convert the picture in a usable (by the program) format should be enough, no ?
My guess (not knowing the original requirement) is about getting correct coordinates for objects to be inserted in the terrain database files. Coordinates from a picture (or a BMP file) are just displacement from a reference edge (probably left and down) to the point in the picture, in pixels. Coordinates for a Falcon terrain database file are something you could very well teach me about. How to change from "picture coordinates" to "database coordinates" is the question under my "Idea 2".
If Chris has other ways to do that, I would surely like to know.

Diomedea out.
diomedea out.

Butcher_ss
Colonel
Posts: 343
Joined: 2002-08-22 22:01:01
Location: Larnaca, Cyprus
Contact:

Re: New theater tool coming (very) soon

Post by Butcher_ss » 2002-12-19 14:54:00

quote:Originally posted by Skyfire76:

If you have ideas of what this program should or should not do, it's time for you to let them know


I think that the tool should also include features like F4 browse. I am still using f4browse and I find it superb. I haven't really used tacedit or other tools but only f4browse. So if the new theater tool was a combination of both, it would be really useful in my opinion.

Butcher_ss.
Butcher_ss.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-19 16:35:00

quote:Originally posted by diomedea:
My guess (not knowing the original requirement) is about getting correct coordinates for objects to be inserted in the terrain database files. Coordinates from a picture (or a BMP file) are just displacement from a reference edge (probably left and down) to the point in the picture, in pixels. Coordinates for a Falcon terrain database file are something you could very well teach me about. How to change from "picture coordinates" to "database coordinates" is the question under my "Idea 2".
If Chris has other ways to do that, I would surely like to know.

Diomedea out.
Well, that's easy, one tile in the F4 terrain is referenced exactly like one pixel in a BMP (well, more or less).

For example, that's why CATE is able to save a bitmap of the theater, or why you can view the terrain in TerrainView (erhm, shortly said).

Regards.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-19 16:36:00

quote:Originally posted by Butcher_ss:
I think that the tool should also include features like F4 browse. I am still using f4browse and I find it superb. I haven't really used tacedit or other tools but only f4browse. So if the new theater tool was a combination of both, it would be really useful in my opinion.

Butcher_ss.
I never used F4Browse myself, so I can't say. However, I don't see the interest in doing two times the same thing. But maybe I'm missing something.

Regards.

Washout
LeadPursuit
Posts: 134
Joined: 2001-04-19 22:01:01
Location: Wallingford,Oxon,UK
Contact:

Re: New theater tool coming (very) soon

Post by Washout » 2002-12-20 13:39:00

quote:Originally posted by diomedea:
If Chris has other ways to do that, I would surely like to know.
Absolutley right - the placement of objectives in a standard sized theatre is done on a 1024x1024 grid. This means that if you have a 1024x1024 bitmap where each pixel represents an objective to be placed this tool provides a quick way of getting the coordinates for those objectives. Also there is alot of other information that is held in files at the 1024x1024 resolution but that's for later projects :)

Later

Chris
Chris "Washout" Carter
F4 Balkans Terrain Team
CO: The Vulture Squadron

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Re: New theater tool coming (very) soon

Post by T_Rex » 2002-12-20 16:08:00

quote:Originally posted by Skyfire76:
bmp2cvs
Hmmmm... that doesn't sound like a very exciting name.... :)

How about...
Advanced Graphic Database Parser (AGDP - kinda hard to pronounce)

Map And Graphic Spreadsheet Generator (MAGS-G)

Make Your Own Database From a Bitmap Program (MYODFBP - nah, that's still kinda hard to pronounce)

This'll be harder than CATE. :D
Sic Semper tyrannosauro.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-20 19:52:00

Lol, T, no kidding, I thought about contacting you to find me a nice name. But I forgot, and besides, Bmp2Cvs is at least clear :D

Anyway, Snake Man, do you want me to send you the file so that you can pu it for download (very small for now, around 24 K).

Regards.

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: New theater tool coming (very) soon

Post by Snake Man » 2002-12-21 04:35:00

quote:Originally posted by Skyfire76:
send you the file so that you can pu it for download
Sure, no problem. Just try to attach some clear explanation of what it does.

Edit: Utility added to the Downloads page. Direct link here to download.

PMC TFW
Snake Man
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: New theater tool coming (very) soon

Post by Widowmaker » 2002-12-21 17:37:00

really cool
thnx again Skyfire and Washout.


Skyfire whenever you have time for it
could you look at making CATE 4-byte terrain compatible?.
would safe me an awefull lot of time in the process of running cate tests on 256 segments terrains.

AFAIK the only difference is that the tileoffset numbers are read as a 4byte instead of the current 2byte.

/widmak
Widmak

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-22 10:06:00

quote:Originally posted by Snake Man:
Sure, no problem. Just try to attach some clear explanation of what it does.

Edit: Utility added to the Downloads page. Direct link here to download.

PMC TFW
Snake Man

Cool, thanks :)

Regards.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-22 10:08:00

quote:Originally posted by Widowmaker:
really cool
thnx again Skyfire and Washout.


Skyfire whenever you have time for it
could you look at making CATE 4-byte terrain compatible?.
would safe me an awefull lot of time in the process of running cate tests on 256 segments terrains.

AFAIK the only difference is that the tileoffset numbers are read as a 4byte instead of the current 2byte.

/widmak
Honestly, I have forgotten a lot about how CATE works exactly :D, but IIRC, what you ask is not so easy, especially since I have to keep the compatibility between the both.

Besides, I wonder if the required memory needed to work with such theaters and CATE would not be too much.

Could you give more details about the differences between both types of theaters (as you see, I really forgot a lot ;))

Regards.

Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: New theater tool coming (very) soon

Post by Skyfire76 » 2002-12-22 11:59:00

Well, I took a look at CATE, and I don't think I'm going to do something like that.

The way CATE is done, I would have to redo almost everything to implement such a feature (VB is not really friendly when it comes to manipulating data structures, especially if they are a little complex).

Sorry, Wid :(

Regards.

Butcher_ss
Colonel
Posts: 343
Joined: 2002-08-22 22:01:01
Location: Larnaca, Cyprus
Contact:

Re: New theater tool coming (very) soon

Post by Butcher_ss » 2002-12-23 19:06:00

quote:Originally posted by Skyfire76:
Hi everybody,

Washout asked me to make a new little tool for theater makers. There's already a working version, so expect to see it released soon.


Will it be similar to tacedit? I found tacedit very difficult (in fact I haven't used it since I don't really know how) so it would be very good in my opinion if the theater was easier to use than tacedit for the assistance of many like me

Butcher_ss.
Butcher_ss.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests