Difference between revisions of "Create AAR Maps"
Views
Actions
Namespaces
Variants
Tools
(All of the changes) |
m (Removed useless piece of text and replaced with additional info) |
||
Line 11: | Line 11: | ||
'''!!MAKE SURE YOU RUN LAUNCHER AS ADMIN''' | '''!!MAKE SURE YOU RUN LAUNCHER AS ADMIN''' | ||
2. Use EmfToPng.exe to convert (use default setting, | 2. Use EmfToPng.exe to convert (use default setting, exportedMapName is the name of the .emf you just created) | ||
<code>command: EmfToPng.exe exportedMapName.emf 1</code> | <code>command: EmfToPng.exe exportedMapName.emf 1</code> |
Latest revision as of 15:01, 20 January 2023
This page will describe how to create map layers for the vAAR system.
Prerequisites
- EmfToPng.exe (Can be found in #development)
- OsGeo4W (https://trac.osgeo.org/osgeo4w/)
How To
1. Use Arma to generate a .emf file (https://community.bistudio.com/wiki/ArmA:_Armed_Assault:_Cheats#Example_export_procedure_for_Arma_3)
!!MAKE SURE YOU RUN LAUNCHER AS ADMIN
2. Use EmfToPng.exe to convert (use default setting, exportedMapName is the name of the .emf you just created)
command: EmfToPng.exe exportedMapName.emf 1
3. Using MS Paint, trim out the black borders and make the map square (X and Y are the same)
4. resize the image using the table blow. Scale to closest lower number.
Zoom Level | Pixel Size |
---|---|
0 | 256 |
1 | 512 |
2 | 1024 |
3 | 2048 |
4 | 4096 |
5 | 8192 |
6 | 16384 |
7 | 32768 |
8 | 65536 |
4. Take the original square dimensions, and divide it with the selected scale in the format: <Scale>/<original size> the remainder is the multiplier (E.G: 16384/20480 = 0.8)
5. Convert the .png into a .vrt
command: gdal_translate -of VRT -ot Byte "TerrainName.png" "TerrainName.vrt"
6. Bring both the .png and the .vrt back to be tiled.
command: gdal2tiles -p raster -w all --xyz -z 0-6 -v "TerrainName.vrt"
!! IF you see the error ".png not found" or similar, you dont have the .png that was used to make the .vrt, as it is referenced when building the tilemap !!
!! IF you see an error that the .vrt needs rgb/rgba then your .png was saved using a different program than MSpaint. (Paint.net WILL NOT WORK)!!
!! CHECK the foler '0' to ensure the scale and image was rendered correctly.
7. Create a map.json file with the following template:
{
"name": "Altis", //name of the map
"worldname": "Altis", //world name or "real name"
"worldSize": 30721, //OG world size
"imageSize": 16384, //Selected zoom level size
"multiplier": yourMultiplierHere //the multipyer you got from (<Scale>/<origonal size>)
}
8. Zip up the file and send it in the #development channel.