Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Map editor questions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Armored Brigade >> MODS and Scenarios >> Map editor questions Page: [1]
Login
Message << Older Topic   Newer Topic >>
Map editor questions - 11/9/2019 12:20:03 AM   
Fishbreath

 

Posts: 55
Joined: 2/2/2012
Status: offline
I have a heightmap bitmap I generated from NED data that I'm using for a map I'm working on. Inspecting the bitmap file generated from Dmitriy's QGIS style file, it seems accurate, in the sense that a point that my source data says is 57 meters above sea level has the color value (57,2,16), which matches the scheme in the North-East Italy map.

However, when I have Armored Brigade in map editing mode, the terrain type/elevation tooltip says that the lowest point in the 15km square I'm editing is 0 meters, and all other heights are relative to that. Is that something to do with map editing mode, or am I missing a step in the heightmap generation or map creation?

Also, how does the lights.png file work? Is it just an overlay on the map at night, or is there more to it than that?
Post #: 1
RE: Map editor questions - 11/9/2019 4:28:04 AM   
CCIP-subsim


Posts: 695
Joined: 11/10/2015
Status: offline

quote:

ORIGINAL: Fishbreath
I have a heightmap bitmap I generated from NED data that I'm using for a map I'm working on. Inspecting the bitmap file generated from Dmitriy's QGIS style file, it seems accurate, in the sense that a point that my source data says is 57 meters above sea level has the color value (57,2,16), which matches the scheme in the North-East Italy map.

However, when I have Armored Brigade in map editing mode, the terrain type/elevation tooltip says that the lowest point in the 15km square I'm editing is 0 meters, and all other heights are relative to that. Is that something to do with map editing mode, or am I missing a step in the heightmap generation or map creation?


I think the way this works is as the tooltip suggests - the game does not show absolute height, but instead will take the lowest point of the map as 0 regardless of its actual height (colour) as per the height map. I'm not sure exactly why this is done - but I suspect it may be simply to do with how the AI reads the height map.
One thing you can always do is create some labels at key elevation points (e.g. hills) and cross-check their relative heights to see if the height map is accurate or not.


quote:

Also, how does the lights.png file work? Is it just an overlay on the map at night, or is there more to it than that?


The short answer is yes! It's a simple overlay. The nice thing about it is that it is a 24-bit PNG, so you can do things like coloured lighting or fog. However, it is not animated, and only appears at night - and, to my knowledge, has no actual effect on anything mechanically.

You can take a look at an example of what can be done with the lightmap file alone with this mod that I've made: https://www.matrixgames.com/forums/tm.asp?m=4670636 (where I added some coloured lights, mist, and light pollution).

(in reply to Fishbreath)
Post #: 2
RE: Map editor questions - 11/9/2019 2:06:38 PM   
Fishbreath

 

Posts: 55
Joined: 2/2/2012
Status: offline
quote:

I think the way this works is as the tooltip suggests - the game does not show absolute height, but instead will take the lowest point of the map as 0 regardless of its actual height (colour) as per the height map. I'm not sure exactly why this is done - but I suspect it may be simply to do with how the AI reads the height map.
One thing you can always do is create some labels at key elevation points (e.g. hills) and cross-check their relative heights to see if the height map is accurate or not.


Since there are some hill heights on the OpenStreetMap layer for my area of interest, I was able to verify that the relative heights are accurate. If the game uses the low point on the map as the zero reference, that's fine—I just wanted to make sure I wasn't losing information somewhere.

Thanks for the pointers on lights.png, as well as your work on the Chechnya maps and database—excellent work all around, and if I hadn't been bitten by the mapmaking bug I would probably be playing those scenarios.

(in reply to CCIP-subsim)
Post #: 3
RE: Map editor questions - 11/10/2019 10:57:38 PM   
CCIP-subsim


Posts: 695
Joined: 11/10/2015
Status: offline
Cheers, hope that helps!

Map making can definitely turn into a bit of a habit I will say that it's a lot more time-consuming than I thought it might be - but we could sure use more good community maps for AB!

(in reply to Fishbreath)
Post #: 4
RE: Map editor questions - 11/11/2019 2:21:06 PM   
Fishbreath

 

Posts: 55
Joined: 2/2/2012
Status: offline
I'm working on Fort Benning at the moment, which is ironically turning out to be terrible tank country. Like a moron, I chose a 40km region and said, "This shouldn't be too hard!" I'm almost done with the first 15km square, and I think I'll put out an initial release with that much sometime this week—only a little bit more terrain to paint, then labels and a preview image which highlights the part of the map that's actually done.

e: while I have your ear, what did you do for heightmap smoothing? I tried a few QGIS smoothing effects on SRTM data, but wasn't able to get a decent result, and ended up using the USGS surveying data I mentioned in the first post, which is obviously not a workable solution for most of the militarily interesting parts of the globe.

< Message edited by Fishbreath -- 11/11/2019 3:31:54 PM >

(in reply to CCIP-subsim)
Post #: 5
RE: Map editor questions - 11/11/2019 6:22:13 PM   
tebeinteresno


Posts: 108
Joined: 7/28/2015
From: Russia
Status: offline

quote:

ORIGINAL: Fishbreath
e: while I have your ear, what did you do for heightmap smoothing? I tried a few QGIS smoothing effects on SRTM data, but wasn't able to get a decent result, and ended up using the USGS surveying data I mentioned in the first post, which is obviously not a workable solution for most of the militarily interesting parts of the globe.


You can use that tool for heightmap what I mentioned in the map making tutorial.
It can smooth and convert height data very well.

quote:


2) using software

This program was made by Juha so that you can quickly convert the elevation map in the correct format. The only difficulty is that it is launched through the Windows command line, so if you are not experienced in this matter, then you may have very minor difficulties.

- First you need to download it HERE
- copy into something like C:\1 to some simple folder
- now to launch it, click Win + R and the launch window will open and enter the command “cmd” there so the command line will be launched
- now enter the command C: \1\convertheight.exe or simply drag the downloaded .exe file into the command window
- if you press enter, then most likely the program will give an error
Invalid arguments, should be <input> <output>. Optional: -sca <scale> -min <minimum> -smo <smooth>
This means that after the command you need to add the name of the file that is the source, the name of the file that will be in the end and you can also add the necessary optional attributes:
-sca - the number of transitions of the red channel, that is, how many times the height will pass the mark of 255 meters. To find out, then subtract the minimum height from the maximum height and divide by 255.
-min - the minimum height in the sector to correctly display the height reference point
-smo - level of relief smoothing. SRTM data is often quite noisy, so to get rid of this point, you can add smoothnes. Very useful option
- download your sector-relief image in bmp format to the program root folder.
- now we need to add data and the command will look something like this: C:\1\convertheight.exe file1.bmp height.bmp -sca 7 -min 215 -smo 1

Clicking on Enter you start the process and the final file will appear in the folder where the program is located.


(in reply to Fishbreath)
Post #: 6
RE: Map editor questions - 11/12/2019 1:54:44 PM   
Fishbreath

 

Posts: 55
Joined: 2/2/2012
Status: offline
I gave it a try, but I'm not quite sure how to export the elevation data from QGIS so that ConvertHeight can process it correctly. It doesn't seem to process GeoTIFF files, and if I convert a (grayscale) GeoTIFF to a bitmap, the resulting ConvertHeight output is incorrect, using colors which don't map to the right elevations.

Starting from a heightmap raster layer in QGIS, what steps do I need to take to use ConvertHeight?

(in reply to tebeinteresno)
Post #: 7
RE: Map editor questions - 11/14/2019 8:56:49 AM   
tebeinteresno


Posts: 108
Joined: 7/28/2015
From: Russia
Status: offline

quote:

ORIGINAL: Fishbreath

I gave it a try, but I'm not quite sure how to export the elevation data from QGIS so that ConvertHeight can process it correctly. It doesn't seem to process GeoTIFF files, and if I convert a (grayscale) GeoTIFF to a bitmap, the resulting ConvertHeight output is incorrect, using colors which don't map to the right elevations.

Starting from a heightmap raster layer in QGIS, what steps do I need to take to use ConvertHeight?


ok, could you send to me your GEOTiff file and I will try to describe every step what I do for that.
At least it will be useful for everyone and mb I need to revise some steps in map making tutorial to make less troubles to others.

(in reply to Fishbreath)
Post #: 8
RE: Map editor questions - 11/15/2019 12:55:38 PM   
Fishbreath

 

Posts: 55
Joined: 2/2/2012
Status: offline
Here it is.

(Thanks for the guide, by the way—I wouldn't have gotten half as far as I have without it.)

Attachment (1)

(in reply to tebeinteresno)
Post #: 9
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Armored Brigade >> MODS and Scenarios >> Map editor questions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.797