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 MountainFlyerN22 » Fri Dec 19, 2014 7:27 pm

The effect in that image is great. Sure would add alot to FG,especially on the backwoods dirt strips. And cropdusting.
User avatar
MountainFlyerN22
 
Posts: 505
Joined: Tue Sep 16, 2014 7:17 pm
Callsign: N22
Version: 3.0.0
OS: Windows 7 Pro.

Re: 3d volumetric airport grass

Postby abassign » Fri Feb 06, 2015 3:49 pm

When you think you can add this beautiful effect in the master repository to test it ?
abassign
 
Posts: 791
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: 3d volumetric airport grass

Postby Thorsten » Fri Feb 06, 2015 4:30 pm

The texture is actually there, but you need to declare it as 'tree' for the airport keep landclass yourself.

The reason is that we don't have the option (yet) to call different tree effects per landclass (I'm working on that one and that's basically agreed with Stuart) so it will be always shown if you show trees. But for grass, it's important that the color matches the underlying texture grass, and the volumetric texture looks great for ALS, but really bad for default and Rembrandt. So I think committing anything that screws things up for the Rembrandt users is not something that should be done.

(once a separate grass effect can be referenced, that can be set up to either show it ALS only or use different grass textures for Rembrandt)
Thorsten
 
Posts: 10819
Joined: Mon Nov 02, 2009 8:33 am

Re: 3d volumetric airport grass

Postby tigert » Thu Feb 12, 2015 7:35 am

abassign wrote in Fri Feb 06, 2015 3:49 pm:When you think you can add this beautiful effect in the master repository to test it ?


Everything needed for testing exists. Just edit your [data-dir] -> Materials -> global-summer.xml. Remember to take a backup if you are not sure about editing xml or want to easily back out :-)

Find around line 497 where there is this:

<material>
<effect>Effects/airfield</effect>
<name>Grass</name>
<name>Airport</name>
<name>AirportKeep</name>
<name>Greenspace</name>
<texture>Terrain/airport.png</texture>



Between those two last lines above, add these definitions:

<wood-coverage>10.0</wood-coverage>
<tree-texture>Trees/grass_blades.png</tree-texture>
<tree-varieties>1</tree-varieties>
<tree-range-m>200.0</tree-range-m>
<tree-height-m>0.3</tree-height-m>
<tree-width-m>1.0</tree-width-m>


So it looks like this:

<name>Greenspace</name>
<wood-coverage>10.0</wood-coverage>
<tree-texture>Trees/grass_blades.png</tree-texture>
<tree-varieties>1</tree-varieties>
<tree-range-m>200.0</tree-range-m>
<tree-height-m>0.3</tree-height-m>
<tree-width-m>1.0</tree-width-m>

<texture>Terrain/airport.png</texture>


..and it should work. You can see the reasons Thorsten mentioned above, how the texture could be improved somewhat and how it does not work perfectly in all cases, but it still gives a striking effect at times. Well worth playing with.

//Tuomas
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 9:57 am

Re: 3d volumetric airport grass

Postby tigert » Thu Feb 12, 2015 10:13 am

I was told you should also benefit from:

--prop:/sim/tile-cache/enable=false
--prop:/sim/rendering/plod-minimum-expiry-time-secs=30

with the grass stuff, should save memory.
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 9:57 am

Re: 3d volumetric airport grass

Postby wlbragg » Fri Feb 20, 2015 10:36 pm

The genius that walks among us is at work again. :D
Image
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4803
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: 3d volumetric airport grass

Postby MountainFlyerN22 » Fri Feb 20, 2015 11:57 pm

That screenshot looks very realistic. :D
User avatar
MountainFlyerN22
 
Posts: 505
Joined: Tue Sep 16, 2014 7:17 pm
Callsign: N22
Version: 3.0.0
OS: Windows 7 Pro.

Re: 3d volumetric airport grass

Postby wlbragg » Sat Feb 21, 2015 9:03 am

Second attempt to put together a decent grass texture set. There is much room for improvement. Every attempt at it educates exponentially.
Image

This is a set of 8 different grass textures.

I noticed with the default grass and the first set I did, there seemed to be no shadow and 2 quads total.
But this one with 8 textures had 3 quads, one being a shadow.
I had to turn tree shadows off and the 3rd quad is now a part of the 3 quad grass.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4803
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: 3d volumetric airport grass

Postby ludomotico » Sat Feb 21, 2015 10:34 am

Can you select textures depending on some condition?

My personal experience is in airfields of warm, Mediterranean countries, but I guess it would be the same in California or Florida. The last snapshot with clear grass is very, very realistic during the cold mornings of the winter (frozen dew). The same grass will look like the previous snapshot at noon.
User avatar
ludomotico
 
Posts: 1018
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: 3d volumetric airport grass

Postby Thorsten » Sat Feb 21, 2015 10:58 am

There's something weird going on with the seasons, with the texture reader jumping to the wrong row for some reason.

What you should see is this - all grass looking basically the same in summer

Image

and changing color in fall

Image

(and getting frosty in winter when the snowline reaches it).

I noticed with the default grass and the first set I did, there seemed to be no shadow and 2 quads total.
But this one with 8 textures had 3 quads, one being a shadow.
I had to turn tree shadows off and the 3rd quad is now a part of the 3 quad grass.


If tree shadows are on, grass (if the definition as on GIT is uncommented used) has three quads, trees two and a shadow. If tree shadows are off, grass has two quads, and so have trees. We have a global flag to use shadows, and we have a per-material flag to decide to render shadows.
Thorsten
 
Posts: 10819
Joined: Mon Nov 02, 2009 8:33 am

Re: 3d volumetric airport grass

Postby wlbragg » Sat Feb 21, 2015 8:18 pm

There's something weird going on with the seasons, with the texture reader jumping to the wrong row for some reason.

Are you seeing this with your grass on your system?

Or, if your referring to the look of the grass in the pictures I posted, that was designed that way. In fact the second picture I posted was the winter version of that set. The summer version had to much contrasting grasses to look right. I'm basically throwing grass in the air and seeing what sticks as I am no artist but can fake it with enough effort

I did get a third quad shadow with the grass using the "un-commented" block you referred to. It may be a local bug on my system, I'm not positive I cleaned out the original test simgear shadow code I was using prior to your git commit. So I would ignore it for now. I just wanted to make sure I knew what to expect.

My plan is to make a few single grass sets. Then combine some of those sets into various mult-grass sets.
I would accept some user supplied GPL grass geared for different parts of the world that we could ultimately submit to FG, (finding the grass is the difficult part for me).

Here is the first iteration of a single grass set I am almost happy with for the Midwest.

Summer
Image

Winter
Image

If I mix the summer and winter into a 2 grass set and change the original summer grass set saturation, for summer I get this

Image

For the winter 2 grass set I mixed the original 1 set winter grass with a new winter set, (actually it is the middle grass texture on my single grass texture sheet).
Image

Don't like the saturation on the single set winter, simply change the saturation and get this
Image

Speaking of the "middle grass texture on my single grass texture sheet", how do I get the middle grass texture (the one that is suppose to have snow on it) to render? Thorsten, is there a METAR string you have floating around that will activate the middle texture?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4803
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: 3d volumetric airport grass

Postby Thorsten » Sun Feb 22, 2015 6:49 am

Speaking of the "middle grass texture on my single grass texture sheet", how do I get the middle grass texture (the one that is suppose to have snow on it) to render?


Season and snowline determine what row is rendered. The order is easiest to spot for deciduous trees on a texture - if season is too late, they shed leaves, and if they're below the snowline they get snow on - which makes four combinations.
Thorsten
 
Posts: 10819
Joined: Mon Nov 02, 2009 8:33 am

Re: 3d volumetric airport grass

Postby wlbragg » Mon Feb 23, 2015 1:13 am

Last one for this set of grasses. Almost scarey how well this looks and works.

This is a 5 set summer
Image

Same 5 set for winter
Image

Funny thing, right after I posted the question on how to get the 3rd row (of 4 rows, winter/snow) to render via the METAR, our actual weather here in Kansas just happened to activate the local METAR station to report a string that showed that row. Needless to say I copied the string down so I can render the show set at will.

I can't wait to dive into Autumn effect!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4803
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: 3d volumetric airport grass

Postby Thorsten » Mon Feb 23, 2015 6:47 am

I think you may want to play also with the terrain texture layer (airport_grass.png I think) and adjust the color to the volumetric grass for best effect (note that you can use the alpha channel of the grass texture to control autumn coloring as well).
Thorsten
 
Posts: 10819
Joined: Mon Nov 02, 2009 8:33 am

Re: 3d volumetric airport grass

Postby wlbragg » Tue Feb 24, 2015 7:27 am

(if the definition as on GIT is uncommented used)

I'm using this
Code: Select all
<!--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 -->


If tree shadows are on, grass (if the definition as on GIT is uncommented used) has three quads, trees two and a shadow.

Image

If tree shadows are off, grass has two quads, and so have trees.

Image

I double checked all the pertinent fgdata code, reinstalled a clean simgear and new compile of FG.

Mine appears to be backwards.
I only notice these shadows though if I use a bright, sunny setting like "Fair Weather", otherwise I might not have even noticed they were there.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4803
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest