WS30: add edge-hardness parameter for landclass transitions
Also new use_edge_hardness_with_large_scale_transition const for testing
This commit is contained in:
parent
61bf4c2858
commit
68df0191c0
3 changed files with 83 additions and 3 deletions
|
@ -157,9 +157,9 @@
|
|||
<texture>Terrain/irrcrop.png</texture>
|
||||
<object-mask>Terrain/irrcrop.mask.png</object-mask>
|
||||
<parameters>
|
||||
<rotation_flag>0</rotation_flag>
|
||||
<rotation_scale>8000.0</rotation_scale>
|
||||
</parameters>
|
||||
<rotation_flag>0</rotation_flag>
|
||||
<rotation_scale>8000.0</rotation_scale>
|
||||
</parameters>
|
||||
<xsize>3000</xsize>
|
||||
<ysize>3000</ysize>
|
||||
<solid>1</solid>
|
||||
|
@ -185,6 +185,7 @@
|
|||
<parameters>
|
||||
<rotation_flag>0</rotation_flag>
|
||||
<rotation_scale>8000.0</rotation_scale>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
<xsize>2000</xsize>
|
||||
<ysize>2000</ysize>
|
||||
|
@ -250,6 +251,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>15.0</tree-height-m>
|
||||
<tree-width-m>10.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -271,6 +275,7 @@
|
|||
<urban_blend>1</urban_blend>
|
||||
<blend_bias>0.2</blend_bias>
|
||||
<hires_overlay_bias>-1.0</hires_overlay_bias>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
<xsize>1024</xsize>
|
||||
<ysize>1024</ysize>
|
||||
|
@ -331,6 +336,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>15.0</tree-height-m>
|
||||
<tree-width-m>10.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -408,6 +416,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -434,6 +445,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -516,6 +530,7 @@
|
|||
<overlay_autumn_flag>1</overlay_autumn_flag>
|
||||
<overlay_brightness_top>1.4</overlay_brightness_top>
|
||||
<overlay_brightness_bottom>0.6</overlay_brightness_bottom>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
<xsize>2000</xsize>
|
||||
<ysize>2000</ysize>
|
||||
|
@ -550,6 +565,7 @@
|
|||
<overlay_autumn_flag>1</overlay_autumn_flag>
|
||||
<overlay_brightness_top>1.4</overlay_brightness_top>
|
||||
<overlay_brightness_bottom>0.6</overlay_brightness_bottom>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
<xsize>2000</xsize>
|
||||
<ysize>2000</ysize>
|
||||
|
|
|
@ -96,6 +96,9 @@
|
|||
<tree-width-m>15.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>1</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -115,6 +118,9 @@
|
|||
<tree-width-m>15.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>0.85</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -133,6 +139,9 @@
|
|||
<tree-width-m>15.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>0.95</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -152,6 +161,9 @@
|
|||
<tree-width-m>18.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>1</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -169,6 +181,9 @@
|
|||
<tree-width-m>15.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>1</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -185,6 +200,9 @@
|
|||
<tree-width-m>8.0</tree-width-m>
|
||||
<rolling-friction>1</rolling-friction>
|
||||
<bumpiness>1</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -291,6 +309,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>25.0</tree-height-m>
|
||||
<tree-width-m>15.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -312,6 +333,9 @@
|
|||
<a>1.0</a>
|
||||
</emissive>
|
||||
<object-group include="Materials/base/industrial-buildings.xml"/>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -339,6 +363,9 @@
|
|||
<a>1.0</a>
|
||||
</emissive>
|
||||
<object-group include="Materials/base/industrial-buildings.xml"/>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<!-- default town US style -->
|
||||
|
@ -370,6 +397,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>12.0</tree-height-m>
|
||||
<tree-width-m>7.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -389,6 +419,9 @@
|
|||
<name>Ocean</name>
|
||||
<effect>Effects/water</effect>
|
||||
<texture>Terrain/water.png</texture>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -420,6 +453,9 @@
|
|||
<solid>0</solid>
|
||||
<rolling-friction>1.5</rolling-friction>
|
||||
<bumpiness>0.6</bumpiness>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -437,6 +473,7 @@
|
|||
</texture-set>
|
||||
<parameters>
|
||||
<ice_cover><use>/environment/surface/ice-cover</use></ice_cover>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
<xsize>400</xsize>
|
||||
<ysize>400</ysize>
|
||||
|
@ -676,6 +713,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<!-- default US style irrigated crops -->
|
||||
|
@ -707,6 +747,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -736,6 +779,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -860,6 +906,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
<material>
|
||||
|
@ -882,6 +931,9 @@
|
|||
<tree-varieties>8</tree-varieties>
|
||||
<tree-height-m>20.0</tree-height-m>
|
||||
<tree-width-m>12.0</tree-width-m>
|
||||
<parameters>
|
||||
<edge-hardness>1.0</edge-hardness>
|
||||
</parameters>
|
||||
</material>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -160,6 +160,9 @@
|
|||
// Possibe values: 0=off, 1=on. Default:0
|
||||
const int grow_landclass_borders_with_large_scale_transition = 1;
|
||||
|
||||
// Use the edge-hardness parameter from materials.xml to determine
|
||||
// weighting of the landclass in transitions
|
||||
const int use_edge_hardness_with_large_scale_transition = 0;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
@ -1154,6 +1157,15 @@ if (grow_landclass_borders_with_large_scale_transition == 1)
|
|||
//lc = int(t);
|
||||
//mfact[2] = t;
|
||||
|
||||
if (use_edge_hardness_with_large_scale_transition == 1)
|
||||
{
|
||||
// the edge-hardness material parameter has range 0.0 (soft) to 1.0 (hard)
|
||||
// We use this to force the mix factor to 0 or 1
|
||||
if ((num_n > 0) && fg_dimensionsArray[lc].w > 0.5) {
|
||||
mfact[0] = step(0.5, mfact[0]);
|
||||
}
|
||||
}
|
||||
|
||||
landclass_id = lc;
|
||||
neighbor_landclass_ids=lc_n;
|
||||
num_unique_neighbors = num_n;
|
||||
|
|
Loading…
Add table
Reference in a new issue