Falcon 4 DEM2Terrain

Falcon 4.0 Forum, Falcon 4 Home, Falcon 4 Campaign, Falcon 4 Cockpits, Falcon 4 Database, Falcon 4 File Formats, Falcon 4 SRTM Terrain, Falcon 4 Terrain, Falcon 4 Textures, Falcon 4 Tools

Falcon 4 DEM2Terrain by Julian “Codec” Onions.

Convert Digital Elevation Mesh to Falcon 4 terrain.

Takes into account spherical mapping of the world and allows certain resolutions and sizes to be tinkered with. Will generate:

Dem2Terrain utility is very useful when creating the initial terrain files (L2). The first perl script only used non-spherical conversion but now we can do spherically converted terrains with this util. It is also very fast and nice to use.

www.pmctactical.org_f4_screenshots_dem2terrain-web.jpg

Rules.OBR File

Rules.OBR File

This file defines how DEM2Terrain is to read the DCW data to create the objectives.csv file generating some additional objects. It can create by user specification new factories, sam sites, radar sites, army depots and so on.

When you want to use this configuration, you need to specificly load it up from Data → Load Objective Rules menu option, then its activated and the objective are created accordingly.

The “Ids” are the objective IDs that TacEdit will show. These are the Objectives in the 3D database such as airfields, bridges, cities, towns, etc. Using LODEditor you can view the CT numbers (which are 100 LESS than the number in TacEdit). So don't forget to do the math when comparing objects between TacEdit and LODEditor.

In our forum Sherlock posted a nice rules.obr file for Iran theater creation. Its here:

# Iranian Theater rules

IgnoreNoNames 1

# AEPTTYPE  (taken from maddogmcewan post at:
# http://forums.frugalsworld.com/vbb/showthread.php?p=1312166#post1312166 )
# Aeronautical point type. Airport feature in Codes 1 through 4 were derived from the
# DMA Digital Aeronautical Flight Information File (DAFIF). Where this file was
# incomplete, data were added from the ONCs (primarily in Eastern Europe and the former Soviet Union).
#
# Code Definition for <theater>-AIRPORT.TDF file parsing by DEM2Terrain
#
# 1 = Active civil
# 2 = Active civil and military
# 3 = Active military
# 4 = Other
# 5 = Airport location added from ONC source when not available in the DAFIF

# Don't forget to add 100 to the CT numbers you got from LODEditor to get
# the objectives correct OCDID number for placing into this file as the "Ids"!

Type Airport-1
# Double runways
Ids   216, 219, 225, 978, 979, 980, 1497, 1499, 1516, 1779, 1805,
Priority 50
Generates SAM_Site 0-1
Generates Factory 0-1
Generates Radar_Station 0-1

Type Airport-2
# Double runways
Ids   216, 219, 225, 978, 979, 980, 1497, 1499, 1516, 1779, 1805,
Priority 50
Generates SAM_Site 0-1
Generates Army_Base 0-1
Generates Factory 0-1

Type Airport-3
# Single runways
Ids   216, 1509, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1780, 1781, 1782, 1783, 2065,
Priority 30
Generates Headquarters 0-1
Generates Factory 0-1

Type Airport-4
# Single runways
Ids   216, 1509, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1780, 1781, 1782, 1783, 2065,
Priority 30
Generates Depot 0-1

Type Airport-5
# Single runways
Ids   216, 1509, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1780, 1781, 1782, 1783, 2065,
Priority 20
Generates Power_Plant 0-1


# Villages and Towns
Type LABEL-1

# New Towns
Ids   1932, 952, 953, 1554, 1555, 1558, 1569, 1570, 1572, 1573, 1574,#Village Ids
Ids   1923, 1159, 1160, 1161, 1162, 1163, 1174, 1175, 1176, 1177, 1178,#Town Ids
Ids   1179, 1180, 1334, 1335, 1336, 1337, 1480, 1486, 1540, 1542, 1543,#Town Ids
Ids   1576, 1577, 1578, 1580, 1584, 1585, 1586, 1587, 1588, 1590, 1591,#Village Ids
Ids   1544, 1545, 1546, 1547, 1548, 1549, 1551, 1583, 1596, 1599, 1601,#Town Ids
Ids   1603, 1605, 1628, 1640, 1641, 1907, 1916, 1919, 1920, 1921, 1922,#Town Ids
Ids   1592, 1593, 1594, 1595, 1917, 1926, 1927, 1928, 1929, 1930, 1931,#Village Ids
Ids   1924, 1925,#Town Ids
Priority 11
Generates Army_Base 0-1
Generates Factory 0-1
Generates Refinery 0-1


# Junctions and Cities
Type LABEL-2
Ids   215, 231, 859, 1049, 1070, 1103, 1187, 1338, 1339, 1534, 1535,#City Ids
Ids   1536, 1537, 1538, 1539, 1550, 1566, 1567, 1568, 1571, 1575, 1579,#City Ids
Ids   1340, 1341, 1342, 1343, 1556, 1557, 1559, 1560, 1561, 1562, 1563,#Junction Ids
Ids   1581, 1582, 1589, 1597, 1598, 1600, 1602, 1604, 1606, 1623, 1624,#City Ids
Ids   1625, 1626, 1627, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636,#City Ids
Ids   1564, 1565, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617,#Junction Ids
Ids   1637, 1638, 1639, 1906, 1911, 1912, 1913, 1914, 1915, 2170, 2171,#City Ids
Ids   2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182,#City Ids
Ids   2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193,#City Ids
Ids   2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204,#City Ids
Ids   1618, 1619, 1620, 1621, 1622, 1897, 1918, 1933, 1934, 1935, 1936,#Junction Ids
Ids   2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215,#City Ids
Ids   2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226,#City Ids
Ids   2227, 2228, 2229,#City Ids
Ids   1937, 1938, 1939,#Junction Ids
Priority 49
Generates Depot 0-1
Generates Army_Base 0-1
Generates Headquarters 0-1
Generates Power_Plant 0-1
Generates Factory 1-3
Generates Radar_Station 0-1
Generates Nuclear_Plant 0-1
Generates Refinery 0-1
Generates Chemical_Plant 0-1
Generates SAM_Site 0-1


Type Depot
Priority 30
Ids   233, 871, 1903, 1905, 2092, 2093, 2094, 2095, 2096, 2097, 2098,
Ids   2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109,

Type Army_Base
Priority 25
Ids   227, 1680, 1681, 1684, 1685, 1686, 1688, 1902, 1904, 1908,
Ids   2087, 2088, 2089, 2090, 2091,

Type Headquarters
Priority 35
Ids   232, 2110, 2111, 2112,

Type Power_Plant
Priority 30
Ids   241, 1459, 1463, 1465, 1868, 1869, 1870, 1871, 1872, 1873, 1874,
Ids   1875, 2286,

Type Factory
Priority 30
Ids   218, 230, 234, 872, 1344, 1347, 1348, 1349, 1350, 1351, 1352,
Ids   1353, 1354, 1355, 1356, 1357, 1358, 1413, 1471, 1723, 1810, 1811,
Ids   1812, 1813, 1815, 1816, 1817, 1819, 1820, 1821, 1822, 1823, 1824,
Ids   1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835,
Ids   1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1846, 1847,
Ids   1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857,

Type Radar_Station
Priority 30
Ids   2113, 2114, 2115, 2116, 2117, 2119, 2122, 2123, 2124, 2125, 2126,
Ids   2127, 2128, 2129, 2130, 2131,

Type Nuclear_Plant
Priority 30
Ids   238, 873, 1420, 1427, 1428, 1433, 1730, 1731, 1732, 1733, 1734,
Ids   1735, 1736, 1737, 1738, 1739, 1740, 1909, 2134,

Type Refinery
Priority 35
Ids   1363, 1412, 1479, 1722, 1728, 1729,

Type Chemical_Plant
Priority 30
Ids   245, 1451, 1725, 1726, 1727, 1814, 1818, 1845, 1910, 1441, 1451,
Ids   1720, 1721, 1724,

Type SAM_Site
Priority 30
Ids   1689, 1690, 1694, 1695, 1696, 1697,

This creates the villages, towns, and cities properly (based on the DCW data). It's the refineries, factories, Army Bases, etc., that there is too many of them and having to go back through and selectively delete many of them.

The only drawback in this whole process is that there are so many NoNames in the DCW data for towns and villages. It's a two-edged “sword” using the IgnoreNoNames 1 command. If you use it you don't have to deal with the NoNames but it can cut out some important towns or villages that you will need to add back in manually later. If you don't use it then you have to deal with the multitude of NoNames in the town and village data.

Official release topic here and reference topic here.