Board index FlightGear Development New features

3d volumetric airport grass

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: 3d volumetric airport grass

Postby Thorsten » Tue Feb 24, 2015 8:33 am

My bad - try adding

<tree-effect>Effects/tree-grass</tree-effect>
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: 3d volumetric airport grass

Postby wlbragg » Tue Feb 24, 2015 8:43 am

I saw that and was patiently waiting for instruction on what it was for, duuuu!

Thx
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: 3d volumetric airport grass

Postby wlbragg » Tue Feb 24, 2015 7:44 pm

FYI:
I added it and it corrected the shadow showing up on the grass but I am getting 3 quads on grass regardless of shadow on or off. The third quad changes position depending on shadow on or off.
It looks fine, I'm not complaining, just observing a behavior different from what was indicated.

Code: Select all
<material>
    <effect>Effects/airfield</effect>
    <name>Grass</name>
    <name>Airport</name>
    <name>AirportKeep</name>
    <name>Greenspace</name>
    <texture>Terrain/airport.png</texture>
    <xsize>125</xsize>
    <ysize>125</ysize>
    <light-coverage>4000000.0</light-coverage>
    <diffuse>
      <r>0.93</r>
      <g>0.95</g>
      <b>0.93</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.1</r>
      <g>0.12</g>
      <b>0.1</b>
      <a>1.0</a>
    </specular>
    <shininess>1.2</shininess>
    <solid>1</solid>
    <friction-factor>0.7</friction-factor>
    <rolling-friction>0.1</rolling-friction>
    <bumpiness>0.1</bumpiness>
    <load-resistance>1e30</load-resistance>
    <tree-effect>Effects/tree-grass</tree-effect>
    <!--uncomment this to get volumetric grass on airport keep -->
    <wood-coverage>3.0</wood-coverage>
    <tree-texture>Grass/grass5a.png</tree-texture>
    <tree-varieties>5</tree-varieties>
    <tree-range-m>200.0</tree-range-m>
    <tree-height-m>0.4</tree-height-m>
    <tree-width-m>1.0</tree-width-m>
    <!--END uncomment this to get volumetric grass on airport keep -->
  </material>
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: 3d volumetric airport grass

Postby Thorsten » Wed Feb 25, 2015 6:22 am

I added it and it corrected the shadow showing up on the grass but I am getting 3 quads on grass regardless of shadow on or off.


To confirm - you see three grass quads if you switch shadows off in the GUI and the GUI triggers a scenery reload? What about trees when the shadow is off and the GUI has initiated a reload - they should have three quads then as well.

(If you just toggle the button and don't close GUI, all that happens is the effect switch rendering a quad as quad or shadow - the number of quads generated can only be changed at load time, not a runtime, so any change to the shadow button triggers a reload once you press okay in the GUI)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: 3d volumetric airport grass

Postby wlbragg » Wed Feb 25, 2015 6:51 am

To confirm - you see three grass quads if you switch shadows off in the GUI and the GUI triggers a scenery reload?

No, you were correct, that triggers two quads.
It triggers three if you switch shadows on in the GUI and the GUI triggers a scenery reload.
If you have three quads and switch shadows on and off, (without reload), it swaps the position on one of the three quads.

What about trees when the shadow is off and the GUI has initiated a reload - they should have three quads then as well

Yes.

It was my misunderstanding, it's just as your stating.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: 3d volumetric airport grass

Postby Catalanoic » Sat Feb 28, 2015 10:38 am

Please, explain (step by step) on the first post or our Wiki how is possible to do this. Thankyou, this adds a lot of scenery realism on FG!!
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: 3d volumetric airport grass

Postby Thorsten » Sat Feb 28, 2015 11:17 am

The Wiki already is your friend...

I'm almost certain the shot in question is a still image and has been postprocessed by graphics software, because I for sure can't run that vegetation density on my gaming rig without going into single digit framerates.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: 3d volumetric airport grass

Postby Catalanoic » Sat Feb 28, 2015 11:48 am

Thorsten wrote in Sat Feb 28, 2015 11:17 am:The Wiki already is your friend...

I'm almost certain the shot in question is a still image and has been postprocessed by graphics software, because I for sure can't run that vegetation density on my gaming rig without going into single digit framerates.

What a pity! I know. i think that we need this improved feature for default. I can't find any Grass/Airport/AirportKeep/Greenspace landclass on Materials/regions/global-summer.xml. Where i should copy the lines? Thankyou!
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: 3d volumetric airport grass

Postby Milo » Sat Feb 28, 2015 2:35 pm

Hi Catalanolc,
The lines are laready on the global-summer.xml file. You simply need to open the file on Notepad++ for instance, and uncomment it by removing the <-- . Remember that you must be using the last GIT version of FGFS.
Regrds.
GVX0250 _ FGFS v.Git _ Win10_ Asus N76V, RAM8GB, CPU: i7 2.4
Milo
 
Posts: 48
Joined: Mon Feb 07, 2011 12:11 am
Location: Luxembourg
Callsign: GAX0250
Version: Git
OS: Win8.1

Re: 3d volumetric airport grass

Postby wlbragg » Sat Feb 28, 2015 3:36 pm

The section your looking for starts around lines 498 in fgdata/Materials/regions/global-summer.xml
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: 3d volumetric airport grass

Postby Catalanoic » Sat Feb 28, 2015 3:48 pm

wlbragg wrote in Sat Feb 28, 2015 3:36 pm:The section your looking for starts around lines 498 in fgdata/Materials/regions/global-summer.xml

Thankyou! Something that does not appear in the wiki article.
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: 3d volumetric airport grass

Postby Catalanoic » Sun Mar 01, 2015 12:06 pm

It worked for me. We need a high Vegetation level to made this, tested on Girona Airport (LEGE, Catalonia, Spain) with a 2013 i7 CPU and a 6-year old GPU with 6-10fps to highest vegetation level:
Image
Maybe a good step forward is the optimization of this feature. Some interesting points:
Automatic and gradually tile/grass amount decreasing by determined meters from the observer point
Reduced grass texture (with higher amount of grass we don't need so much detail, unlike trees)
Maybe two types of grass: short and long
We also need a Activating/Deactivating button on the Graphics window.
Independent Grass level control (of Vegetation level control)
Possibly to see that out the airport, on selected lands.
Movable grass with the wind
Apparently this don't works with DDS textures activated

Thanks!
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: 3d volumetric airport grass

Postby Thorsten » Sun Mar 01, 2015 12:15 pm

Automatic and gradually tile/grass amount decreasing by determined meters from the observer point


We have that already.

Reduced grass texture (with higher amount of grass we don't need so much detail, unlike trees)


Practically doesn't matter for framerate, only for GPU memory consumption, and there the texture is a small correction to what the quads take.

Independent Grass level control (of Vegatation level control)


Makes no sense, as you can control the base amount of grass in the xml declaration - the vegetation slider is just a multiplier, and that's needed to juggle performance needs.

Possibly to see that out the airport, on selected lands.


Just put it in - the xml is the same. Beware of the memory footprint though, this will quickly become crippling.

Apparently this don't works with DDS textures


It sure does if you put it into the material definitions there.

I suggest you spend some time with Docs/README.materials, it explains how you can do all of that yourself :-)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: 3d volumetric airport grass

Postby Catalanoic » Sun Mar 01, 2015 1:15 pm

Thankyou for this information! We have the tree-range-m declaration that seems to spawn (just doing it visible) the same amount of grass on the whole area (200 metres away for default). But i think, from land (or immediatly at takeoff/landing) we need a field of view between 500-800m of grass to see no line of disappearing grass (or a drastic color reduction/shift). This is impossible with higher vegetation amount but a solution is defining the highest amount of 15-20 metres around the point of the observer (exactly the point of the camera, not the aircraft or the starting point) and decreasing gradually to zero to the end of the marked area defined on tree-range-m. I've no idea how to do this with the existing variables or declarations on this xml file. I'm not a skilled programmer.
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: 3d volumetric airport grass

Postby Thorsten » Sun Mar 01, 2015 3:52 pm

We have the tree-range-m declaration that seems to spawn (just doing it visible) the same amount of grass on the whole area (200 metres away for default).


And fills the region out to 400 m with a decreasing grass density, in ten steps to be precise.

But i think, from land (or immediatly at takeoff/landing) we need a field of view between 500-800m of grass to see no line of disappearing grass (or a drastic color reduction/shift)


You can't really hide the disappearance of a volumetric object in the distance in general - it has different lighting properties just to begin with. This won't work - the current strategy is pretty much as good as it gets in my experience.

This is impossible with higher vegetation amount but a solution is defining the highest amount of 15-20 metres around the point of the observer (exactly the point of the camera, not the aircraft or the starting point) and decreasing gradually to zero to the end of the marked area defined on tree-range-m.


Works from the ground, but would look very odd once you're a few meters in the air (btw - pretty much all rendering code is camera-centered and there's nothing special about the aircraft from a rendering perspective - it's just another model in the scene).

I've no idea how to do this with the existing variables or declarations on this xml file. I'm not a skilled programmer.


I'm afraid you have to work with what we have. It may not give you what you want (in fact, I expect it will not) - rendering millions of grass blades is not something we can reasonably expect to accomplish.

And we won't change the scheme in the mid-future. The current reduction of tree density in the distance is part of a general paged LOD scheme and can't be easily ripped out or altered.

It's in general much easier to post wishlists than to get things to work :-)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 7 guests