1
0
Fork 0

Random buildings - initial commit of data portion. Requires

simgear change to have any effect.
This commit is contained in:
Stuart Buchanan 2012-04-24 21:55:37 +01:00
parent ed0d58cd75
commit 98e7a194e8
8 changed files with 279 additions and 105 deletions

View file

@ -149,3 +149,68 @@ heading-type : Indicator of how the heading of the random objects should be
mask - Rotation is taken from the red channel of the object-mask
billboard - Object is always rotated to face camera - expensive
Random Buildings
================
Random Buildings come in three sizes, with individual constraints.
Small buildings, which may have pitched roofs. They have different front, back and
side textures. Small buildings are never deeper than they are wide.
Medium buildings, which have flat roofs. They have different front and side textures.
They are never taller than they are wide.
Large buildings, which have flat roofs. They have different front and size textures. There
are no constraints on their width, depth or height.
building-coverage : The coverage of random buildings in areas marked for random objects in
m^2. A lower number means a higher density of buildings. A value of
0 indicates no buildings. May be masked by the blue channel of an
object-mask. (default: 0)
building-spacing-m : The minimum spacing between random buildings and other buildings
or random objects. This helps avoid objects being placed on top of each other.
(default: 5)
building-small-ratio: Ratio of small buildings. These buildings are 1-3 stories
in height, and may have a pitched roof. Fraction of small buildings is
(<building-ratio-small> / (<building-ratio-small> + <building-ratio-medium>
+ <building-ratio-large>). (default: 0.8)
building-medium-ratio : Ratio of medium buildings. These buildings are 3-6 stories in
height, and have a flat roof. (default: 0.15)
building-large-ratio : Ratio of large buildings. These buildings are 5-10 stories in
height, and have a flat roof. (default 0.05)
building-small-pitch : Fraction of small buildings with pitched roofs. (default 0.8)
building-medium-pitch : Fraction of small buildings with pitched roofs. (default 0.2)
building-large-pitch : Fraction of small buildings with pitched roofs. (default 0.1)
building-small-min-floors : Minimum number of floors for a small building. (default 1)
building-small-max-floors : Maximum number of floors for a small building. (default 3)
building-medium-min-floors : Minimum number of floors for a medium building. (default 3)
building-medium-max-floors : Maximum number of floors for a medium building. (default 8)
building-large-min-floors : Minimum number of floors for a medium building. (default 5)
building-large-max-floors : Maximum number of floors for a medium building. (default 20)
building-small-min-width-m : Minimum width of small buildings. (default 15)
building-small-max-width-m : Maximum width of small buildings. (default 60)
building-small-min-depth-m : Minimum depth of small buildings. (default 10)
building-small-max-depth-m : Maximum depty of small buildings. (default 20)
building-medium-min-width-m : Minimum width of medium buildings. (default 25)
building-medium-max-width-m : Maximum width of medium buildings. (default 50)
building-medium-min-depth-m : Minimum depth of medium buildings. (default 20)
building-medium-max-depth-m : Maximum depty of medium buildings. (default 50)
building-large-min-width-m : Minimum width of large buildings. (default 50)
building-large-max-width-m : Maximum width of large buildings. (default 75)
building-large-min-depth-m : Minimum depth of large buildings. (default 50)
building-large-max-depth-m : Maximum depty of large buildings. (default 75)
texture : The texture used for all buildings. See Texture/buildings.xcf for details.
(default Texture/buildings.png)

BIN
Docs/buildings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View file

@ -48,6 +48,10 @@
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
</less-equal>
<equal>
<property>/sim/rendering/random-buildings</property>
<value type="bool">false</value>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>
@ -234,6 +238,10 @@
<value type="float">1.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
</less-equal>
<equal>
<property>/sim/rendering/random-buildings</property>
<value type="bool">false</value>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>
@ -388,6 +396,10 @@
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
</less-equal>
<equal>
<property>/sim/rendering/random-buildings</property>
<value type="bool">false</value>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>
@ -633,6 +645,10 @@
<value type="float">1.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
</less-equal>
<equal>
<property>/sim/rendering/random-buildings</property>
<value type="bool">false</value>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>

View file

@ -902,6 +902,14 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.4</building-small-ratio>
<building-small-min-floors>3</building-small-min-floors>
<building-small-max-width-m>30.0</building-small-max-width-m>
<building-small-min-depth-m>10.0</building-small-min-depth-m>
<building-small-max-depth-m>30.0</building-small-max-depth-m>
<building-medium-ratio>0.6</building-medium-ratio>
<building-large-ratio>0.2</building-large-ratio>
<wood-coverage>10000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.png</tree-texture>
<tree-varieties>8</tree-varieties>
@ -910,6 +918,52 @@
<tree-width-m>15.0</tree-width-m>
</material>
<material>
<condition>
<equals>
<property>sim/startup/season</property>
<value>summer</value>
</equals>
</condition>
<name>BuiltUpCover</name>
<name>Urban</name>
<effect>Effects/transition-base-dirt</effect>
<texture-set>
<texture>Terrain/city1.png</texture>
<texture n="4">Terrain.winter/builtup.png</texture>
</texture-set>
<texture-set>
<texture>Terrain/city2.png</texture>
<texture n="4">Terrain.winter/builtup.png</texture>
</texture-set>
<object-mask>Terrain/city1.mask.png</object-mask>
<object-mask>Terrain/city2.mask.png</object-mask>
<xsize>1000</xsize>
<ysize>1000</ysize>
<light-coverage>100000.0</light-coverage>
<emissive>
<r>0.05</r>
<g>0.05</g>
<b>0.02</b>
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.4</building-small-ratio>
<building-small-min-floors>3</building-small-min-floors>
<building-small-max-width-m>30.0</building-small-max-width-m>
<building-small-min-depth-m>10.0</building-small-min-depth-m>
<building-small-max-depth-m>30.0</building-small-max-depth-m>
<building-medium-ratio>0.6</building-medium-ratio>
<building-large-ratio>0.2</building-large-ratio>
<wood-coverage>25000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.dds</tree-texture>
<tree-varieties>8</tree-varieties>
<tree-range-m alias="/params/forest/tree-range-m"/>
<tree-height-m>25.0</tree-height-m>
<tree-width-m>15.0</tree-width-m>
</material>
<material>
<condition>
<equals>
@ -944,48 +998,6 @@
<object-group include="Materials/base/industrial-buildings.xml"/>
</material>
<material>
<condition>
<equals>
<property>sim/startup/season</property>
<value>summer</value>
</equals>
<not>
<property>sim/rendering/shaders/urban</property>
</not>
</condition>
<name>BuiltUpCover</name>
<name>Urban</name>
<effect>Effects/transition-base-dirt</effect>
<texture-set>
<texture>Terrain/city1.png</texture>
<texture n="4">Terrain.winter/builtup.png</texture>
</texture-set>
<texture-set>
<texture>Terrain/city2.png</texture>
<texture n="4">Terrain.winter/builtup.png</texture>
</texture-set>
<object-mask>Terrain/city1.mask.png</object-mask>
<object-mask>Terrain/city2.mask.png</object-mask>
<xsize>1000</xsize>
<ysize>1000</ysize>
<light-coverage>100000.0</light-coverage>
<emissive>
<r>0.05</r>
<g>0.05</g>
<b>0.02</b>
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<wood-coverage>25000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.dds</tree-texture>
<tree-varieties>8</tree-varieties>
<tree-range-m alias="/params/forest/tree-range-m"/>
<tree-height-m>25.0</tree-height-m>
<tree-width-m>15.0</tree-width-m>
</material>
<material>
<condition>
<equals>
@ -1007,6 +1019,11 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/town-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.9</building-small-ratio>
<building-medium-ratio>0.1</building-medium-ratio>
<building-large-ratio>0.0</building-large-ratio>
<building-medium-max-floors>4</building-medium-max-floors>
<wood-coverage>5000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.dds</tree-texture>
<tree-varieties>8</tree-varieties>
@ -1377,7 +1394,7 @@
<texture>Terrain/countryside1.green.dds</texture>
<texture n="4">Terrain.winter/countryside1.winter.dds</texture>
</texture-set>
<texture-set>
<!--<texture-set>
<texture>Terrain/countryside2.green.dds</texture>
<texture n="4">Terrain.winter/countryside2.winter.dds</texture>
</texture-set>
@ -1388,7 +1405,7 @@
<texture-set>
<texture>Terrain/countryside4.green.dds</texture>
<texture n="4">Terrain.winter/countryside4.winter.dds</texture>
</texture-set>
</texture-set> -->
<object-mask>Terrain/countryside1.green.mask.png</object-mask>
<object-mask>Terrain/countryside2.green.mask.png</object-mask>
<object-mask>Terrain/countryside3.green.mask.png</object-mask>
@ -1791,6 +1808,14 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.4</building-small-ratio>
<building-small-min-floors>3</building-small-min-floors>
<building-small-max-width-m>30.0</building-small-max-width-m>
<building-small-min-depth-m>10.0</building-small-min-depth-m>
<building-small-max-depth-m>30.0</building-small-max-depth-m>
<building-medium-ratio>0.6</building-medium-ratio>
<building-large-ratio>0.2</building-large-ratio>
<wood-coverage>250000.0</wood-coverage>
<tree-texture>Trees/mixed-winter.png</tree-texture>
<tree-varieties>8</tree-varieties>
@ -1847,6 +1872,11 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/town-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.9</building-small-ratio>
<building-medium-ratio>0.1</building-medium-ratio>
<building-large-ratio>0.0</building-large-ratio>
<building-medium-max-floors>4</building-medium-max-floors>
<wood-coverage>5000.0</wood-coverage>
<tree-texture>Trees/mixed-winter.png</tree-texture>
<tree-varieties>8</tree-varieties>

View file

@ -874,6 +874,14 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.4</building-small-ratio>
<building-small-min-floors>3</building-small-min-floors>
<building-small-max-width-m>30.0</building-small-max-width-m>
<building-small-min-depth-m>10.0</building-small-min-depth-m>
<building-small-max-depth-m>30.0</building-small-max-depth-m>
<building-medium-ratio>0.6</building-medium-ratio>
<building-large-ratio>0.2</building-large-ratio>
<wood-coverage>250000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.png</tree-texture>
<tree-varieties>8</tree-varieties>
@ -929,6 +937,11 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/town-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.9</building-small-ratio>
<building-medium-ratio>0.1</building-medium-ratio>
<building-large-ratio>0.0</building-large-ratio>
<building-medium-max-floors>4</building-medium-max-floors>
<wood-coverage>5000.0</wood-coverage>
<tree-texture>Trees/mixed-summer.png</tree-texture>
<tree-varieties>8</tree-varieties>
@ -1629,12 +1642,6 @@
</texture-set>
<object-mask>Terrain/city1.mask.png</object-mask>
<object-mask>Terrain/city2.mask.png</object-mask>
<!--
<texture-set>
<texture>Terrain/city3.png</texture>
<texture n="2">Terrain/city3-relief-light.png</texture>
</texture-set>
-->
<xsize>1000</xsize>
<ysize>1000</ysize>
<light-coverage>100000.0</light-coverage>
@ -1645,6 +1652,14 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/urban-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.4</building-small-ratio>
<building-small-min-floors>3</building-small-min-floors>
<building-small-max-width-m>30.0</building-small-max-width-m>
<building-small-min-depth-m>10.0</building-small-min-depth-m>
<building-small-max-depth-m>30.0</building-small-max-depth-m>
<building-medium-ratio>0.6</building-medium-ratio>
<building-large-ratio>0.2</building-large-ratio>
<wood-coverage>250000.0</wood-coverage>
<tree-texture>Trees/mixed-winter.png</tree-texture>
<tree-varieties>8</tree-varieties>
@ -1700,6 +1715,11 @@
<a>1.0</a>
</emissive>
<object-group include="Materials/base/town-buildings.xml"/>
<building-coverage>500.0</building-coverage>
<building-small-ratio>0.9</building-small-ratio>
<building-medium-ratio>0.1</building-medium-ratio>
<building-large-ratio>0.0</building-large-ratio>
<building-medium-max-floors>4</building-medium-max-floors>
<wood-coverage>5000.0</wood-coverage>
<tree-texture>Trees/mixed-winter.png</tree-texture>
<tree-varieties>8</tree-varieties>

BIN
Textures/buildings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

View file

@ -178,39 +178,6 @@
</group>
</group>
<group>
<layout>hbox</layout>
<text>
<label>Objects</label>
<halign>left</halign>
</text>
<hrule>
<stretch>true</stretch>
</hrule>
</group>
<checkbox>
<halign>left</halign>
<label>Particles (smoke, dust, spray)</label>
<name>particles</name>
<property>/sim/rendering/particles</property>
<binding>
<command>dialog-apply</command>
<object-name>particles</object-name>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Precipitation</label>
<name>precipitation</name>
<property>/sim/rendering/precipitation-gui-enable</property>
<binding>
<command>dialog-apply</command>
<object-name>precipitation</object-name>
</binding>
</checkbox>
<!--
<checkbox>
@ -224,6 +191,28 @@
-->
<group>
<layout>hbox</layout>
<text>
<label>Scenery objects</label>
<halign>left</halign>
</text>
<hrule>
<stretch>true</stretch>
</hrule>
</group>
<checkbox>
<halign>left</halign>
<label>Animated jetways</label>
<name>jetways</name>
<property>/nasal/jetways/enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>jetways</object-name>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Random objects</label>
@ -233,10 +222,6 @@
<command>dialog-apply</command>
<object-name>random-objects</object-name>
</binding>
<binding>
<command>reinit</command>
<subsystem>tile-manager</subsystem>
</binding>
</checkbox>
<checkbox>
@ -248,10 +233,6 @@
<command>dialog-apply</command>
<object-name>random-vegetation</object-name>
</binding>
<binding>
<command>reinit</command>
<subsystem>tile-manager</subsystem>
</binding>
</checkbox>
<group>
@ -286,19 +267,62 @@
<checkbox>
<halign>left</halign>
<label>Animated jetways</label>
<name>jetways</name>
<property>/nasal/jetways/enabled</property>
<label>Random buildings</label>
<name>random-buildings</name>
<property>/sim/rendering/random-buildings</property>
<binding>
<command>dialog-apply</command>
<object-name>jetways</object-name>
<object-name>random-buildings</object-name>
</binding>
</checkbox>
<group>
<layout>hbox</layout>
<halign>right</halign>
<text>
<label>Clouds</label>
<label>Building density</label>
<enable>
<property>/sim/rendering/random-buildings</property>
</enable>
</text>
<slider>
<name>building-density</name>
<min>0</min>
<max>10.0</max>
<property>/sim/rendering/building-density</property>
<binding>
<command>dialog-apply</command>
<object-name>building-density</object-name>
</binding>
</slider>
<text>
<label>12345678</label>
<format>%.2f</format>
<live>true</live>
<property>/sim/rendering/building-density</property>
<enable>
<property>/sim/rendering/random-buildings</property>
</enable>
</text>
</group>
<button>
<legend>Reload Scenery</legend>
<binding>
<command>reinit</command>
<subsystem>tile-manager</subsystem>
</binding>
</button>
<group>
<layout>vbox</layout>
<stretch>1</stretch>
</group>
<group>
<layout>hbox</layout>
<text>
<label>Atmospheric effects</label>
<halign>left</halign>
</text>
<hrule>
@ -306,6 +330,28 @@
</hrule>
</group>
<checkbox>
<halign>left</halign>
<label>Particles (smoke, dust, spray)</label>
<name>particles</name>
<property>/sim/rendering/particles</property>
<binding>
<command>dialog-apply</command>
<object-name>particles</object-name>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Precipitation</label>
<name>precipitation</name>
<property>/sim/rendering/precipitation-gui-enable</property>
<binding>
<command>dialog-apply</command>
<object-name>precipitation</object-name>
</binding>
</checkbox>
<!--
<checkbox>
@ -398,11 +444,6 @@
</text>
</group>
<group>
<layout>vbox</layout>
<stretch>1</stretch>
</group>
</group>
<vrule/>

View file

@ -110,6 +110,8 @@ Started September 2000 by David Megginson, david@megginson.com
<random-objects type="bool" userarchive="y">true</random-objects>
<random-vegetation type="bool" userarchive="y">true</random-vegetation>
<vegetation-density type="double" userarchive="y">1.0</vegetation-density>
<random-buildings type="bool" userarchive="y">false</random-buildings>
<building-density type="double" userarchive="y">1.0</building-density>
<horizon-effect type="bool"
userarchive="y">false</horizon-effect>
<point-sprites type="bool"