Board index FlightGear Development Effects and shaders

Plantation effect

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: Plantation effect

Postby ludomotico » Fri Feb 28, 2020 4:38 pm

wlbragg wrote in Fri Feb 28, 2020 3:18 pm:Is this documented anywhere? A couple code snip-its would be useful.


I'll post my tests when I'm back at home, but it is extremely easy:

- Create a vineyard material. I copied one of the already existing sand/dirty materials as a base.
- add the forest effect.
- Add
Code: Select all
<plantation>true</plantation>
.
- Configure tree size, density and type to something similar to a plantation. For vinayards, I'm using "mixed-shrub.png" with a max-size 2 or 3 meters (most plants in "mixed-shrub.png" are half the max size), width 6 meters and a treedensity of 80 (or some similar values) I played with parameters until I got something without a hit on FPS.

Tonight, I'll test the plantation effect for orchards and olive fields.
User avatar
ludomotico
 
Posts: 1110
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: Plantation effect

Postby Thorsten » Fri Feb 28, 2020 6:11 pm

Unfortunately, as far as I can tell changing the parameters for this effect in the materials file does not actually change the final displayed heights due to the special code path for creating random trees


It sure does (provided the relevant effect is switched on...)
Thorsten
 
Posts: 11649
Joined: Mon Nov 02, 2009 8:33 am

Re: Plantation effect

Postby ludomotico » Sat Feb 29, 2020 12:28 am

My proposal for vineyards (plenty of them in my area)

Code: Select all
  <material>
    <name>Vineyard</name>
    <texture-set>
      <texture>Terrain/gravel_gray.png</texture>
      <texture n="12">Terrain/gravel_brown.png</texture>
      <texture n="13">Terrain/california-rock.png</texture>
      <texture n="14">Terrain/gravel_overlay.png</texture>
    </texture-set>
      <parameters>
         <grain_strength>0.5</grain_strength>
         <hires_overlay_bias>0.1</hires_overlay_bias>
      <transition_model>0.2</transition_model>
      </parameters>
    <xsize>2000</xsize>
    <ysize>2000</ysize>
    <light-coverage>4000000.0</light-coverage>
    <solid>1</solid>
    <friction-factor>0.9</friction-factor>
    <rolling-friction>0.1</rolling-friction>
    <bumpiness>0.7</bumpiness>   
    <load-resistance>1e30</load-resistance>
    <object-group>
      <object>
        <path>Models/Agriculture/farmhouse1.ac</path>
        <path>Models/Agriculture/farmhouse2.ac</path>
        <path>Models/Agriculture/farmhouse3.ac</path>
        <coverage-m2>50000</coverage-m2>
        <heading-type>random</heading-type>
      </object>
    </object-group>
    <plantation>true</plantation>
    <building-coverage>1500000.0</building-coverage>
    <tree-texture>Trees/mixed-shrub.png</tree-texture>
    <wood-coverage>100.0</wood-coverage>
    <tree-varieties>4</tree-varieties>
    <tree-height-m>2</tree-height-m>
    <tree-width-m>6.0</tree-width-m>
  </material>


Image

Image

I don't know how difficult could be switching randomly the direction of the crop lines in patches. Something similar to the agricultural effect?
User avatar
ludomotico
 
Posts: 1110
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: Plantation effect

Postby ludomotico » Sat Feb 29, 2020 12:32 am

I have also tested Olive fields, but I'm not satisfied with the effect from close up. The problem is not the effect, but the tree models I'm using.

Code: Select all
  <material>
    <name>Olives</name>
    <texture-set>
      <texture>Terrain/gravel_gray.png</texture>
      <texture n="12">Terrain/gravel_brown.png</texture>
      <texture n="13">Terrain/california-rock.png</texture>
      <texture n="14">Terrain/gravel_overlay.png</texture>
    </texture-set>
      <parameters>
         <grain_strength>0.5</grain_strength>
         <hires_overlay_bias>0.1</hires_overlay_bias>
      <transition_model>0.2</transition_model>
      </parameters>
    <xsize>2000</xsize>
    <ysize>2000</ysize>
    <light-coverage>4000000.0</light-coverage>
    <solid>1</solid>
    <friction-factor>0.9</friction-factor>
    <rolling-friction>0.1</rolling-friction>
    <bumpiness>0.7</bumpiness>   
    <load-resistance>1e30</load-resistance>
    <object-group>
      <object>
        <path>Models/Agriculture/farmhouse1.ac</path>
        <path>Models/Agriculture/farmhouse2.ac</path>
        <path>Models/Agriculture/farmhouse3.ac</path>
        <coverage-m2>50000</coverage-m2>
        <heading-type>random</heading-type>
      </object>
    </object-group>
    <plantation>true</plantation>
    <building-coverage>1500000.0</building-coverage>
    <tree-texture>Trees/olives.png</tree-texture>
    <wood-coverage>300.0</wood-coverage>
    <tree-varieties>4</tree-varieties>
    <tree-height-m>10</tree-height-m>
    <tree-width-m>6.0</tree-width-m>
  </material>


Image

Image

As you can see, I'm working on the southern-europe materials. The materials defined in current FGData for Southern Europe are nothing similar to the fields in my area :D
User avatar
ludomotico
 
Posts: 1110
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: Plantation effect

Postby frtps » Sat Feb 29, 2020 5:50 am

Hmm, seem to be some displacements at triangle boundaries. I didn't notice that when I was developing this.
frtps
 
Posts: 110
Joined: Sun Aug 05, 2018 9:58 am

Re: Plantation effect

Postby Thorsten » Sun Mar 01, 2020 7:12 am

The problem is not the effect, but the tree models I'm using.


Try a public domain image database like pexels - they should have some extractable variations of olive trees available. Generally baking tree textures is hard work, but very rewarding as the right type of tree really does make a difference in visuals.
Thorsten
 
Posts: 11649
Joined: Mon Nov 02, 2009 8:33 am

Re: Plantation effect

Postby abassign » Sun Mar 01, 2020 11:50 am

Finally a nice effect of agriculture very similar to that present in central Europe and northern Italy in the lowland areas. I would also like to see the vegetation of the Mediterranean scrub (south of France, Catalonia, Mediterranean islands, central south Italy, Africa near the Mediterranean)
abassign
 
Posts: 837
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Plantation effect

Postby Catalanoic » Sun Mar 01, 2020 1:42 pm

Its great to read you ludomotico here again! These vineyards look really great, i hope to see it flying low with cessnas or helis, or maybe even in jet takeoffs and landings from spanish and french airports
User avatar
Catalanoic
 
Posts: 1069
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Plantation effect

Postby GinGin » Mon Mar 02, 2020 8:50 am

That looks fantastic.
It will add a lot for Mediterranean sceneries for sure
GinGin
 
Posts: 1044
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Previous

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest