Likewise, at some point we had a collection of African savannah trees - and while northern boreal trees look strange in the savannah, the savannah trees don't work in Europe.
Previously I assumed that this needs modifications to the core, or to the landclass definitions. But it turns out that there is a partial solution to the problem, i.e. textures, trees and random objects can be determined by the startup location, though not currently at runtime. So the solution does not work for transcontinental flights. It also doesn't change textures when you use the menu to set a different location (it seems, materials.xml is parsed only at startup, although there may be a command to force it to parse again?).
It works by adding conditionals on position/latitude-deg and position/longitude-deg into materials.xml and define a separate entry for every region you want to model. Here's a demo which uses normal irrigated crop texture for longitudes below 60 deg, but switches to a rice terrace texture when above 60 deg, i.e. in Asia.
- Code: Select all
<material>
<condition>
<and>
<equals>
<property>sim/startup/season</property>
<value>summer</value>
</equals>
<less-than>
<property>position/longitude-deg</property>
<value>60.0</value>
</less-than>
</and>
</condition>
<effect>Effects/crop</effect>
<name>IrrCropPastureCover</name>
<name>IrrCrop</name>
<name>Orchard</name>
<name>Olives</name>
<name>Vineyard</name>
<name>Rice</name>
<texture>Terrain/irrcrop1.png</texture>
<texture>Terrain/irrcrop2.png</texture>
<texture>Terrain/irrcrop3.png</texture>
<xsize>2000</xsize>
<ysize>2000</ysize>
<!--<texture>Terrain/rice1.png</texture>
<xsize>2000</xsize>
<ysize>2000</ysize>-->
<light-coverage>2000000.0</light-coverage>
<solid>1</solid>
<friction-factor>0.9</friction-factor>
<rolling-friction>0.3</rolling-friction>
<bumpiness>0.6</bumpiness>
<load-resistance>1e30</load-resistance>
<object-group>
<range-m>5000</range-m>
<object>
<path>Models/Buildings/silo.ac</path>
<coverage-m2>5000000</coverage-m2>
<heading-type>random</heading-type>
</object>
<object>
<path>Models/Buildings/red-barn.ac</path>
<path>Models/Buildings/horse-stable.ac</path>
<path>Models/Buildings/cow-stable.ac</path>
<path>Models/Agriculture/farmhouse1.ac</path>
<path>Models/Agriculture/farmhouse2.ac</path>
<path>Models/Agriculture/farmhouse3.ac</path>
<coverage-m2>750000</coverage-m2>
<heading-type>random</heading-type>
</object>
</object-group>
<!-- Disabled to avoid a tremendous osg performance penalty when
deleting scenery tiles, caused by tens of thousands of shared
horse/cow objects. Need a better implementation!
<object-group>
<range-m>1000</range-m>
<object>
<path>Models/Fauna/cow.ac</path>
<coverage-m2>100000</coverage-m2>
<heading-type>random</heading-type>
</object>
<object>
<path>Models/Fauna/horse.ac</path>
<coverage-m2>300000</coverage-m2>
<heading-type>random</heading-type>
</object>
</object-group> -->
<wood-coverage>500000.0</wood-coverage>
<tree-texture>Textures/Trees/mixed-summer.png</tree-texture>
<tree-varieties>8</tree-varieties>
<tree-range-m alias="/params/forest/tree-range-m"/>
<tree-height-m>20.0</tree-height-m>
<tree-width-m>12.0</tree-width-m>
</material>
<material>
<condition>
<and>
<equals>
<property>sim/startup/season</property>
<value>summer</value>
</equals>
<greater-than>
<property>position/longitude-deg</property>
<value>60.0</value>
</greater-than>
</and>
</condition>
<effect>Effects/crop</effect>
<name>IrrCropPastureCover</name>
<name>IrrCrop</name>
<name>Orchard</name>
<name>Olives</name>
<name>Vineyard</name>
<name>Rice</name>
<texture>Terrain/rice1.png</texture>
<xsize>2000</xsize>
<ysize>2000</ysize>
<light-coverage>2000000.0</light-coverage>
<solid>1</solid>
<friction-factor>0.9</friction-factor>
<rolling-friction>0.3</rolling-friction>
<bumpiness>0.6</bumpiness>
<load-resistance>1e30</load-resistance>
<object-group>
<range-m>5000</range-m>
<object>
<path>Models/Buildings/silo.ac</path>
<coverage-m2>5000000</coverage-m2>
<heading-type>random</heading-type>
</object>
<object>
<path>Models/Buildings/red-barn.ac</path>
<path>Models/Buildings/horse-stable.ac</path>
<path>Models/Buildings/cow-stable.ac</path>
<path>Models/Agriculture/farmhouse1.ac</path>
<path>Models/Agriculture/farmhouse2.ac</path>
<path>Models/Agriculture/farmhouse3.ac</path>
<coverage-m2>750000</coverage-m2>
<heading-type>random</heading-type>
</object>
</object-group>
<!-- Disabled to avoid a tremendous osg performance penalty when
deleting scenery tiles, caused by tens of thousands of shared
horse/cow objects. Need a better implementation!
<object-group>
<range-m>1000</range-m>
<object>
<path>Models/Fauna/cow.ac</path>
<coverage-m2>100000</coverage-m2>
<heading-type>random</heading-type>
</object>
<object>
<path>Models/Fauna/horse.ac</path>
<coverage-m2>300000</coverage-m2>
<heading-type>random</heading-type>
</object>
</object-group> -->
<wood-coverage>500000.0</wood-coverage>
<tree-texture>Textures/Trees/mixed-summer.png</tree-texture>
<tree-varieties>8</tree-varieties>
<tree-range-m alias="/params/forest/tree-range-m"/>
<tree-height-m>20.0</tree-height-m>
<tree-width-m>12.0</tree-width-m>
</material>
Since there is always the condition on summer or winter texture, any additional customization has to be wedged in with an <and> tag, so the basic structure without all the rest is
- Code: Select all
<condition>
<and>
<equals>
<property>sim/startup/season</property>
<value>summer</value>
</equals>
<less-than>
<property>position/longitude-deg</property>
<value>60.0</value>
</less-than>
</and>
</condition>
which you can make as interesting as you like by adding more conditions on latitude and longitude. Of course, the sum of all regions should cover the whole globe, and regions shouldn't overlap, so some care is needed. But since you declare a separate material for every region, you can alter anything you like - textures, random objects, tree textures, tree density, ... you name it.
Since regionalizing Earth in this way is rather cumbersome, at the moment I'd use it to avoid the worst clashes, i.e. human-made structures, but if someone is in the mood to work out the conditionals for the different continents / temperature zones, why not...
Edit:
I've made a package of my current setup available as regional textures v0.1. The file writes into /materials.xml /Textures/Terrain/ and /Textures.high/Terrain - save your originals before installing the package.
Currently I'm using regional textures for city and suburb/town as well as for irrigated crops - see some examples:
City, town and fields in Europe - Innsbruck
City and fields in USA - California
City and rice fields in Asia - Kathmandu
Some scenery in other parts of the world:
Coastline near Seattle - Pacific Northwest custom scenery
Columbia river gorge - Pacific Northwest custom scenery
Annecy and Annecy-les-vieux - France custom scenery
Rural terrain near Geneva - France custom scenery
Honolulu - Hawaii terrasync scenery
Haleakala crater - Hawaii terrasync scenery
Important: The textures are from a variety of sources, some of them not GPL-compatible. The pack is intended as an experiment for myself to see what can be done with some effort. I've used
* default Flightgear textures
* old/so far unused Flightgear textures
* textures posted by Statto on the devel list
* Alternative summer textures 2.0.0 by Reptile
* Photo texture pack by Horacio
* textures from public texture servers
* and finally textures extracted from aerial photographs where I have permission of the photographer to redistribute under GPL
* ... probably something I forgot
Almost all textures are altered by myself to avoid hard contrasts - usually some hue rotation and desaturation is done.
If anyone wants to have a go, enjoy!