diff --git a/Textures/Terrain/Town1.mask.png b/Textures/Terrain/Town1.mask.png
new file mode 100644
index 000000000..4cd972dc5
Binary files /dev/null and b/Textures/Terrain/Town1.mask.png differ
diff --git a/Textures/Terrain/city1.mask.png b/Textures/Terrain/city1.mask.png
new file mode 100644
index 000000000..d5293e8df
Binary files /dev/null and b/Textures/Terrain/city1.mask.png differ
diff --git a/Textures/Terrain/city2.mask.png b/Textures/Terrain/city2.mask.png
new file mode 100644
index 000000000..9eb58a72d
Binary files /dev/null and b/Textures/Terrain/city2.mask.png differ
diff --git a/Textures/Terrain/countryside1.green.mask.png b/Textures/Terrain/countryside1.green.mask.png
new file mode 100644
index 000000000..32d8d503f
Binary files /dev/null and b/Textures/Terrain/countryside1.green.mask.png differ
diff --git a/Textures/Terrain/countryside2.green.mask.png b/Textures/Terrain/countryside2.green.mask.png
new file mode 100644
index 000000000..f4c2c0d7b
Binary files /dev/null and b/Textures/Terrain/countryside2.green.mask.png differ
diff --git a/Textures/Terrain/countryside3.green.mask.png b/Textures/Terrain/countryside3.green.mask.png
new file mode 100644
index 000000000..4c326f551
Binary files /dev/null and b/Textures/Terrain/countryside3.green.mask.png differ
diff --git a/Textures/Terrain/countryside4.green.mask.png b/Textures/Terrain/countryside4.green.mask.png
new file mode 100644
index 000000000..2ed424b92
Binary files /dev/null and b/Textures/Terrain/countryside4.green.mask.png differ
diff --git a/Textures/Terrain/cropgrass1.mask.png b/Textures/Terrain/cropgrass1.mask.png
new file mode 100644
index 000000000..521b13ee1
Binary files /dev/null and b/Textures/Terrain/cropgrass1.mask.png differ
diff --git a/Textures/Terrain/cropgrass2.mask.png b/Textures/Terrain/cropgrass2.mask.png
new file mode 100644
index 000000000..953048a9b
Binary files /dev/null and b/Textures/Terrain/cropgrass2.mask.png differ
diff --git a/Textures/Terrain/cropgrass3.mask.png b/Textures/Terrain/cropgrass3.mask.png
new file mode 100644
index 000000000..9122b400e
Binary files /dev/null and b/Textures/Terrain/cropgrass3.mask.png differ
diff --git a/Textures/Terrain/cropwood.mask.png b/Textures/Terrain/cropwood.mask.png
new file mode 100644
index 000000000..bf46beedd
Binary files /dev/null and b/Textures/Terrain/cropwood.mask.png differ
diff --git a/Textures/Terrain/drycrop1.mask.png b/Textures/Terrain/drycrop1.mask.png
new file mode 100644
index 000000000..df4286f41
Binary files /dev/null and b/Textures/Terrain/drycrop1.mask.png differ
diff --git a/Textures/Terrain/drycrop2.mask.png b/Textures/Terrain/drycrop2.mask.png
new file mode 100644
index 000000000..b8ad5cf71
Binary files /dev/null and b/Textures/Terrain/drycrop2.mask.png differ
diff --git a/Textures/Terrain/drycrop3.mask.png b/Textures/Terrain/drycrop3.mask.png
new file mode 100644
index 000000000..bb64848a8
Binary files /dev/null and b/Textures/Terrain/drycrop3.mask.png differ
diff --git a/Textures/Terrain/drycrop4.mask.png b/Textures/Terrain/drycrop4.mask.png
new file mode 100644
index 000000000..a2323a04c
Binary files /dev/null and b/Textures/Terrain/drycrop4.mask.png differ
diff --git a/Textures/Terrain/golfcourse1.mask.png b/Textures/Terrain/golfcourse1.mask.png
new file mode 100644
index 000000000..33e948bf1
Binary files /dev/null and b/Textures/Terrain/golfcourse1.mask.png differ
diff --git a/Textures/Terrain/irrcrop.mask.png b/Textures/Terrain/irrcrop.mask.png
new file mode 100644
index 000000000..1d6f7f03b
Binary files /dev/null and b/Textures/Terrain/irrcrop.mask.png differ
diff --git a/Textures/Terrain/irrcrop1.mask.png b/Textures/Terrain/irrcrop1.mask.png
new file mode 100644
index 000000000..d0fb025ff
Binary files /dev/null and b/Textures/Terrain/irrcrop1.mask.png differ
diff --git a/Textures/Terrain/irrcrop2.mask.png b/Textures/Terrain/irrcrop2.mask.png
new file mode 100644
index 000000000..952a631ea
Binary files /dev/null and b/Textures/Terrain/irrcrop2.mask.png differ
diff --git a/Textures/Terrain/irrcrop3.mask.png b/Textures/Terrain/irrcrop3.mask.png
new file mode 100644
index 000000000..3e25ec37b
Binary files /dev/null and b/Textures/Terrain/irrcrop3.mask.png differ
diff --git a/Textures/Terrain/mixedcrop1.mask.png b/Textures/Terrain/mixedcrop1.mask.png
new file mode 100644
index 000000000..15273a10c
Binary files /dev/null and b/Textures/Terrain/mixedcrop1.mask.png differ
diff --git a/Textures/Terrain/mixedcrop2.mask.png b/Textures/Terrain/mixedcrop2.mask.png
new file mode 100644
index 000000000..80809b825
Binary files /dev/null and b/Textures/Terrain/mixedcrop2.mask.png differ
diff --git a/Textures/Terrain/mixedcrop3.mask.png b/Textures/Terrain/mixedcrop3.mask.png
new file mode 100644
index 000000000..f224b6546
Binary files /dev/null and b/Textures/Terrain/mixedcrop3.mask.png differ
diff --git a/Textures/Terrain/mixedcrop3b.mask.png b/Textures/Terrain/mixedcrop3b.mask.png
new file mode 100644
index 000000000..b40ab5bbf
Binary files /dev/null and b/Textures/Terrain/mixedcrop3b.mask.png differ
diff --git a/Textures/Terrain/mixedcrop4.mask.png b/Textures/Terrain/mixedcrop4.mask.png
new file mode 100644
index 000000000..6f0533540
Binary files /dev/null and b/Textures/Terrain/mixedcrop4.mask.png differ
diff --git a/Textures/Terrain/naturalcrop1.mask.png b/Textures/Terrain/naturalcrop1.mask.png
new file mode 100644
index 000000000..b82e6931f
Binary files /dev/null and b/Textures/Terrain/naturalcrop1.mask.png differ
diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml
index 419ec3b7a..ea2be1644 100644
--- a/gui/dialogs/rendering.xml
+++ b/gui/dialogs/rendering.xml
@@ -199,6 +199,30 @@
+
+ hbox
+ right
+
+
+
+
+ vegetation-density
+ 0
+ 10.0
+ /sim/rendering/vegetation-density
+
+ dialog-apply
+ vegetation-density
+
+
+
+
+ %.2f
+ true
+ /sim/rendering/vegetation-density
+
+
+
left
diff --git a/materials-dds.xml b/materials-dds.xml
index 2537ba768..a59937727 100644
--- a/materials-dds.xml
+++ b/materials-dds.xml
@@ -109,6 +109,18 @@ Properties currently used:
effect - The name of an effect to inherit from. The default is
Effects/terrain-default.
+ object-mask: png file used as a mask for trees (green channel), buildings
+ (blue channel) and building rotation (red channel). Note that this is
+ used as a mask on the coverage-m2 and wood-coverage values. I.e. the
+ wood-coverage value is used to determine the placement of a number of
+ trees, which are then masked by the object-mask texture. Partial values
+ are randomly checked against, so a green value of 128 (0.5) means that
+ if the wood-coverage indicates that a tree is located at that point,
+ it only has a 50% chance of being added. Finally, note that if an
+ object-mask is defined, the tree-density and wood-size values are ignored,
+ and trees are placed evenly using theh wood-coverage value and
+ masked.
+
ambient, diffuse, specular, emissive, and shininess are copied into the
parameter section of the effect created for this material.
************************************************************************
@@ -123,7 +135,7 @@ Shared parameters for various materials.
8000
-
+
@@ -1339,6 +1351,8 @@ Shared parameters for various materials.
Terrain/city2.png
Terrain/city2-relief-light.png
+ Terrain/city1.mask.png
+ Terrain/city2.mask.png
- 1000000.0
- 20000.0
- 4000.0
+ 10000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2110,8 +2113,11 @@ Shared parameters for various materials.
Vineyard
Rice
Terrain/irrcrop1.dds
- Terrain/irrcrop2.dds
+ Terrain/irrcrop2.dds
Terrain/irrcrop3.dds
+ Terrain/irrcrop1.mask.png
+ Terrain/irrcrop2.mask.png
+ Terrain/irrcrop3.mask.png
2000
2000
2000000.0
@@ -2120,24 +2126,20 @@ Shared parameters for various materials.
0.3
0.6
1e30
-
- 5000
-
-
-
+
+ 5000
+
+
- 500000.0
+ 10000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2188,6 +2190,10 @@ Shared parameters for various materials.
Terrain/countryside4.green.dds
Terrain.winter/countryside4.winter.dds
+ Terrain/countryside1.green.mask.png
+ Terrain/countryside2.green.mask.png
+ Terrain/countryside3.green.mask.png
+ Terrain/countryside4.green.mask.png
1800
1800
1
@@ -2196,24 +2202,20 @@ Shared parameters for various materials.
0.6
1e30
2000000.0
-
- 5000
-
-
-
+
+ 5000
+
+
- 500000.0
- 20000.0
- 5000.0
+ 10000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2250,6 +2250,7 @@ Shared parameters for various materials.
NaturalCrop
Effects/transition-base-rock
Terrain/naturalcrop1.png
+ Terrain/naturalcrop1.mask.png
2000
2000
1
@@ -2258,9 +2259,21 @@ Shared parameters for various materials.
0.6
1e30
2000000.0
+
+ 5000
+
+
500000.0
- 20000.0
- 5000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2280,7 +2293,7 @@ Shared parameters for various materials.
CropGrass
Grassland
Terrain/cropgrass1.dds
- Terrain/cropgrass2.dds
+ Terrain/cropgrass2.dds
1500
1500
2000000.0
@@ -2320,8 +2333,9 @@ Shared parameters for various materials.
GolfCourse
Effects/transition-base-dirt
Terrain/golfcourse1.png
- 400
- 400
+ Terrain/golfcourse1.mask.png
+ 800
+ 800
2000000.0
0.93
@@ -2341,7 +2355,7 @@ Shared parameters for various materials.
0.1
0.3
1e30
- 500000.0
+ 5000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2361,6 +2375,7 @@ Shared parameters for various materials.
AgroForest
Effects/transition-base-dirt
Terrain/cropwood.dds
+ Terrain/cropwood.mask.png
1500
1500
2000000.0
@@ -2369,7 +2384,7 @@ Shared parameters for various materials.
0.6
0.7
10
- 4000.0
+ 4000.0
Textures.high/Trees/mixed-summer.dds
8
@@ -2608,12 +2623,16 @@ Shared parameters for various materials.
Terrain/city2.png
Terrain/city2-relief-light.png
+ Terrain/city1.mask.png
+ Terrain/city2.mask.png
+ Terrain/city1.mask.png
+ Terrain/city2.mask.png
1000
1000
100000.0
@@ -2633,12 +2652,12 @@ Shared parameters for various materials.
@@ -2648,7 +2667,7 @@ Shared parameters for various materials.
Models/Residential/medium-apartment.ac
Models/Buildings/renovated-apartment.ac
1000000
- random
+ mask
250000.0
- 5000.0
- 2000.0
Textures.high/Trees/mixed-winter.png
8
@@ -2707,6 +2724,8 @@ Shared parameters for various materials.
Terrain/city2.png
Terrain/city2-relief-light.png
+ Terrain/city1.mask.png
+ Terrain/city2.mask.png
+ Terrain/countryside1.green.mask.png
+ Terrain/countryside2.green.mask.png
+ Terrain/countryside3.green.mask.png
+ Terrain/countryside4.green.mask.png
1800
1800
1
@@ -3238,24 +3241,20 @@ Shared parameters for various materials.
0.6
1e30
2000000.0
-
- 5000
-
-
-
+
+ 5000
+
+
- 1000000.0
- 20000.0
- 4000.0
+ 10000.0
Textures/Trees/mixed-summer.png
8
@@ -1574,6 +1578,9 @@ Shared parameters for various materials.
Terrain/irrcrop1.png
Terrain/irrcrop2.png
Terrain/irrcrop3.png
+ Terrain/irrcrop1.mask.png
+ Terrain/irrcrop2.mask.png
+ Terrain/irrcrop3.mask.png
2000
2000
2000000.0
@@ -1583,22 +1590,18 @@ Shared parameters for various materials.
0.6
1e30
- 5000
-
-
+ 5000
+
- 500000.0
+ 10000.0
Textures/Trees/mixed-summer.png
8
@@ -1638,6 +1641,10 @@ Shared parameters for various materials.
Terrain/drycrop2.png
Terrain/drycrop3.png
Terrain/drycrop4.png
+ Terrain/drycrop1.mask.png
+ Terrain/drycrop2.mask.png
+ Terrain/drycrop3.mask.png
+ Terrain/drycrop4.mask.png
2000
2000
1
@@ -1647,22 +1654,18 @@ Shared parameters for various materials.
1e30
2000000.0
- 5000
-
-
+ 5000
+
- 500000.0
- 20000.0
- 5000.0
+ 10000.0
Textures/Trees/mixed-summer.png
8
@@ -1769,6 +1770,7 @@ Shared parameters for various materials.
GolfCourse
Terrain/golfcourse1.png
+ Terrain/golfcourse1.mask.png
2000
2000
2000000.0
@@ -1790,7 +1792,7 @@ Shared parameters for various materials.
0.1
0.3
1e30
- 500000.0
+ 5000.0
Textures/Trees/mixed-summer.png
8
@@ -1810,6 +1812,7 @@ Shared parameters for various materials.
AgroForest
Effects/landmass
Terrain/cropwood.png
+ Terrain/cropwood.mask.png
2000
2000
2000000.0
@@ -2039,6 +2042,8 @@ Shared parameters for various materials.
Terrain/city2.png
Terrain/city2-relief-light.png
+ Terrain/city1.mask.png
+ Terrain/city2.mask.png
- 1000000.0
- 20000.0
- 4000.0
+ 10000.0
Textures/Trees/mixed-winter.png
8
@@ -2496,6 +2486,9 @@ Shared parameters for various materials.
Terrain.winter/irrcrop1.png
Terrain.winter/irrcrop2.png
Terrain.winter/irrcrop3.png
+ Terrain/irrcrop1.mask.png
+ Terrain/irrcrop2.mask.png
+ Terrain/irrcrop3.mask.png
2000
2000
2000000.0
@@ -2505,22 +2498,18 @@ Shared parameters for various materials.
0.6
1e30
- 5000
-
-
+ 5000
+
- 150000.0
- 10000.0
- 5000.0
+ 10000.0
Textures/Trees/mixed-winter.png
8
@@ -2561,6 +2548,10 @@ Shared parameters for various materials.
Terrain.winter/drycrop2.png
Terrain.winter/drycrop3.png
Terrain.winter/drycrop4.png
+ Terrain/drycrop1.png
+ Terrain/drycrop2.png
+ Terrain/drycrop3.png
+ Terrain/drycrop4.png
2000
2000
1
@@ -2570,22 +2561,18 @@ Shared parameters for various materials.
1e30
2000000.0
- 5000
-
-
+ 5000
+
- 150000.0
- 10000.0
- 5000.0
+ 10000.0
Textures/Trees/mixed-winter.png
8
@@ -2693,6 +2678,7 @@ Shared parameters for various materials.
GolfCourse
Terrain.winter/golfcourse.png
+ Terrain/golfcourse1.mask.png
2000
2000
2000000.0
@@ -2714,9 +2700,7 @@ Shared parameters for various materials.
0.1
0.3
1e30
- 150000.0
- 10000.0
- 5000.0
+ 5000.0
Textures/Trees/mixed-winter.png
8
@@ -2732,8 +2716,10 @@ Shared parameters for various materials.
CropWoodCover
+ CropWood
AgroForest
Terrain.winter/cropwood.png
+ Terrain/cropwood.mask.png
2000
2000
2000000.0
diff --git a/preferences.xml b/preferences.xml
index 7ae4a3bff..1f50279c9 100644
--- a/preferences.xml
+++ b/preferences.xml
@@ -103,10 +103,9 @@ Started September 2000 by David Megginson, david@megginson.com
10000
- true
- true
+ true
+ true
+ 1.0
false