User Tools

Site Tools


arma3:terrain:zgm-road-painting-in-global-mapper

Road Painting Source Files For Global Mapper

ArmA 3 Terrain Road Painting in Global Mapper and Source Files by ZeroG

As this took me a whole Sunday to figure out, I thought I'd release it so that you guys save some time. First of all: credits to Atsche and M1lkm8n who were my precedessors in this case. Now, lets start:

Global Mapper was used with these sourcefiles! The whole road creation process is possible with the free QGis as well, yet these files are meant to be used with GM

1. Open up ZGM_A3Roadpainting.gmw with GM. You will see:

It is a 20480 x 20480m road map, georectified to the coordinates A3A is using atm (I haven't figured out a way to do it with other (my original project for example) coordinates - yet. But for the game, it doesnt matter - its just more work and time I try to save you here )

So, to use your own map or reference image, simply open up 20480x20480RECTIFIED.png and paste your own image on top of it.

If you have a smaller map (10240×10240 or 5120×5120 etc.), just make sure it still fits into the initial measurements, while the origin gotta be in the left bottom corner. Simply leave the unused part of the map blank white:

If you change the name of the reference file, the GM project will ask your for the file's whereabouts.

What also is enabled in my project is the geogrid which helps to orientate. If you keep it enabled, A3 - funnily - will paint dirt roads along it (as it identifies the grid as an undefined line/road). You might not want this in game but for georectifying an image, it is (was, because you can use my file now) very helpful!

2. You can immediately start with painting your own roads. You will see one example road named 1, spanning over the whole map (yeah, it is one of the famous Autobahns with no speed limit which all of you guys except Germans are jealous about )

I created it by clicking on the DIGITIZER and then CREATE NEW LINE FEATURE (VERTEX MODE). When completed, after the rightclick, GM will ask for the attributes, while you have to enter the following 4:

__LAYER

Haven't seen the influcence for now, can be Roads, City Roads, Path (or something else?). Seems to be a Visitor 4 shape layer description

ID : The type of the road, 1:1 of what is defined in roadslib.cfg:

class RoadTypesLibrary
{
    class Road0001
    {
     width = 30;
     mainStrTex      = "a3\roads_f\roads_ae\data\surf_roadtarmac_highway_ca.paa";  // lowercase!
     mainTerTex      = "a3\roads_f\roads_ae\data\surf_roadtarmac_highway_end_ca.paa";
     mainMat         = "a3\roads_f\roads_ae\data\surf_roadtarmac_highway.rvmat";
     map             = "main road";
     AIpathOffset = 3;
    };
    class Road0002
    { 
	 width = 15;
     mainStrTex      = "a3\roads_f\roads_ae\data\surf_roadtarmac_main_road_ca.paa";  // lowercase!
     mainTerTex      = "a3\roads_f\roads_ae\data\surf_roadtarmac_main_road_end_ca.paa";
     mainMat         = "a3\roads_f\roads_ae\data\surf_roadtarmac_main_road.rvmat";
     map             = "road";
     AIpathOffset = 2.5;
    };
    class Road0003
    {
	 width = 7.5;
     mainStrTex      = "a3\roads_f\roads_ae\data\surf_roaddirt_road_ca.paa";  // lowercase!
     mainTerTex      = "a3\roads_f\roads_ae\data\surf_roaddirt_road_end_ca.paa";
     mainMat         = "a3\roads_f\roads_ae\data\surf_roaddirt_road.rvmat";
     map             = "track";
     AIpathOffset = 2.5;
    };	
	class Road0004
    {
	 width = 10;
     mainStrTex      = "a3\roads_f\roads_ae\data\surf_roadconcrete_city_road_ca.paa";  // lowercase!
     mainTerTex      = "a3\roads_f\roads_ae\data\surf_roadconcrete_city_road_end_ca.paa";
     mainMat         = "a3\roads_f\roads_ae\data\surf_roadconcrete_city_road.rvmat";
     map             = "track";
     AIpathOffset = 2.5;
    };
	class Road0005
    {
	 width = 5;
     mainStrTex      = "a3\roads_f\roads_ae\data\surf_roaddirt_path_ca.paa";  // lowercase!
     mainTerTex      = "a3\roads_f\roads_ae\data\surf_roaddirt_path_end_ca.paa";
     mainMat         = "a3\roads_f\roads_ae\data\surf_roaddirt_path.rvmat";
     map             = "track";
     AIpathOffset = 2;	 
    };
};

So, currently possible are values from 1 to 5, the first giving you a Highway, the latter a Path.

If you want to change the width, you can! As the config seems to be something like a road painting instruction for A3, you can easily play around with the width value and create new types of roads, like I for myself created a bike lane with the Highway texture :

ORDER : Thanks to Milkman, we now know this value determines which road gets laid on top at crossroads. A smart idea would be to give the biggest roads the highest numbers, like: Highway > City road > Path (1 > 2 > 3 > …)

__ID : Enter a number here that allows you to identify the road and separate it from the others, especially later when there are lots of them. You may also enter that value at the NAME spot on top.

3. Now, when you are done with road painting, you gotta export them to your A3 map. Simply click FILE > EXPORT VECTOR FORMAT > SHAPEFILE > EXPORT LINES and then select a filename which has to have the same name and path as in your map config line you have to add/modify:

newRoadsShape = "\YOURMAP\data\roads\roads.shp";

After selecting file and path, you can just press OK. Don't worry about the other checkboxes yet, I have played around with them and for the method we are using here, you can use the default setting.

4. You are almost done - just pack the island now. You can also use cpbo for that instead of BinPbo, as I found out. That is especially great if you want to change only small things regarding the roads, thus it packs the map in seconds.

5. Enjoy your roads ingame. I posted some example pictures of how exact road placement is (don't wonder about the odd texture colors: I use a topography map for object placement):

Download ZGM_ArmA_3_Road_Painting_Source_Files_For_Global_Mapper.7z from Torrent Magnet:

magnet:?xt=urn:btih:be99aed43b34742f8f6279b29e37b1d70d61b331&xt=urn:btmh:122032a11427d61eda68f8a63d0e8c49114e4a13366c02de2a7bdaf39b70377ff51e&dn=ZGM_ArmA_3_Road_Painting_Source_Files_For_Global_Mapper.7z&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce
arma3/terrain/zgm-road-painting-in-global-mapper.txt · Last modified: 2024-03-19 08:37 by snakeman