This is an old revision of the document!
Random info collected about Terrain Builder.
Error (note the values are unique to your terrain):
{error} LandGrid reference exceeded the range [1023, 1023], it is [2046, 2046]
This error is because your texture layer size is too small.
Mapframe properties → samplers → texture layer. The texture layer value must be minimum of 4 x cell size!
For example if your cell size is 10 then use 40m texture layer size or if its 25m, then instead of 50m use 100m texture layer size.
Remember that every time you change texture layer, you have to generate layers from processing tab.
ErrorMessage: Too many objects in grid rectangle 1023,1023
One cause for this crash is that your road shape file has vertices / roads beyond the terrain builder mapframe range, aka outside the game world coordinates.
Fix it by, well fixing your roads, cut them again on global mapper, QGIS or manually in terrain builder (oh please no) to make sure they are all inside the terrain area.
Error:
TxTImport - Wrong file format or source template not found.
It means you do not have template library for the object(s) you are trying to import. Always keep your template library's and terrain processor object / template names in sync.
If you create your own terrain builder object library's and copy paste the object / template names into terrain processor, you always know that they are matching.
You can track down the missing template name by importing objects to new layer, RMB layer → show info. If it's 150 objects for example, open the text file you are trying to import, line 151 is the missing object.
Error:
Layers generation - Bad texel mapping for surface mask image (468.75x468.75).
Means your satellite texture/mask resolution is different what you write in Mapframe properties → samplers → Satellite/Surface (mask) source images. Make sure the resolution is the same as in your images.
How to check objects count. Go to layers manager and select objects tab, then RMB click layer which has your objects and choose Show info. This dialog shows you how many objects that layer contains. There is no “count all objects” feature to my knowledge, so you have to repeat this to every object layer and count totals yourself.
Second method is to save export your terrain to WRP in which time terrain builder shows statistics of the save, including objects count.
Third method is that if you already have WRP saved, you could use Eliteness open it and it shows you the object count. However this works only if your WRP is exported recently and obviously have Eliteness installed.
We have had various results creating 8192 heightmap terrain builder project. Sometimes terrain builder freezes just after creating the project, sometimes you can get it done in one go, it seems to vary according to terrain builders mood and other voodoo magic :)
Here is few tips from our experiences.
Wilbur lat/lon heightmap txt format did not import, terrain builder got stuck at the initial importing phase. It did not freeze, but was just sitting there 0% CPU use and nothing happened for long time. When you create L3DT exported ASCII Grid ASC file, it imports fine.
This guide assumes you know your way around terrain builder and you have created at least one terrain.
Its very voodoo magic like said, these steps might be totally unnecessary for you or maybe they are the key how you can create 8192 project, who knows.
When you are working with 8192 heightmap project save often, trust me terrain builder is very eager to freeze with this amount of data, especially when you bring in high resolution satellite images. Saving often saves (no pun intended) you so much time.
When you export heightmap from L3DT in ASC format it comes out with header like this:
ncols 8192 nrows 8192 xllcorner 0.000000 yllcorner 0.000000 cellsize 10.000000 NODATA_value -9999
This format is acceptable to terrain builder even though it uses the easting 200000 and northing 0, these 0.0 values are acceptable.
If your heightmap is extremely rough with huge elevation changes / mountains in short distances etc, then buldozer and binarize most likely will just freeze.
Buldozer will freeze or spend endless time on “Extruding hills and valleys” part and binarize just freezes on 25% CPU usage.
Do not create too crazy elevations, such terrains might look nice in some 3d preview like in L3DT 3D mode etc, but they aren't usable in arma3. The rough elevations might not look odd on terrain builder scene view heightmap shown, so to our experience there is no way to clearly tell from the heightmap 2D, you just have to learn that by experience and obviously if you see very rough mountains in like L3DT 3D view that is a sign.
If you suspect your buldozer / binarize freezing or endless processing is caused by this, make a temporary very very bland and smooth heightmap just to test it out.
Binarize freeze detection
How binarize freeze can be detected from windows task manager:
If this doesnt happen, it just stays 25% with constant memory; it has frozen.
How to save your edits from buldozer into the actual heightmap so that they are not lost.
File → export → terrain, which saves to ASC, then you import the ASC right back in and mapframe properties → processing → rebuild terrain.
Now your buldozer edits are saved to your heightmap .ASC file for good. It is important to note that if you rebuild terrain after editing with buldozer without the export phase, you lose all the edits so be careful with that.
Shape files are stored in this directory:
Source\TerrainBuilder\<project_name>.Shapes\
You can copy these shape files between your terrain builder projects just by copying the files to another projects directory. Of course the shapes must fit into the copied projects dimensions otherwise it wont work. Also there is perhaps very little use to copy them over, but its good knowledge if you happen to have the need for that.
If you delete your shape layers and after restarting terrain builder they are back, then you can fix this by going to shapes directory and deleting the .tv4s files which you want to be gone.
With large projects you can get heavy stutter and freezes. While this is no solution to the problem because its kind of chicken and the egg syndrome… but if you disable views like mapframe, terrain elevations, objects satellite… you prevent all the stutters and freezes.
But like said, its not a real solution because if you disable / hide all views, how can you edit anything!? hehe.
However this is important to know for example if you edit only objects and don't need for example satellite image layers, then of course you should disable / hide those to free up resources. Or perhaps you mass place objects with terrain processor and import those, then its good to have all views disabled.
Terrain Builder has a feature in the export menu that lets you export shapes as imagery. If you select all the shapes / polylines you desire to have painted into your masks, assign them a surface material and then go to the “Export shapes as imagery” option in the menu it will export them as an image (using the color defined for that surface type) that you can use to overlay onto your other masks, to aid in painting those.
To assign surface material, use RMB on the shapes layer to bring up the material list.
If you don't have satellite mask created by other tools like L3DT or perhaps made by yourself in image editor (photoshop / gimp), you can create basic satellite mask (surface mask) in terrain builder.
Create shapes according to vegetation, place forests etc stuff which require different mask type.
RMB shape layer and choose surface mask to be used with this layers shapes.
Then you can export satellite mask image with these surface colors. Use file → export → shapes to imagery.
Importing terrain ASC source. If you get error:
Import - Zone of imported data was not detected. Data cannot be imported.
It probably means that you have PRJ file with wrong UTM zone, I believe it can be fixed by simply deleting the .PRJ file (not sure about this, if you have more accurate info, please share).
Import - Zone of imported data is too far from the project reference zone. Data cannot be imported.
Happens when your ASC header xllcorner / yllcorner values are far off from 200,000 / 0.
If your terrain has objects stacked on top of each other at same coordinates (bad idea), you can use tools → run object diagnostics to remove these duplicate objects.
If you want to run the operation on multiple items on the list (if there is many) don't hit ok but select next one and select operation and so on.
Right click on object in template library has select all that selects all that type objects in the selected layer.
Object properties, there is absolute height and relative height.
When you have multiple satellite texture / mask images to import, for example if you split them into tiles, you can import multiple at one go by SHIFT-LMB selecting.
You can set random pitch, roll, yaw and scale to objects from template properties → template → template randomization.
Usually this is only done for vegetation objects like rocks, bushes and trees because man made objects like houses would not look nice if terrain builder randomizes their “alignment”.
YAW is the one most people want to use, its object rotation (yaw == rotation).
Pitch is to “tilt” the object forwards and backwards.
Roll is to “tilt” the object left and right.
Scale is what gives size to the object.
Satellite tiles are the small PAA files in your data\layers\ directory.
Satellite Image Resolution | Satellite Tile Resolution | Tiles | File Name Range |
---|---|---|---|
40960 | 1024 | 1849 | _00 to _04 |
71680 | 2048 | 1849 | _00 to _04 |
81920 | 1024 | 7396 | _00 to _08 |
102400 | 1024 | 16384 | _00 to _12 |
If you get error:
Project manager - Cannot find lib <path>!
It means that you previously had source\TerrainBuilder\TemplateLibs\ directory and files but now its missing.
Old arma2 era visitor 3 import / export file format works with two changes. First you cannot have path to the p3d name, second you have to add that 200,000 easting to the coordinate. Also obviously you must have template library to match the objects you're going to import.
Works:
"t_populusb2s_ep1";201969.000000;181.000000;0.000000;140.000000;
Does not work:
"ca\plants_e\tree\t_populusb2s_ep1";1969.000000;181.000000;0.000000;140.000000;
P3D object references are kept in templates. Template libraries are .TML files which are XML text files.
When you add template libraries and it asks name, this is FILENAME or some cases directory, so do not use spaces or special characters.
On initial creation of a new template library the filename is created according to the name given to it, but on later project saves these file names are lower cased automatically (whether you like it or not).
PMC has provided full template libraries for download, see Terrain Builder TemplateLibs.
Your project should be located in <myAddon>\Source\TerrainBuilder\ directory.
Dialogs_new.vdat - unknown ???
<projectName>.tv4p - main project file
<projectName>_001.v4d - Layers manager → rasters, each in individual _001, _002 etc filename numbering
There are sub dirs called:
<projectName>.Cache - unknown ???
<projectName>.Layers - Objects layers
<projectName>.Shapes - Shapes layers
Cache is unknown. Layers is your layers manager → Objects each in individual file. Shapes is all your layers manager → shapes each in individual file.
Objects layers are saved as .tv4l files.
Shape layers are saves as .tv4s files.
When you save your project, it appears to save all files, even those that has not been modified, for example shape layers are saved as filename.ext.TMP temporary file name during saving.
If you delete objects/shapes layer and restart terrain builder but the same layer still comes back to haunt you, then go to into the correct directory (either .layers or .shapes) and delete the filename which has your layer name in it but be careful not to delete the wrong file!
It is not good idea to delete terrain builder project like rasters .v4d files, you'll run into all sorts of buggy behavior when you continue to use that project. You can however delete layers / shapes files if they start to haunt you by re-appearing.
When you import heightmap, satellite texture or satellite mask terrain builder will add them into its project files (rasters in the GUI), you can delete the source satellite / heightmap files as they are no longer required. Obviously you need to keep your editable satellite image sources, but for example if you “save as” from photoshop PSB file or export from global mapper, those BMP's are temporary and can be deleted.
My terrain builder mapframes → processing → rebuild terrain, button is grayed out what can I do!?
If terrain builder wont let you rebuild terrain (button grayed out), then go to mapframes → samplers → satellite/surface (mask) tiles, and change it to something else, then you can rebuild terrain again. Don't forget to switch tiles size back to the proper size after rebuilding terrain.
Keypoints are location names and can be found at class names{} in config.cpp
See also ArmA 2 class names, ArmA 2 Custom keypoints, ArmA 3 Terrain Config Names, VBS manual, visitor 4 keypoints.
Setup terrain builder for keypoint editing
Activate keypoints dialog, window → key points, you see it appear close to layers manager (assuming you're using default layout).
Add Keypoints
Select add keypoints icon / button active from the main menu, from menu drop-down keypoints → add keypoint or from keypoints dialog. Then just click on the map and keypoint is created. Press and hold LMB to drag a box, then release LMB and keypoint with this size is created, otherwise if you use single LMB click it creates some 1km sized box instead.
You can see the keypoint info appear in keypoints dialog.
Stop adding keypoints by selecting the add keypoints icon/button again, deselecting it.
Select Keypoint
When you select keypoint name from the keypoints dialog, scene view will snap into that location.
Delete Keypoints
Select keypoint and click the delete keypoint icon / button. This feature has no confirmation dialog, so be careful when clicking close to this button, its recommended to use add keypoints icon / button from main menu when adding keypoints, to avoid accidental deletions :)
If you use delete all keypoints icon / button, terrain builder doesn't register this as “edited”, you can exit without it warning you about saving changes.
You can avoid this by doing some action that register as “edited” in terrain builder, like clicking on layers manager some raster layer, then save button activates in menu. Or you can simply click save as button, but that asks you to choose the file name. Note; deleting single keypoint works fine.
Edit Keypoint
Double LMB click keypoint name from the keypoints dialog to open keypoints properties dialog. This is the same as selection properties dialog.
Export Keypoints for config.cpp
When you export your WRP, the keypoint class names info is saved into <filename>.HPP file next to your <filename>.WRP file.
This keypoints hpp file is overwritten every time you export your WRP ! Do not edit this file as all your edits will be lost!
You can edit heightmap / elevations either from buldozer or terrain builder, this guide is for terrain builder use.
Click “crossed hammers” icon / button in main tool bar or choose terrain → edit terrain from the menu.
Now you see terrain properties dialog and heightmap (grid) dots in your terrain. Remember to zoom in close so you can see the real individual elevation grid points instead of their “displayed sum”.
Select Elevation Point(s)
Use LMB drag a box around the elevation point(s) you want to edit. If you chose only one you can edit it directly, or if you chose multiple you can edit all of them at once, but be careful when editing multiple elevation points.
Set Elevation
To set elevation for specific value, like leveling out airfield or other surface which must be totally even, use “user elevation” property.
Select elevation points, then use terrain properties → action → user elevation, set the elevation value you want to use and click OK.
Updating Scene View / Properties
Scene view or terrain properties does not automatically update when you edit elevations. You have to unselect and select the edit terrain crossed hammers icon / button to update (it keeps the elevation point selections oddly enough).
Heightmap View
Elevation of -0.42 still shown as green (land).
Elevation of -0.84 shown as blue (water).
When you are in buldozer and attempt to select object by LMB clicking it or dragging a box around it, the select arrow disappears after you release LMB, why? It is because layers manager you have wrong object layer selected. Select the layer where your object is and then you can buldozer select it.
Buldozer also does this if the object has “absolute height” turned on.
Deleting object layers with objects in them
Do not run buldozer when you deleted object layers, it might crash terrain builder.
So please save the project before deleting object layers with objects in them. If you want to import new set of objects, delete the previous object layer, save project, close project and restart terrain builder. This way you can be sure there are no lingering issues from the previous objects in terrain builders memory etc.
Moved to Terrain Builder known bugs page.
Howto move objects from one layer to another in terrain builder.
Lets say you have all your objects like trees, rocks and buildings dumped into “Default” layer and you want to move them to other layers, organize them better.
In layers manager create new layers for these names “Trees”, “Rocks” and “Buildings”.
Select Default layer.
From library manager on first tree object type template, RMB → select all objects. Now the properties dialog appears, in there use the layer drop-down to choose Trees layer. Then the dialog disappears and all these object template objects have been moved to Trees layer.
Repeat this for each of the template library object templates (each for rocks and buildings too). Yeah its a nuisance to do this, but there is no automated way to do multiple object templates at once.
Once done, your layers manager → objects → default should list 0 objects but trees, rocks and buildings populated with objects.
Tip from Cosmo in discord: If you already have several layers and objects, another option is via “export object” where you can select “active layer”, then select the object-classes you wanna extract. Do so and extract them into a textfile and re-import them the new desired layer. (Dont forget to delete the old objects from the old layers).
Terrain builder can be used to resize your heightmap.
Important note: this method does not “add details” to your heightmap, but your terrain looks smoother because the increased amount of heightmap grid points. If you want you can then add more details to your terrain with your favorite terrain heightmap editor, its just important to realize the details wont appear there by magic heh.
Increasing the heightmap grid size but still maintaining compatibility with terrain + objects is tricky, meaning you don't want your objects floating in the air or buried in the ground. Lets say you have 256 x 256 grid heightmap and 50 meter cell size coming to 12.8km terrain, now if you want to increase the heightmap grid and decrease cell size therefore making terrain more detailed and smooth, divide the cell size by two every time you multiply heightmap, like this:
Heightmap original 256, cell original 50:
Heightmap New | Cell New |
---|---|
512 | 25 |
1024 | 12.5 |
2048 | 6.25 |
4096 | 3.125 |
In our 256 example size, if you want to increase heightmap to 1024 you would drop cell size from 50 → 25 → 12.5 which would still keep same 12.8km terrain size, objects would remain in their proper location and heightmap would be “transformed” smoothly in place just adding more grid points for details.
VERY IMPORTANT: you must export and delete special objects (like bridges, harbor or others which are aligned other than their normal align to ground elevations) with absolute elevations before resizing your heightmap, otherwise these special objects will move along with the heightmap. After you've done the resizing you can import them back into terrain builder using absolute elevation mode.
Normal objects like bushes, rocks, trees etc and normal buildings are fine with this resize using their relative elevation modes in terrain builder and remain on their original place.
HOWTO increase your existing terrains heightmap grid size in terrain builder:
And you're all done, if you want you can export your terrain back out to ASC file now for backup purposes.
Buildings / houses object placement idea by Ice.
Vertices or points for buildings is one method to place randomly chosen building objects into precise spots on a terrain. This is done with shape files in terrain builder and terrain processor.
Create new shape layer for your vertices/points, place one point for one building. You can make several layers like small village houses and big city buildings etc.
Use these shape files then in terrain processor and create “Point: With Rotation” task.
Are you using Windows 10 and terrain builder is freezing randomly, acting up or plain and simple locking up?
With win10 you must use XP SP3 mode when running terrain builder.
Note: if you use XP SP 3 mode, you also have to run the P: drive setup bat file as normal user and once as admin.
Are objects with absolute or relative height?
To align floating (or buried) objects to the ground properly you have to set the relative elevation to zero.
Drag a box around the objects and set relative elevation to zero.
If you have huge number of objects, export them and edit the .txt file directly (currently there is no tool to automate this), then import objects txt file back into terrain builder.
When you select a very large number of objects, de-selecting them becomes a problem as it takes a really long time. When I selected 3.7 million objects in Default layer and then de-selected them (clicking empty spot in sceneview) terrain builder was in frozen state for over two hours before I had enough and just killed terrainbuilder process.
Do not select huge number of objects at once.
Terrain builder to join two polylines, you need to use magnet tool. Just select magnet tool and move one vertice close enough to another and they snap together. Once you snap them, you right click line and select join.
Miscellaneous info bits, oneliners even.