Dev Diary PMC Taiwan Kaohsiung ArmA 3 Terrain

This is dev diary for PMC Taiwan Kaohsiung 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-09 Project Started

2021-10-09T05:06:00Z Created this page Smiley :)

Decided to create 81.9km x 81.9km taiwan terrain to city of Kaohsiung (nice spelling that for hundred times hehe). google/maps So off we go, lets get started.

Got quick first leap into this terrain done, Global Mapper project created, heightmap downloaded, KMZ exported, OpenStreetMap (OSM) shapes handled and Terra Incognita downloading first satellite texture corner.

2021-10-09T05:42:00Z Lunch break time, I'm starvin' ...

2021-10-09T06:12:00Z Feeding time over, back to creating taiwan terrains.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

While terra incognita was downloading satellite I proceeded to transform OSM shapes to Terrain Builder readable 200,000/0 coordinates.

And again I'm suffering from editing excitement, I cant seem to be able to slow down to take screenshots. Hmph yeah I'm recording dev diary video all the time but its just somehow not the same, videos youtubes and whatnot's come and go, but PMC website, this webpage youre reading now is forever, this dev diary page and similar ones like it must be my focus, so more screenshots dammit Smiley ;)

Then global mapper assigned colors to OSM areas. This is still very new to me and I'm finding my way, developing that tool pipeline how to do it. Looks like I need to add more terrain types to PMC_Terrain_Data addon layers.cfg config file.

Next exported satellite mask, then ran GraphicsMagick bat file to convert RGB 255,255,255 to RGB 250,250,250 which is used in layers.cfg, heh yep a big difference Smiley :)

PMC Taiwan Kaohsiung ArmA 3 Screenshot

2021-10-09T07:37:00Z Terra incognita finished downloading NW corner, then started NE corner immediately, no time to waste, we got terrains to develop here.

2021-10-09T09:29:00Z Terra incognita finished downloading NE corner, then started SW corner immmediately, hey this is copy-paste country right here Smiley ;)

Cleaned up global mapper directories here, for example deleted PMC Mongolia satellite texture / mask images which took whopping 234gb. I managed to squeeze in 285gb free space for PMC DevSurf E: editing hard disk drive (HDD). Pretty good for a simple cleanup operation.

I would like to start the other taiwan terrains in global mapper but feel like it becomes too messy and confusing to write several dev diaries and especially recording videos for different projects as I want to keep them all separated. But I guess if I intend to document that 2017 year alike madness editing processes then I need to record 4+ projects in a single video.

Terra incognita seems to take about 2hrs per 45km x 45km corner piece for 81.9km terrain, so if they are prompty started to download next pieces in theory it takes roughly 8hrs to download whole thing, probably a bit more considering often times I cant keep up when download finishes or perhaps I'm sleeping while it happens etc. Obviously if you start downloading in the morning then you have no problems finishing one 81.9km terrains satellite imagery within a day. Heck if you really push it you could download two of them (last corner piece would start dowloading before you go to bed at night). Aaanyways.

2021-10-09T10:47:00Z Something came up, several things actually, but I cant focus on recording dev diary videos, writing this text and edit at the same time, its also getting quite late for my day (been up about 15hrs now) so I'm going to call it a night right now for Taiwan Kaohsiung editing. I'm going to download terra incognita satellite imagery "off the books" tonight before going to bed, so tomorrow we get to kick off some hardcore editing for sure. Kind of bummed out that have to call it a night so suddenly, but oh well what can you do.

ArcGIS satellite imagery Terra Incognita Black Tiles: Taiwan_Kaohsiung_81km_1_arcgis_17_level

2021-10-09 Satellite Editing

2021-10-09T21:24:00Z New editing day has started. This day scares me, I'm planning on editing two or more terrains at the same time. Taiwan Kaohsiung has progressed good way already, Taiwan Penghu has only its satellite imagery downloaded so far and who knows what other terrain I get to start before this day is over. Problem with this is to write these dev diary texts, take screenshots and capture video without completely lose focus what-is-what. When terra incognita is downloading satellite imagery or some other long duration process is running it feels so wasted time to just sit there and wait when I could be editing something else on the side, this is why its so great to edit several terrains at once. Now with dev diary writing and video capturing... ugh not sure if I can do it, but I'll give it a try, lets see what happens.

Used irFanview to go through all sat_*.png satellite texture tiles and wrote down full ocean tiles, coastline tiles and tiles with clouds in them. Also wrote this into my tool pipeline as a step, even if you have landlocked terrain you still need to go through tiles to check for clouds.

Terra incognita re-saved oziexplorer images for Taiwan_Kaohsiung_81km_1_arcgis_17_level which fixed the two black tiles on it.

2021-10-09T22:31:00Z In between here created PMC Taiwan Chiayi terrain, started its terra incognita download which is going to take at least 8hrs, so good to have that running in the background while I'm working on PMC Taiwan Kaohsiung terrain Smiley :)

Multitasking dude, thats how we roll Smiley ;)

I really don't like this dev diary and video recording bunny hopping, but now that terra incognita is doing its thing for 8 whole hours I'm okay.

Next step here was to GIMP edit all the full ocean, coastline and cloud tiles. There were few nasty cloud groups which will be difficult to clone stamp tool brush but gotta do it. First I'll create ocean seed tile and bat file to copy it over to rest of the tiles.

2021-10-09T22:40:00Z Full ocean tiles done and copied, then started to GIMP hand edit those coastlines and clone stamp tool brushing clouds, oh man this will take a while ... Smiley :(

First coastline tile I opened, sat_A1 was just horrible, there was wave breaker / barrier whatever its called, landmass and then another set of ocean water kind of harbor like areas, so making free hand selection for those is going to be total bitch. Decided right away to cheat and skip this painstaking work, I'm just going to create free hand selection to the outer edge of land. Maybe I'll come back to fix it when some boring moment arrives later today, but for now I'm not going to start with such painful task.

Here is the tile open in GIMP, you can see how nasty coastline this is.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

And I quickly did simple selection for it, this is how rough and simple it looks.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Did several of these coastline tiles with low precision free hand selection, didn't feel good about it. Then I ran into some very bizarre harbor situation, there was satellite imagery patch where two different sets of images merge and ... well dunno how to explain it other than to show a screenshot.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Looks like very unfortunate event with two sets of imagery, no idea how that harbor piece is in real life, need to check this location from google/maps maybe there is an intact image of it.

Right now I just did free hand selection to this image approximating the harbor shape, its the best I can do.

2021-10-09T23:27:00Z Finished simple coastlines. I'm already thinking that because these "simple coastlines" arent instant or automatic, that if I spend ANY time doing coastlines... why not just do them precisely in the first place, if I do simples now just to get stuff in-game and then come back later and do the precise selections ... the whole combined time is WAY more than doing it normally meaning precisely in the first go. Hmm indeed. But.. well, yeah... Smiley ;)

Then was the clouds, ugh, I love overcast cloud cover in real life as they block the Big Satan on the sky, the Sun, but in arma3 satellite images... I hate them, with a passion Smiley :)

It has been truly painful to clone stamp tool brush these clouds off as I hate do create fake satellite imagery, but what can you do, white puff of cloud looks atrociously bad in-game so anykind of generic terrain mush instead is much better. Not an idean solution but... until you get perfect satellite imagery its what you have to do, you don't have to like it, just get it done Smiley ;)

2021-10-10T00:54:00Z All satellite texture tiles fixed for full ocean, coastline and clouds. Aayeah, uuh! Smiley ;)

Then it was graphicsmagick darkening time. Also in this screenshot you see Taiwan Chiayi satellite being downloaded.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

2021-10-10T01:21:00Z Downloaded GEBCO ocean seabed ASCII Grid ASC elevation data, merged it with SRTM elevation data in global mapper and exported new ASCII Grid heightmap.asc file. Then imported this new ASC into terrain builder, looks good. Then started to import satellite mask.

2021-10-10T02:17:00Z Terrain builder finished importing satellite texture and mask.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Then started to generate layers, this will take a while again.

2021-10-10T03:30:00Z Finished generating satellite texture, begun satellite mask generation.

2021-10-10T04:42:00Z Forgot to timestamp earlier, now Convert Layers PNG to PAA Fast bat is almost finished.

2021-10-10T04:56:00Z Now _data_layers\ RVMAT re-pathing with moveObject is running, this terrain project is just about ready for pboProject binarizing. However I am not going to do that next, there is no rush, I just wanted to get all the base files and directories done now. But yeah this project is looking pretty good now, not much BULK work to do anymore.

And yes I used "this project" term because I still havent memorized this terrain name let alone its spelling Smiley :D

2021-10-10T05:10:00Z RVMAT re-pathing finished.

2021-10-13 Terrain Processor Objects

2021-10-13T23:59:00Z New editing day has started, copied Terrain Processor TPP Templates sample files in and started editing them to suit this terrain.

Used Terrain Processor to run smooth roads task on the heightmap, imported road smoothing new heightmap into terrain builder and rebuilt terrain, then copied Terrain Builder Template Libraries over and imported them in.

Took sample terrain processor stratis forest objects generate TPP and edited it for our shape files and hectare density 1 for preview purposes, then ran that preview. Terrain processor generated 569k objects, which means we can use 17 hectare density while keeping objects below 10 million. That 10 million is not a terrain builder limit, but recently I had some issues importing more than that with single terrain processor LBT file, so I'll try to keep object layers below 10 million each.

2021-10-14T00:12:00Z But now its lunch time, I'm starvin' ...

2021-10-14T00:42:00Z Feeding time over, back to editing.

Terrain processor generated 7.041 million objects, hmm maybe I should have used forest hectare density of 18 or maybe even 19, oh well, next time then. Then imported objects into terrain builder.

2021-10-14T00:58:00Z Exported WRP, ran moveObject for the WRP and saved project. We are ready for pboProject binarization (PMC Editing Wiki: search "binarize").

2021-10-14T14:30:00Z It was getting late night for me, started pboProject to binarize, if it takes as long as taipei then its going to be probably around the time I wake up tomorrow when this finishes. I didn't plan on starting pboProject but decided that why not, lets use the overnight computer downtime to our advantage.

2021-10-14T15:12:00Z Hmm pboProject binarizing finished, ALREADY? Smiley :o

I don't get it, yesterday PMC Taiwan Taipei took 10hrs, what is different here... makes no sense, hmm hmm.

2021-10-21 Config.cpp Editing

2021-10-21T11:08:00Z Back editing taiwan stuff. Added RoadsLib.cfg from root master location using symlink.

Fixed pmc_names.hpp for class names not being UTF-8, I had a bug in PMC OSM Places CSV2HPP Converter which I fixed as well.

2021-10-28 Roads Full Of Bugs

2021-10-28T19:18:00Z Time to edit kaohsiung, bug reports list that roads are still narrow dirt/gravel type so I believe those got fixed previously today in global mapper and now I just need to pboProject binarize _data.pbo to get them in-game, so that's what I did now. Next is in-game test.

Checked in-game and yeah, dirt/gravel roads, uh whats up with that heh, ok investigation continues. Loaded roads.shp from _data addon dir into global mapper and sure enough ID was 3 which is narrow dirt/gravel road, changed it now to ID 1 which is asphalt 10m width road type. Time to pboProject binarize and verify in-game that its been fixed. In-game check shows 10m wide asphalt roads, we are all good here, another bug fixed.

2022-04-04 New Year New Problems

2022-04-04T13:21:00Z New editing day has started, actually its editing YEAR heh.

Yep it was october 2021 when I created PMC Taiwan Kaohsiung (ugh that spelling) terrain, much has happened since but now its time to get this terrain released. Todays plan is to inspect in what stage this terrain is, do any critical bug fixes and then release. I'm hoping to get this released today.

I already released PMC Ukraine Sumy just literally few minutes ago and now attacking the next terrain on the list.

Finished reading this dev diary and it sounds like usual terrain jargon, nothing out of the ordinary, to me.

As usual started with arma3 in-game check to get my bearings. Bugs/issues list did have heightmap stuff for airfields and water creeping to the land, so I'm expecting quite rough terrain condition.

When seeing terrain in arma3 first thing I noticed was that surface mask pixel resolution is probably 1024 or maybe even 512, not sure, this causes the zoomed out 2D mapview to be "mosaic" garbled, its a known arma3 bug. However changing surface mask size means a complete satellite texture/mask generate layers operation plus binarizing, its no small thing to do.

I already had listed in my 00.txt real world data terrain tool pipeline file that roads.shp needs to be terrain builder imported/exported, and indeed it was the case, roads.shp is all broken up in arma3.

There are two airfields which need runway poly lines and L3DT smoothing.

Coastline looks pretty bad currently. Its not GIMP selected accurately or that GEBCO data messes it up and water creeping into the land, its just a mess.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Luckily with my new tool pipeline for water creeping into the ground, this can be fixed automatically now.

2022-04-04T14:08:00Z Created Terrain Builder Keypoints for four airfields. Was actually surprised to see that many of them.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Next created airfield runway poly line shapes.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Then exported airfield_runways.shp shape file to pmc_taiwan_kaohsiung_data\roads\ directory next to the roads.shp file. Next used global mapper to open airfield_runways.shp, added ID 7 and ORDER 0 umm feature values to them. Exported shape file out. Then opened roads.shp and merging the two shape files, then exported roads.shp shape file out again.

Then in terrain builder imported roads.shp shape file.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

Finally exported roads shape layer to pmc_taiwan_kaohsiung_data\roads\roads.shp shape file.

Fun, isn't it? Smiley :)

Next exported WRP because I need the keypoints .hpp updated for config.cpp class names{} pmc_names.hpp config file.

Then was the big step of fixing the water creeping into land heightmap.asc issue. This requires global mapper, PMC Heightmap Clipper and L3DT editing.

In global mapper dir I had no temporary work files left, only GIMP satellite texture and mask XCF source files for the tiles I edited myself, this includes clouds and coasts.

When loading the project in global mapper there was several files missing, GEBCO ocean ASC heightmap file, basic heightmap.asc too. Also this is a very odd project because there is no standard user created feature grid for the terrain area, just taiwan_kaohsiung.shp file, apparenly I had to align all the taiwanese terrains next to each other without overlap and this shape file method was the only way to keep accuracy. Don't really care for it, .shp file as terrain grid location doesn't behave the same way as the user created feature grid. But oh well what can you do.

Managed to restore working global mapper project file without errors, with the location grid present.

For the ocean coastline water creeping into land fix I need to export satellite mask images. Cleaned out OSM area shape cliff and nature_reserve types which I don't use.

Started to work on the water creep fix which is several steps using the mentioned tools. Then had to export satellite mask in 8 x 8 grid tiles setup as those are needed for the coastline selection work.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

And then it was waiting game until global mapper has done exporting these tiles. Once done I continued the water fix thing, created map catalogue for the Sat_Mask_??.png images and then started the next step in tool pipeline.

PMC Taiwan Kaohsiung ArmA 3 Screenshot

It does some ... err, area, something heh dunno exactly what, I'm just following (my own) orders here Smiley ;)

Then used GIMP to open each of the coastline XCF images and equivalent Sat_Mask_??.png image, then copy-paste the blue ocean RGB color selection from XCF into PNG. This hopefully now created proper coastline mask tiles which can be used in this water creeping to land fixing thing.

At this point my editing motivation, mental energy was all time low, it wasnt physical tiring but just burnout, boredom, no will to edit. I proceeded basically as this task was already underway and had no better ideas what to do. I edit terrains because I love it, but right now my mood is like doing a dirty manual labor chore, this is not fun at all.

Was thinking about switching to play arma3 a bit, or perhaps even Farming Simulator 19 (cant do FS22 as my GPU dies on direct-x 12), but dunno as that would be a major switch in my current editing cycle, I surely wont be editing arma3 and playing farmsim the same day.

Its not fun to be in computer editing work burnout mode, but there is nothing I can do about it with COVID-19 preventing holidays etc so, I'm shit outta luck.

Global mapper finished doing that last finding areas thing... but there was few non ocean tiles, even though I did fix all the full ocean tiles. Huh what gives. Got those fixed by re-creating the map catalog file.

2022-04-04T16:19:00Z Global mapper... crashed. Oh wow, yeah I'm done here, my motivation is all time low by default and now software is crashing, yeah no thanks, I'm off to watch TV or cat videos from youtube all I care, sigh Smiley :(

(cat videos from youtube is a running joke, if you are bored beyond belief you resort to watching such shit videos with blank look on your face, when you want to explain to someone how extremely bored you are, just say "cat videos from youtube" and they'll know).

2022-04-05 Initial Release Day

2022-04-05T12:19:00Z New editing day has started. Its not looking very promising today either, not much motivation to continue especially after yesterdays global mapper crash which lead to me taking rest of the day off, just watched TV and wasted time.

Now... yeah motivation is low, mood is like "blah", but deep down in my core there is still will to finish what I started, get this terrain ready and released.

So now I'm going to restart the global mapper heightmap water creeping to land fix part of the project. Lets see if I manage to get through it Smiley :)

Not going to record videos or take screenshots of this global mapper editing session as there was plenty from yesterday.

2022-04-05T12:31:00Z Funny that just minutes ago I was saying have zero motivation, but now I'm already kicking off creation of web pages while global mapper is busy processing "finding areas" thing Smiley :)

Yeah I don't want to waste any time, ETA for global mapper's task to finish is almost 10min from now, that is plenty of time for me to do the base kaohsiung web page files and update sitemap.

And hah, just as I got the template php files created, global mapper finished (like 2 min after writing the above) Smiley ;)

Oh well back to working on the heightmap I guess heh.

2022-04-05T12:44:00Z Global mapper crashed, AGAIN Smiley :o

Hmm ookay... so this is not going to work I guess.

Hmm going to try one more time after tweaking some things (one grid had 2 features instead of 1). But if that fails, well then the coastline water is what it is.

Negative, no go. Still crashes.

Oh well guess the coastline sucks in this terrain then until I manage to fix that. Going to write a bug/issue report about it and figure out lateron.

Launched global mapper one more time to clean up the project a bit, don't want to leave half finished work in there.

Moving on to a next fix, L3DT heightmap fixes for airfield runways, okay this is going to work well.

2022-04-05T13:03:00Z L3DT airfield runway heightmap smoothing done. Actually I think by accident I found two more extremely small airstrips in there, hmm.

Terrain builder imported heightmap, rebuilt terrain, removed this new heightmap raster layer, exported WRP, saved project and exited. Then ran moveObject re-path WRP and ... well then we are ready for another binarization.

2022-04-05T13:09:00Z Started pboProject binarization, now we continue editing the web pages. Gotta use every minute to edit Smiley :)

2022-04-05T13:33:00Z Well basic web pages are done now, just need the text info content and screenshots. Already did changelog page, only thing missing is the release line. This dev diary is still written in "localhost" text file, will hold before moving all this text to the actual web page, just easier to write now as plain text instead of proper html.

Now waiting game continues, binarize has mouthful of WRP addon and all I got to do is, wait...

Once binarize was done I checked arma3 in-game and airfield runways are all nice and smooth now with poly lines, also class names{} for airfields is in place and roads.shp has been fixed.

2022-04-05T13:55:00Z At this point there is not much can be done (with crashing global mapper) so I'm starting release procedure Smiley :)

Added pmc_taiwan_kaohsiung terrain class name into PMC "worldSize" mission pack compile bat, now we got some single player (SP) missions.

Updated mod.cpp with tweaked google/maps link and more accurate terrain info, also moved name property to first line which will fix some bis arma3 launcher issue (launcher which you should never ever use).

Created bisign keys for the addon pbo's.

2022-04-05T14:30:00Z Finished 7-zip packing the official v0.1 release .7z packet. Need to follow my release procedure list and now move this dev diary text to the actual web page so I can patch in smiley images.

2022-04-05T14:35:00Z Dev diary page smileys added and now begins the long adding of screenshots and links, then proof reading to make sure this is decent for public reading.

2022-04-05T15:45:00Z Proof reading, link adding and verifying that images work is now done. Small break to strech my legs and then its go time for the release.

2022-04-05T16:17:00Z PMC Taiwan Kaohsiung v0.1 has been released! Smiley :cool:

PMC Taiwan Kaohsiung: Changelog, Dev Diary, Screenshots. Back to PMC Terrain's page.