Table of Contents
Misc ArmA Terrain Info
ArmA 1 Forum, ArmA 1 Home, ArmA 1 Config, ArmA 1 Tools, ArmA 1 File Formats, ArmA 1 Missions, ArmA 1 3D Modeling, ArmA 1 Terrain, ArmA 1 Texturing, ArmA 1 Scripting
ArmA 1 aka Armed Assault (ArmA)
This is misc ArmA terrain info which doesn't suit other pages, or just hasn't found a home page yet.
Satellite Layers
Fact: the mask_lco.png can only have 4 colors in segment, which is set when you first setup the satellite layer.
Nicholas Bell: When you import the mask and the satellite png files, Visitor chops them up into pieces the size specified by the segment size (usually 512 pixels square). I re segmented Schmalfelden into 256 pixel segments which allowed be to better avoid the 4 mask color per segment limit. I was able to squeeze another texture in some segments, given Schmalfelden a total of 7.
Aussie: You can use as many layers as you like, but remember you can only use a Max of 4 in any one square which is dependent on the parameters you set when you setup V3. At present I have way over 10 textures in the Australian island, but not in one square.
How to control 4 textures per square?
I set up a grid in Paint Shop Pro to match the segment size. I'm sure you can do this in your graphic editor too. Because of the segment overlap, you have to stay away from the edges of the grid lines, or you'll run into the 4 color limit conflict.
I also check after V3 chops up the mask file - I look at the individual “m” .png files in the Data/Layers folder. The 5th color usually ends up looking a brown-grey color in the rendered png. It definitely does not look like the other pure colors V3 uses. Very tedious work, but sometimes the only way I could find the wayward mask color.
Another interesting method I accidentally discovered to help see how the mask was working on map is to import the mask_loc.png instead of the sat_lco.png when V3 asks for the satellite image. Pretty wild looking in Buldozer or in game, but was helpful in seeing how the game engine renders the mask file in true relationship to objects.
What happens if more then 4 colors are in same square, what are the in game symptoms?
Two possible results:
If the extra color is close to another “good” color it will display the “good” color. This can be hard to spot, which is why creating a satellite image from your mask image can be useful. I had white, yellow, red, green and blue in a segment and the program decided that the white was yellow (the predominant color).
More typically, the segment with more than 4 colors will be pure white.
fasad: If the mask contains a color that isn't a match for one of the defined terrain types, ArmA will blend multiple terrain types over a single pixel of the mask, which may be what is happening in that pic?
There are (or at least were) some areas on Sahrani where multiple terrain types are blended into a single pixel (where the games version of the mask has brown pixels). I don't know whether these areas are deliberate or introduced as artifacts by the pac conversion.
The engine allows smooth transitions between terrain types over multiple pixels, but for whatever reason it isn't used (performance?).
It is an engine limitation. The game engine mask (ie, not Visitor) uses 4 terrain types since it uses the 3 RGB color channels of the PAA format to store the terrain type, with black as a forth.
Advantages:
- I assume that since the memory systems for storing and reading compressed textures already exist, less work required of developers.
- Allows possibility of blends between terrain types.
- Data in an easy to inspect and edit format.
Disadvantages:
- Four terrain types is restrictive.
- Since blends are not used, lots of memory and potentially exploitable data is wasted! (there is the potential for 16777216 different layers in the PAA data format, although there are obviously other engine considerations).
Nicholas Bell: I changed the segment size in Schmalfelden around v.94 from 512 to 256 pixels and didn't see changes in the frame rate. Loading time may be a bit longer because of the additional files.
Mask
The mask is just a simplified version of the satellite image which tells the game where to draw the detail textures using color codes. You can either paint it by hand (which would be a pain in the ass almost regardless of map size), or you can convert your satellite into the desired colors which is way less tedious. Unfortunately you're only limited to four different surface types per segment so I'd recommend at least when starting to just stick with that.
First I open up the satellite in Photoshop, then I go to the Hue/saturation tool and adjust/correct the individual surface types hue and saturation with single colors like green for grass to make them more prominent if need be. After that I go set saturation on max with the master. Then I turn contrast to max with legacy on and usually I should have a usable mask made, but in most cases there are more than 4 colors so I use the hue/sat and/or color replacement tool to remove small bit of undesired colors until I an left with 4 primary surfaces. Now I can determine which detail texture suits best for each surface type, read their RGB value and then smack that into the layers.cfg.
Visitor 3 / Terrain Limitations
Max size for Visitor 3 is 2048 grid size with 20 meters cell size which equals 40,960 Meters terrain size. Any bigger and you'll run into the problem where you are unable to select objects in Buldozer.
True balance between grid/cell sizes regarding this are unknown at this time.
Cant Get Terrain Ingame
If you have your terrain config setup properly and everything should be ok, but your terrain just won't show up in mission editor… then it might be that if (and you should) use namespaces, you have forgot to add $PBOPREFIX$ file into the pbo and setup it properly for the namespace\terrainname setting.