Board index FlightGear Development Scenery

To save a national park...

Questions and discussion about enhancing and populating the FlightGear world.

To save a national park...

Postby Thorsten » Wed Sep 26, 2012 7:36 pm

I've always been fascinated by some mountain formations - one of them is Auyantepui in the Canaima National Park in Venezuela.

On visiting it in Flightgear, I more or less found this (here in the dds texture scheme):

Image

instead of one of the most fascinating landscapes one can imagine. Multiple problems with the landclass assignment. The top of Auyantepui is partially classified as 'DryCrop' - and that gets by default a more or less European crop texture - which looks exceedingly silly in a place where actually a labyrinth of rocks and undergrows is (the top of the table mountain is a pretty inaccessible place if you can't fly...). The forest is classified as 'EvergreenForest' and hence gets needle trees where in reality tropical forest prevails. There is herbtundra for the rocky parts nearby. It fits together like... not at all. The topology is okay, but the texturing is completely screwed.

But - nowadays we have regional and procedural texturing, so after studying some aerial images and 60 minutes of re-assigning textures with dedicated regional definitions for the rain forest belt in South America, we get to see this:

Image

(It seems unbelieveable, but it's really almost the same scene, just with very different texturing - both looking from south of Auyantepui towards Angel Falls)

Now I'm going to do my sightseeing flight...
Thorsten
 
Posts: 10523
Joined: Mon Nov 02, 2009 8:33 am

Re: To save a national park...

Postby scotth1 » Wed Sep 26, 2012 10:48 pm

Excellent work.

Where did you get the texture images from? I would like to replace the suburban and add a new eucalypt texture for my region.
scotth1
 
Posts: 231
Joined: Thu Jan 01, 2009 3:27 am
Location: Australia
Callsign: VH-SHA
Version: Git next
OS: Linux 3.4.11

Re: To save a national park...

Postby spitfirebruce21 » Thu Sep 27, 2012 2:08 am

Thorsten that is AMAZING! Congratulations, do you plan to do this for everywhere? I love go see New Zealend worked on (Queenstown is BUITIFUL in real and i would love to see it improved to a nice standard).
Projects: YMBD, YJST
Horizon Flightgear Hangar!
Flightgear On Android
I may have a house on the ground, but my Home is in the sky.
User avatar
spitfirebruce21
 
Posts: 756
Joined: Thu Mar 03, 2011 6:39 am
Location: Adelaide outskirts (YMBD)
Callsign: ADL-FTW
Version: 2.6
OS: Windows 7 profesiona

Re: To save a national park...

Postby Thorsten » Thu Sep 27, 2012 7:03 am

Where did you get the texture images from?


I didn't actually add any new textures - it's all stuff which was already in my texture folder. The task was just assigning texture mixes to 5 landclasses which dominate the scene, change the trees everywhere and get the tree fractions right (I need much longer than 60 minutes to come up with a good new texture).

I would like to replace the suburban and add a new eucalypt texture for my region.


Find a good aerial shot from your region from anywhere, extract a texture from it, write a polite mail to the photographer including the texture and a screenshot from Flightgear how it looks like, explain that you have extracted this from his work and would like to include it in Flightgear to enhance the scenery around his place, explain the due to the nature of GPL we can unfortunately neither pay him nor even credit him the same way as you are neither paid nor credited, but lots of people will enjoy the scene much more then.

I've made very good experiences with this approach - one response was 'Here's a link to all my aerial images - take anything you like'.

Congratulations, do you plan to do this for everywhere?


You know, the world is a really big place, and 'everywhere' is lots of ground to cover...

I love go see New Zealend worked on (Queenstown is BUITIFUL in real and i would love to see it improved to a nice standard).


Yes, Queenstown is quite spectacular... Look, why don't you do this yourself? It's not like this is complicated, the tools are all lying around.

Here's a typical block of code (changing the EvergreenBroadCover to the rainforest it should be in the area):

Code: Select all
<material>
    <condition>
   <and>
   <equals>
    <property>sim/startup/season</property>
    <value>summer</value>
   </equals>
    <and>
     <greater-than>
      <property>position/longitude-deg</property>
      <value>-90.0</value>
     </greater-than>
     <less-than>
      <property>position/longitude-deg</property>
      <value>-30.0</value>
     </less-than>
     <greater-than>
      <property>position/latitude-deg</property>
      <value>-15.0</value>
     </greater-than>
     <less-than>
      <property>position/latitude-deg</property>
      <value>15.0</value>
     </less-than>
    </and>
   </and>
  </condition>
  <name>EvergreenBroadCover</name>
  <name>EvergreenForest</name>
  <effect>Effects/forest</effect>
 <texture-set>
   <texture>Terrain/rainforest-hawaii.png</texture>
   <texture n="11">Terrain/rainforest-hawaii.png</texture>
   <texture n="12">Terrain/dirtrock.png</texture>
   </texture-set>
  <xsize>2000</xsize>
  <ysize>2000</ysize>
  <light-coverage>10000000.0</light-coverage>
  <wood-coverage>4000.0</wood-coverage>
  <tree-texture>Trees/tropical-summer.png</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>18.0</tree-width-m>
  <rolling-friction>1</rolling-friction>
  <bumpiness>1</bumpiness>
</material>


I started from the original code block for EvergreenBroadCover, copied it before the original block and regionalized it by inserting replacing the original condition on summer with the season and geography condition:

Code: Select all
 <condition>
   <and>
   <equals>
    <property>sim/startup/season</property>
    <value>summer</value>
   </equals>
    <and>
     <greater-than>
      <property>position/longitude-deg</property>
      <value>-90.0</value>
     </greater-than>
     <less-than>
      <property>position/longitude-deg</property>
      <value>-30.0</value>
     </less-than>
     <greater-than>
      <property>position/latitude-deg</property>
      <value>-15.0</value>
     </greater-than>
     <less-than>
      <property>position/latitude-deg</property>
      <value>15.0</value>
     </less-than>
    </and>
   </and>
  </condition>


Now the definitions I make here override the defaults within the defined square. I then change the texture assignment.

Code: Select all
<texture-set>
   <texture>Terrain/rainforest-hawaii.png</texture>
   <texture n="11">Terrain/rainforest-hawaii.png</texture>
   <texture n="12">Terrain/dirtrock.png</texture>
   </texture-set>


uses a main rainforest texture I've created for forests on Hawaii, the same texture as detailed overlay (n=11) which usually works quite well in the case of forest and a yellowish rock as alternative/slope texture. The texture mix is automatically picked up by the procedural texturing code which takes care to mix appropriately based on terrain gradient and so on.

Finally we do the trees by changing the original tree texture to

Code: Select all
<tree-texture>Trees/tropical-summer.png</tree-texture>


At this point, you can also change the tree density by altering

Code: Select all
  <wood-coverage>4000.0</wood-coverage>


to a different number. Less than five minutes work per landclass. Half of my 60 minutes I spent looking if alternative mixes would come out better. And that's all it takes. So there's really no need for me to do it. Stuart and myself invested quite some work in getting all the tools to do these things together in a simple way - you can just use them.

(In order to use the procedural texturing, you need a recent GIT, this didn't make it into 2.8).
Thorsten
 
Posts: 10523
Joined: Mon Nov 02, 2009 8:33 am

Re: To save a national park...

Postby Thorsten » Fri Sep 28, 2012 6:32 am

Well, this definitely needed Angel Falls as well, and I always wanted to learn how the particle system works, so...

Image

(I wonder - do we have any waterfalls in the scenery elsewhere? It's actually quite nice to do them, Yosemite Falls would be another candidate to do with almost the same code - Niagara probably needs a different structure,...)

One thing I've noticed - the lighting of the particles seems odd, the waterfall is grey in early morning.
Thorsten
 
Posts: 10523
Joined: Mon Nov 02, 2009 8:33 am

Re: To save a national park...

Postby Gijs » Fri Sep 28, 2012 10:26 am

We do have at least one fountain, but no falls as far as I know. It does look very cool!
But I don't think the particle system would work for streams as wide as the Niagara Falls. Maybe a simply 3D model with textranslate would look okay for such falls. Or maybe some shader can do it more efficiently?

PS: The lower part of the river is mapped in OSM. The upper part only partly. So we can generate scenery where the water doesn't come out of the rocks ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9338
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: To save a national park...

Postby Thorsten » Fri Sep 28, 2012 11:46 am

But I don't think the particle system would work for streams as wide as the Niagara Falls.


Why not? - a single particle can grow huge. Angel Falls runs at just 6 particles per second, the contrail solution by particle system described in the Wiki uses 35 particles/second launched from 4 positions, so there appears to be some room. Well, I have Yosemite and Bridal Veil falls scheduled next, they should be easy...
Thorsten
 
Posts: 10523
Joined: Mon Nov 02, 2009 8:33 am

Re: To save a national park...

Postby Thorsten » Fri Sep 28, 2012 4:29 pm

Bridal Veil Falls

Image

Image

Yosemite Falls

Image

Image

(without exact topography, the possibility to remove trees from slopes and the rather rough landclass classification, there's only so much one can do... the comparison with reality remains depressing)
Thorsten
 
Posts: 10523
Joined: Mon Nov 02, 2009 8:33 am

Re: To save a national park...

Postby ot-666 » Fri Sep 28, 2012 4:56 pm

Thorsten wrote in Fri Sep 28, 2012 6:32 am:One thing I've noticed - the lighting of the particles seems odd, the waterfall is grey in early morning.


I figured for the particles you should use...
Code: Select all
<emissive>false</emissive>
<lighting>true</lighting>
to get the lighting right.

The water falls look great :D

Niagara falls would be nice too, but some better landcover would be great. (i was working on a hover dam model, but the landcover is very off)
Maybe volcanos could be done with particles too :wink:

Oliver
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: To save a national park...

Postby Philosopher » Fri Sep 28, 2012 5:42 pm

IMHO, I don't think Yosemite falls should die halfway down ;). It doesn't really die at all, according to the picture. Without knowing your settings, I also think it should be more white and opaque. Anyways, Nice idea!

P.S. I know nothing about scenery, but would it be possible to remove/not generate trees where there's a near-vertical slope?
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: To save a national park...

Postby stuart » Fri Sep 28, 2012 9:49 pm

Hi Philosopher,

Actually, depending on the season, the falls at Yosemite do appear to die half way down. I've been there twice in September (rock climbing) and what little water there is does appear to disappear half way down the face - just fades away.

Thorsten - we should be able to simply not generate trees on very steep slopes - I'll have a think about what is required.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1466
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: To save a national park...

Postby stuart » Fri Sep 28, 2012 10:49 pm

In fact, this is completely trivial - I just need to do a dot product of the tile normal against the up vector. I'm quite embarressed I didn't think of this when I originally wrote the code!

So, the questions is what function should we use for the vegetation cut-off. A simple option would be to stop generating trees when the surface angle is (say) > 60 degrees.

If we wanted to be more complicated we could have something that reduces the tree coverage after (say) 45 degrees.

Thorsten - you can probably suggest an algorithm off the top of your head :). Note that it will be evaluated at runtime for every triangle of every scenery tile, so it shouldn't be too complicated.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1466
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: To save a national park...

Postby i4dnf » Fri Sep 28, 2012 11:03 pm

Any reason why the face normal.z wouldn't be enough, just to avoid a dot()? (I know a dot is not that expensive...).
i4dnf
Retired
 
Posts: 745
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: To save a national park...

Postby stuart » Fri Sep 28, 2012 11:16 pm

The problems with attempting to do it in the tree shader is that we don't know the angle of the terrain triangle on which it sits.

Much easier simply to do this work when generating the trees in C++ code, where we're placing the trees on the triangle, and have access to the triangle normal.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1466
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: To save a national park...

Postby i4dnf » Fri Sep 28, 2012 11:23 pm

Yep, got that. I was asking why would you do the dot(faceNormal, upVector), since that is most likely to be equal to faceNormal.z (if my math is still right)?
i4dnf
Retired
 
Posts: 745
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 0 guests