====== ZGM ArmA 2 Terrain Tutorial Part 1 ====== [[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]] //Some images are missing from this tutorial.// Here is ZGMARMA2_Map_Making_Tut_PART1_2.7z file which may be associated with this tutorial heh, download from OFP-ArmA.Tutorial.Include.Files.2024-03-19/ Torrent Magnet: magnet:?xt=urn:btih:3f74bfb31d795d124ff0a3b2d5c98c7b7c7da3c6&xt=urn:btmh:1220322d34f3fe96c02e4baa798c17198f84aa1bd98e544214e18ce4ab9d4f39457c&dn=OFP-ArmA.Tutorial.Include.Files.2024-03-19&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce ====== Step 1: Heightmap ====== Step 1: acquire, convert and import a real life heightmap Get a DEM (Digital Elevation Model) of your desired area on the planet. You can find these files anywhere on the web. However, personally, I recommend a NASA website from the ASTER project, as the data from this project has a fairly high resolution and its totally free of charge. To get a better resolution, you have to pay quite a lot. The acquisition of the data is easy to understand. You have just to go through the registering process and the rest is self-explanatory: select your desired area and download the data for it... Aster gdem explorer 1 Aster gdem explorer 2 You will most likely get "Silc Tiff" files after the download, which are named: astgtm_nxxexx_dem, depending on your desired area. Dump the "_num" files, you don't need them for the heightmap. For the conversion of these DEM-Tiffs to a Visitor-readable format, I recommend Global Mapper. In this tutorial, I use version 11: Execute Global Mapper, in main screen click open your own data files. Select all downloaded tiles (if you should have more than 1) and the program will automatically merge them. After that, the screen with the DEM will look like this: Go to Tools -> Configuration -> Projection and select UTM or Mercator. If you did it properly, the merged DEM should look somewhat like this now: Now you need to select a map area from this raw DEM. To do this select the digitizer tool (pen icon): Then do a right click right on the DEM, in the appearing context menu you select create area shapes, then create rectangular/square area (specify coordinates). The following dialog opens up: You go for corner w/ Size - Global Projection (UTM - meters). Now you have to decide how big your ArmA 2 map shall be and enter the according values in the Width and Height field. Note that this has to be an exponentiation of 2. I recommend one of these values: 5120x5120 (~25km²) 10240x10240 (~100km²) 20480x20480 (~400km²) For a comparison: Chernarus is 15x15km i.e. 225km², while Takistan is 13x13km i.e. 160km². When you close this dialog, a naming dialog appears. Name the square area the way you want. The screen should look like this: What you want to do now is to move that square to the area we want to have it. At first, you un-hide the so-called vertices of the square. Do a right click and in the context menu, select the bottom option show area and line vertices. Now you can move the square where ever you want it to by selecting the whole square with the mouse and left click, then a right click and selecting move area feature from the context menu: To get a better idea where your selection is located in real life, click on download online data (globe icon): In the upcoming dialog, I recommend you select open street maps. Your screen then: Now select your desired area by moving the square into according position. For exporting the underlying height data into a visitor-readable format, you have to keep the square area selected, go to file, then export raster and elevation data and the export xyz grid. The following dialog will open up: In the options tab, select space under coordinate separator and under resolution 10 meters both for X and Y axis. In export bounds tab, select the bottom option crop to selected area features. After clicking OK, a dialog to save the *.xyz file will appear. Now we want to import that *.xyz file into Visitor 3. In the main window, click on project, then open and in the following dialog you select *.xyz file and select the file you saved with Global Mapper. Depending on the file size, it might take some seconds now. Then the following dialog appears: Now you see that Visitor 3 exactly recognized the values we entered in Global Mapper; press OK. The result after some few more seconds and a zoom-out: The import is done! Now to convince yourself that everything worked properly: Global Mapper aster dgem Visitor 3 after xyz import Global Mapper open street maps ====== Step 2: Satellite map ====== Step 2: acquire and import real life satmaps After you have done the heightmap, you now need satellite textures that will be drawn by the game in bigger distances, i.e. on the horizon, while a HALO jump or flight in a plane. Note that a too detailed satellite map might look crappy in game, because you don't have all the infrastructure objects available to place them on the 2D real life images. So I recommend you either way to choose simple satellite maps (i.e. desert or little infrastructure) or simply use the original satellite images as a mask background mask for placing objects in Visitor 3 or the ArmA 2 3D-editor. The tutorial will focus on this topic later on. To get maps with a high detail level for free, you have to download them from a source like google, yahoo, bing or open street. These images are watermarked for copyright issues, but as you never choose the maximum detail, that won't harm you while in game. You also don't want to download thousands of tiles and stitch them together manually. There is a clever software that does the job for us! You need another third-party program now. It is called universal maps downloader. The next steps are quite simple: 1.Enter a task name of your choice. 2.Select the desired maps type. They have different benefits. For example, street maps are for sure nothing you would like to walk on in game..but for placing roads, large forests or place names, it will be of great help. Also some providers host satellite images that have been taken in the wintertime. This will make it easier for you to define where needle or leaf trees should be placed or hidden objects in the forest are located. Also interesting are hybrid maps. 3. For the zoom level, I recommend you not to take the maximum resolution. Otherwise, the merged image will get far too big to handle with other tools like photoshop or visitor on a normal users' PC. If you create a 20x20km map, I recommend you a zoom level that creates about 12100 tiles, which will be 17 in case of Google Satellite Maps. That's enough to work with, though you have to cut away exceeding tiles later on almost for sure. I experienced that zoom level 19 delivers an image that fits exactly, but requires a powerful CPU and lots of RAM to handle it in PS. 4. For the coordinates you have to get back to Global Mapper and look for the top left and bottom right corner vertice of the square you created in step 1. Select one vertice with a left click, then right click to open up the context menu and press set position of selected vertices. The following dialog will appear: When selecting geographic coordinates, you can simply copy the lat/long values and paste them into universal maps downloader. Do this for the top left and bottom right vertice of your square. Watch the correct values for lat/long: Now you just have to set your path to save. The threads count determines how many connections are uphold to the map provider. Increase this value if you don't want to wait until 12100 files have been downloaded. However, note that especially google might block your IP when you download maps with too many threads at the same time. Then you would have to wait for unblock. A good way to avoid this blockade is to reduce the threads count. It doesn't take too long after all, the result is just awesome and in the end you need patience in map making anyhow. Press START. After the download process is finished, you should go for tools and then re-download failed images. When you download 12100 files, there might be some which don't get transferred properly. Then stay in the tools section and select map combiner. After selecting the project name and folder, your 12100 files get merged to one big satellite image Open up the image in a powerful editor like photoshop. Now compare the map edges carefully, if they end on the same spots like your defined 20x20km square does in Global Mapper, using the OPEN STREET MAP view there. Most likely, the big downloaded file from UMD will be a little too big because the map tiles do not end on the spots you defined of course. How could anyone have known your square selection when cutting the tiles for the map server? So just cut away the stuff that's not meant to be there and you are good to go. As stated before, if you used zoom level 19 in the downloading process, your image should fit almost exactly. After that, split the image in the middle and save the both halves as *.bmp files. Go back to Visitor 3. In the dialog box on the right select background images. Press new image. In the following dialog, choose your desired name and select one of the two previously saved files. Choose the bottom image file first and fill in these settings (in case your map is 20x20km): For being able to align it to the height map properly later on, choose a fairly high transparency between 60-80%. Then click OK. Do it for the top image file in the same way, setting placement X=0 and placement Y=10240. After that, you should activate elevation gray scale, show contours (and show shadows). Switch the right dialog to something else than background images. If you did everything properly, your Visitor 3 screen should look like this: If the satellite image should be off, you can easily adjust it by zooming in, selecting background image in the right dialog and align mountain contours to mountain images or lake/river depths to lake/river images. save the project. now you are done for the easy and fun part. ====== Step 3: Roads ====== Step 3: create forest masks and road masks Besides real life elevation data and satellite maps, there is other information available for free on the internet: shape files. They will allow us to place vegetation in almost its exact real life amount and position within almost no time! Go for the geofactory homepage and download the OPEN STREET MAPS content for your desired area... Download only files ending on "shp.zip". Unpack them after download and keep all files beginning with "natural" and "roads": Open your project in Global Mapper again. Then file -> open data files -> natural.shp and roads.shp. The program will import the shape files for the whole area. Then go to tools -> control center and deactivate the dem, open street map and roads.shp layers. The overlay control center window should look like this now: If you've done it properly, your GM screen should look like this now: What you see basically now are lines from natural spaces in your desired area (forests, rivers, lakes, ponds), based on the material of open street maps. However, this form of display doesn't suit the creation of a proper forest mask. You need to remove the name tags and the vertices. To do this, go to tools -> configure -> vector display. Then uncheck the option "draw feature labels": This will remove the name tags. To remove the vertices, simply click right into the screen and press hide area and line vertices. Your screen should look like this now: Now you need to export the areas into a picture format. First, though, click into your beforehand created square to define the area which is to be exported. When it is crossed out, go for file -> export raster and elevation data -> export bmp. in the following dialog under general tab, enter "1" in both sample spacing fields and activate the convert to gray scale check box. In the export bounds tab, select crop to selected area features. Press OK and set desired directory and file name. Then open up the file in photoshop or a similar program: Now fill all the forest areas with black color, using the paint bucket. Delete the river areas for now. After this, invert the whole picture: The picture is ready now to be used with World Tools. However, I myself prefer a higher level of detail, which requires some more steps. If you don't want to be so picky, read on at page 20. The free shape files from open street maps are really good and save you a lot of time. However, they are a little reduced in detail when it comes to vegetation, as they are representing only larger forest areas. To improve the detail level of the forest mask, copy the layer and put it onto the satellite image, after this reduce fill rate to about 50%: Now, with the forest mask layer selected, zoom in and add white color where ever you see larger spots of forest: Export the optimized forest layer again into a new clear black image: Now you have a forest mask, according to the satellite map. Now you can add different colors to parts of the white areas, to create different kind of forests later on and make it look like real woods. For this, you could use winter satellite images of your desired area (yahoo maps, as stated before) to learn where pinales are located. If you want it easy though, save the image as monochrome black/white. However, there is still something to do: the roads and paths through the forest have to be cut out! Where does one get these? Through the shape file you downloaded previously and the export command of GM. You could also just use this mask and delete the space for the roads after placement later on, but that will cost a lot of time and why shouldn't we use an easier method if its available for free?! Go to your project in GM, go to tools -> control center deactivate natural.shp layer and activate roads.shp layer instead. Now you need to export the lines into a picture format, as you did it with the natural areas; it works the same way. Click into your beforehand created square to define the area which is to be exported. When it is crossed out, go for file -> export raster and elevation data -> export bmp. In the following dialog under GENERAL tab, enter "1" in both sample spacing fields and activate the convert to gray scale check box. In the export bounds tab, select crop to selected area features. Press OK and set desired directory and file name. Then open up the file in photoshop or a similar program: Now select the road network and copy it. Paste it onto the optimized forest mask: As you can see, you now have a forest with roads and paths. I advise you to enlarge the paths a little though, because after tree placement the plants can be quite narrow to the road, which might make it difficult for AI to drive on it. Best way to enlarge the paths is selection of the black area, redefinition of the edge, feather enlargement and then painting the selection in black. How much you really have to enlarge the paths can only be seen later on in the in game 3D editor or Visitor. However, the forest mask can be changed easily later on for adjustments. ====== Step 4: Forests ====== Step 4: place forests For the next step, you need the community program World Tools by Shezan74. This program is so handy, you instantly cry when you switch back to Visitor. Go to file -> new project. Here you can add a background image if you have and want one. In the actual version, the image is limited to 5120x5120px. For the forest placement process, this is not necessary. Just define the final size of your map. Next press forest generator: By click king on load forest mask, you select the mask created in step 3. After a short import process, you press analyze image. After a short process, the program counts the amount of colors and its total percentage on the whole mask. If you just used black/white and saved the file monochromatic, you should get only two different shades. Accordingly different results you will get, if you use the "color" method I described. Next, you have to define trees for the colors. Do a right click on one of the colors and click add object type. Now, select the category trees. You can choose a tree from the library now that will be placed wherever your selected color appears. You even can define how often a certain tree will be placed to create a mixed forest. Afterwards, go back to main menu and define the colors' placement probability. Be careful here, 1 to 2 percent are far enough on a big map. A forest too dense is not needed. But you can surely experiment here like you want. Click on simulation to see how many trees actually will be placed. Now create the import file by pressing create! after some time, you get the according summary. Now export single file and select a random file name. Next, open up your map project in Visitor 3. Before you can import any object onto your map in Visitor, you need to predefine it beforehand. To do this, click tools -> nature objects. Now browse for the same tree names in your P:/ drive as they were used in World Tools. If there is a mismatch with real path or file name, just change the name in Visitor, and the import will work. As you deal with nature objects, add some randomization in size, angle and orientation for all objects to get a "real looking" forest. Now import the trees; press scripts -> import objects and enter the file name you chose before. Now watch Visitor work, finally. After some time, you get a summary message and your project screen should look like this: If you might say now: hey, there is forest in the image but no placed objects on the bottom of the screen, you are right. Note that I used a map from Open Street Maps for the forest mask and just put the satellite map as background poster into Visitor for demonstrating the basic principle in this tutorial. So HERE there is missing something, but in YOUR project it should not ;-P. Now check the result in buldozer! As you can see, placement isn't 100% real life location or density, but almost matching. I guess, that is far enough for the hard work you have done up till now.