Dev Diary PMC Africa Niger Tongo ArmA 3 Terrain

This is dev diary for PMC Africa Niger Tongo ArmA 3 real world data terrain by PMC.

We have been writing development or developer diaries to PMC Tactical Forums for two decades, these addon dev diaries are spread to many forum topics. One example PMC Tactical Forums: Vietnam: The Experience Neverending development diary 2007-10-13. On 2020 things changed in Farming Simulator 19 editing community when we started to write detailed dev diaries as web html pages because we had no forum, now in 2022 the same dev diary story telling continues in ofp/arma community.

These dev diaries are my current on the fly thoughts and emotions, if I feel shitty I will clearly state that. I try to avoid it but sometimes there might be hilarious profanity rants when things don't go exactly as I planned, so if you are "offended" by few curse words you probably should stop reading now Smiley ;)

Also these dev diaries are written to many addon projects and sometimes repeating the same lines of text or taking exact same screenshots feels stupid so there might be text just listing boring "I did XYZ and then ZYX" type of info without further details. And remember; this is NOT a tutorial, this is entertainment Smiley ;)

Time stamps are Universal Time Coordinated (UTC).

2021-10-13 Project Started

2021-10-13T11:06:00Z Created this page Smiley :)

2021-10-13T11:09:00Z Created brand new Arma3tools_pmc_real_world_data_terrains_africa_niger directory, our very first african terrain dir. Yes sure we have somalia, egypt and libya which I believe are african countries, but I am somehow viewing libya and somalia as just "as is" instead of lion and elephant infested african savannah countries Smiley :)

Hmm maybe for being thorough I should re-arrange all countries with proper names, like COUNTRY STATE CITY where appropriate, I believe afghanistan and iraq does not have such states and even in germany or poland, well I mean okay "Europe Germany Wolfsburg" could be one, hmm hmm dunno.

Overall it should be level playing field for all terrains, but... hmm dunno. Needs more thought. Of course I'm the El Jefe in charge and decide what goes, but its just so unprofessional to have one terrain using country-state-city and another just country-city.

I. DONT. KNOW. Smiley :D

Anyways speaking of names, this terrain is africa niger tongo tongo, but to shorten addon names it will be just called tongo one time "pmc_africa_niger_tongo" style, no need to repeat same word in the file name.

For this Arma3tools_pmc_real_world_data_terrains_africa_niger directory the plan is to create another terrain as well, there are nice looking areas where ISIS or whatever african hutu terrorists doing bad things in SW niger, so another terrain is easy to create.

2021-10-13T12:23:00Z Global Mapper project was created and ASCII Grid heightmap.asc downloaded / exported. Just downloaded OpenStreetMap (OSM) shape files from Geofabrik OSM to our new terrain area, africa niger.

Loaded OSM shapes, did the usual shuffle well known from PMC ArmA 3 Real World Data Terrain Tutorial, was having a good laugh as the OSM features for 40km terrain were: 49 areas, 121 roads and 57 points heh. (usually these numbers are in the tens of thousands, sometimes even over hundred thousand features).

Just in case someone doesn't know why that is funny, usually we need to clean out and delete useless road features because they are over 9,000 and arma3 usually crashes with virtual blocks memory error, well this african hutu land terrain has whopping 121 features for roads Smiley ;)

Global mapper exporting satellite mask and Terra Incognita leeching satellite imagery.

PMC Africa Niger Tongo ArmA 3 Screenshot

After Sat_Mask_??.png grid tiles were exported I ran _run_graphicsmagick_convert_Sat_Mask_PNG_to_BMP_with_white_fix_4x4.bat to get proper background white colors for PMC_Terrain_Data layers.cfg config.

2021-10-13T13:09:00Z Global mapper transformed shapes, although there was no UTM Projection zone to transform as its 31N already. Got location place names done with PMC OSM Places CSV2HPP Converter, had few locations without names. Heh Afrika afrika! Smiley ;)

2021-10-13T13:34:00Z Terra incognita finished downloading satellite imagery.

Checked the saved satellite imagery JPGs and sure enough there was one black tile, so I started terra incognita again and re-saved. Then created global mapper map catalog and exported satellite texture in 4 x 4 grid tiles.

Inspected satellite texture tiles but I already knew from the preview-arcgis-17-level.png image that the satellite is perfect and indeed it was. Just awesome satellite texture.

Next was GraphicsMagick use for Darken Merge Picturemap Satellite Texture Tiles with desert type satellite imagery, meaning quite dark. This was just a click of a bat file, easy.

2021-10-13T14:12:00Z All done in global mapper directory, now tool pipeline shows that I need to create Terrain Builder project, but this is not possible because taiwan terrain is symlinked to p:\pmc\ and I'm pboProject binarizing PMC Taiwan Taipei terrain, so I have to wait.

My belief is that if you create terrain builder project without p:\pmc\ available it will not work, if you were to use simple hard disk drive (HDD) directory instead of mounted p:\pmc\ drive. Not sure, maybe I should try it out one day, but that is not today.

2021-10-14 Terrain Builder Time

2021-10-14T01:04:00Z New editing day has started, lets get this terrain into terrain builder and hopefully even binarized (PMC Editing Wiki: search "binarize") today.

Created terrain builder project. Imported heightmap and then satellite texture/mask (mask first, then texture).

Isn't that a pretty thing.

PMC Africa Niger Tongo ArmA 3 Screenshot

2021-10-14T01:32:00Z Started to generate layers.

While layers were generated I created proper mod.cpp and did Latitude / longitude config with global mapper.

2021-10-14T02:13:00Z Finished generating layers a moment ago, exported WRP, moveObject WRP and then started Convert Layers PNG to PAA Fast bat.


2021-10-14T02:28:00Z Then continued with fast pace to run through my tool pipeline, forgot every little thing I did but now pboProject is binarizing already, things are looking good.

Terrain WRP still has no objects, the OSM shape files were lacking, there is no vegetation on them at all, just one industrial area and several residential areas, I guess just round blobs around the villages. So I have to go into the satellite mask images and paint vegetation myself in GIMP, then create shapes from the images and finally Terrain Processor generate some vegetation.

2021-10-14T02:37:00Z Okay pboProject finished binarizing, PMC Africa Niger Tongo (tongo) is in-game, or well, at least should be Smiley :)

Now I'll run off to edit some taiwan terrains again, plenty of object work awaiting there.

2021-10-27T20:42:00Z Back to afrika (hoho). I just published new 2021 PMC terrains alpha testing page with releases of all these last weeks new terrain torrent releases, so now its time to fix the most obvious issues. One of them was that africa niger tongo terrain is missing objects.

Edit: btw 2021 terrain alpha testing page was for guys in PMC discord, nobody was interested so it got taken down. Discord is nothing but money hungry bastards and newbies asking stupid questions treating it as 24/7 helpdesk, nobody is chatting, discord is waste of time. If you plan on checking arma discord servers out, don't bother wasting your time, go read PMC Tactical Forums or bis forums instead.

Looks like there are no TerrainProcessor/ directory to be seen. So created it, copied Terrain Processor TPP Templates files there, ran road smoothing TPP and forest-01 which was for shape file I quickly created in terrain builder. Used my PMC Greece Agios Efstratios TPP file for it, not good for african terrain but what can you do without proper african tree objects.

Created 23,335 bushes/trees/rocks for that shape file, then pboProject binarized WRP addon.

2021-10-27T21:55:00Z Fixed latitude / longitude config which was missing. It actually... well only missing from the arma3 addon dir version, it was present in the actual config.cpp, although had to do one fix for it, then pboProject binarize and verified in-game that it works.

2021-11-11 Dupe Hunt

2021-11-11T09:45:00Z Back to africa niger tongo tongo terrain editing after more than a week of no arma3 editing, at all, ugh (for the no editing part). Started by fixing the duplicate config.cpp class names{} entry for two "Tongo Tongo" names, I just investigated which is which and now the actual US special forces ambush point is "Tongo Tongo" and the dupe in south is "Unknown", its good enough for now.

Then cleaned up global mapper project dir by backupping PGW world file, deleting satellite, shape and other source files.

Hmm overall look to this terrain... yeah its ready for alpha release for the whole public in PMC Tactical website and not just that failed testing attempt in PMC discord previously.

Moving onto working the next terrain on the list.

2022-04-14 New Editing Year

2022-04-14T23:15:00Z New editing day has started, actually its a new editing YEAR since last edits were from 2021 Smiley :)

Just finished reading this dev diary, spotted few oddities but nothing major. Supposedly this terrain is ready for release but needs an thorough arma3 in-game review.

Before launching arma3 had to create arma3_pmc_real_world_data_testing_africa.bat start file for african terrains, which we currenly have only one (as explained in beginning of this dev diary).

Check in arma3 shows that terrain builder mapframe properties surface mask resolution needs to be 1024 x 1024 pixels as now its less than that (512 I believe). And roads.shp is broken, but that was already known in my real world data terrain tool pipeline 00.txt file.

First updated mod.cpp it was easy task, new google/maps and homepage link.

Was not really planning to get into heavy editing anymore, but decided to global mapper export satellite texture and see if I could GIMP paint the forest vegetation areas and convert that to shapes which could be then used in terrain processor.

Its kind of unecessary waste of time right now, release should be in my mind not tweaking some object count, but lets try GIMP painting out and document how it works, interesting to see what comes out of it.

PMC Africa Niger Tongo ArmA 3 Screenshot

Global mapper pushing data out.

Opened sat_A1.png in GIMP, created new layer called Trees, selected RGB 255,0,0 color just to make it distinctive from the background, then used F free hand selection tool and started to select forest vegetation areas.

Well that was painful, there are so many green vegetation areas and this is just ONE of the 4 x 4 grid tile images.

I did few selections, making the selection is easy but there are so many of them as just said above.

Then I tried fuzzy selection tool with 15 threshold. Using SHIFT-LMB which is add to selection worked pretty well, one click did not select all colors in the image but just the mouse click neighborhood.

However this still was quite the task to wield mouse all around the image selecting these areas, then selections usually were quite splattered with small few pixel holes etc.

I fixed the splattered broken selections by doing grow 10 and shrink 10, this removed all the small holes in the selection and made it much more round and smooth. Pretty nice.

PMC Africa Niger Tongo ArmA 3 Screenshot

This definitely is not any click of a button quick task and again I must emphasize this is only 4 x 4 grid tiles vegetation in fairly dry part of the world, cant imagine what kind of task would it be in huge green terrain with 8 x 8 grid tile setup.

2022-04-15T00:26:00Z Got sat_A1 through sat_A4 done now, still three more sets to do, its... doable.

2022-04-15T00:58:00Z All 4 x 4 grid tiles done. That wasn't so bad, but yeah remains to be seen if this would become a regular tool pipeline thing, I have my doubts on those green terrains, selecting forests next to a green fields etc might not be that easy.

Then tried to use ImageMagick to convert GIMP XCF images to PNG, well... it worked, kinda, it saved -0.png and -1.png file name images because it knows how to read layers and I didn't provide that parameter info, oh well gets the job done now. Edit: apparently the parameter is simply the XCF layer number at end of the image name like this: "FileName.XCF[1]", which is very interesting parameter indeed, havent tried it out but thats what I found when searching.

I have used imagemagick XCF to PNG conversion one time before and remember how darn slow it is, I mean it really takes forever to convert one 10240 resolution XCF/PNG image. My best guess is that the PNG part is taking so long in it.

Feeling a bit frustrated as this vegetation task as a whole takes this long, I should have not started this, would probably have release package already done heh.

Then created map catalog from these sat_??.png images in global mapper, then did the layer -> create something-something Smiley ;)

PMC Africa Niger Tongo ArmA 3 Screenshot

And this is how our forest vegetation shape areas layer looks like.

PMC Africa Niger Tongo ArmA 3 Screenshot

Then exported the forest shapes, unloaded current project, loaded forests shape, it did not require UTM 31N projection converting because this terrain already is 31N, but I had to do the usual terrain builder 200,000/0 coordinate transformation.

Copied one of the terrain processor TPP files to "obj_forest.tpp" and started to tweak it a bit. Changed relative roads.shp path to the current dir (no path basically), copied the two bat files for roads.* copying and *.LBT deleting in terrain processor dir, edited and ran roads bat.

While terrain processor was running, I imported roads.shp to terrain builder...

PMC Africa Niger Tongo ArmA 3 Screenshot

... and exported right back out again.

Terrain processor generated 497,364 objects to this shape, it took quite a while so that means the shape has many unnecessary ... err details. Detailed shapes take forever to generate objects to.

Imported new obj_forest.lbt into terrain builder.

Had tool pipeline task to smooth roads, hmm okay, got that done as well and imported smoothed roads heightmap into terrain builder. Rebuilt terrain, removed the new heightmap layer, exported WRP, saved project and exited, we are done.

Then moveObject re-pathed the WRP file and started pboProject binarization process.

2022-04-15T02:19:00Z Finished binarizing, time to check it out in arma3.

It looked very nice forest shape wise, of course objects are those greece agios efstratios looking trees, but oh well like said we don't have authentic african vegetation objects.

Alright time to start release procedure Smiley :)

Except going to cook food and eat before starting.

2022-04-15T04:20:00Z Cooking food and eating break is over, back to editing african terrain. Okay, lets get that release procedure going, these terrains wont release themselves Smiley ;)

Added pmc_africa_niger_tongo class name to PMC "worldSize" mission pack compile bat file terrain list, this gives us bunch of missions to play with.

Generated bisign keys for the addon pbo's using 1._run_sign_generic.bat file, then edited 2._run_pack_latest_release.bat and the readme text files. Then ran the bat to 7-zip pack the release package.

2022-04-15T04:47:00Z Screenshots taken, sorted, edited and converted.

2022-04-15T05:31:00Z All other web pages were created in localhost, now need to move this dev diary text there too (from regular text file) and start proof reading and link adding.

Uuh took a while again to proof read while adding those links in, my copy-paste finger is hurting so bad again hehe. Man I'm telling ya, editing terrains is easy, making this diary shit is HARD Smiley :D

But now almost everything is done, only thing left to do is the news/forum post template and then pressing the evil big red button for the release.

2022-04-15T06:36:00Z PMC Africa Niger Tongo v0.1 has been released! Smiley :cool:

2022-04-22 Satellite Texture / Mask Generation

2022-04-22T06:41:00Z New editing day has started. Not really, just being bored not knowing what else to do while staring at empty computer screen so might as well put in some long processes running on the background, so next on the list is changing terrain builder mapframe properties surface mask resolution and therefore generate layers shuffle.

I need to emphasize I don't consider this to be legit all-day-balls-deep editing, just something for my computer to run on the background while I'm bored trying to find something that would get me interested.

First replaced p:\pmc\ symlink mount with africa niger one, then deleted all the layers RVMAT and PAA files.

Launched terrain builder, changed the surface mask size from 512 to 1024 which makes _043 file name range for the layer files, this removes the 2D mapview zoomed out "mosaic" bug.

Then edited separate WRP and Data bat files for the _043 file name / PBO range.

2022-04-22T06:46:00Z Started terrain builder generate layers while I went back to being bored...

2022-04-22T07:17:00Z Generate layers finished, exported WRP.

Started convert layers PNG to PAA fast bat.

2022-04-22T07:24:00Z Finished conversion magic.

Deleted layers addon directories from pmc_africa_niger_tongo_data_layers_05 to pmc_africa_niger_tongo_data_layers_08. Then ran the separate WRP and Data bat file, after that moveObject RVMAT re-pathing task.

2022-04-22T07:27:00Z All done, terrain is ready for binarization, when ever that's going to happen, not going to do it now this was as said just casual in the background work while I'm bored.

PMC Africa Niger Tongo: Changelog, Dev Diary, Screenshots. Back to PMC Terrain's page.