Board index FlightGear Development Effects and shaders

Volumetric grass (was 3D textures and volumetric data)

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

Re: Volumetric grass (was 3D textures and volumetric data)

Postby erik » Mon May 22, 2017 1:25 pm

Just my 2 cents, but the full grass implementation only looks good for tennis courts when looking at the images. The overlay looks more natural to me.
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Volumetric grass (was 3D textures and volumetric data)

Postby icecode » Mon May 22, 2017 2:13 pm

I agree with using textures, I just removed the need for them to experiment and hopefully avoid tiling issues. I don't agree with using alpha testing though. Your comparison is not "fair": I just pasted a fixed bright green color into the fragment shader while the base layer in your implementation is a fully developed feature.

Anyway I don't mind. If you feel that's the way to go, go ahead. Feel free to push your implementation upstream, you have my support.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Mon May 22, 2017 2:28 pm

Your comparison is not "fair": I just pasted a fixed bright green color into the fragment shader while the base layer in your implementation is a fully developed feature.


Well, sort of and sort of not. I agree that the color is not optimal for Bergen, but it uses the standard global summer effect used pretty much everywhere else in the world, I didn't specifically pick a badly matched location.

One point is that discarding the overlay in late autumn and showing the base layer gets you there 'right now', whereas in a full grass model you have to work hard to get the same.

I also think the point that the colors are too flat is valid. You can argue well, if we'd change colors and insert more noise octaves, could this not be fixed? Maybe, maybe not - as I said, I tried and ended up discarding a pure color overlay strategy.

My point is, I'm not convinced (for the reasons mentioned) full grass is the way forward - but it's not a closed deal - if you believe the issues can be addressed, by all means please give it a try with different colors.

Otherwise I'll add the property config options to my current solution based on your latest geometry shader and push that for testing and evaluation.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby erik » Mon May 22, 2017 2:33 pm

I just want to add that for cornfields the dense grass solution is still great:
https://www.shutterstock.com/video/clip ... field.html

It just needs to be about 1 to 2 meter high then.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Mon May 22, 2017 2:35 pm

Yeah, they're a lot more homogeneous... But the seasonal variation is going to be... tricky.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby icecode » Mon May 22, 2017 2:52 pm

showing the base layer gets you there 'right now', whereas in a full grass model you have to work hard to get the same.


That's why I just agreed on the base layer solution. I don't have the time to work on a feature that might or might not be slightly better than what you proposed.

It just needs to be about 1 to 2 meter high then.


Shell texturing doesn't work very well on big heights, since you can see the gap between each layer at low view angles. Might be worth to give it a try anyway.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Volumetric grass (was 3D textures and volumetric data)

Postby erik » Mon May 22, 2017 3:01 pm

Icecode GL wrote in Mon May 22, 2017 2:52 pm:Shell texturing doesn't work very well on big heights, since you can see the gap between each layer at low view angles. Might be worth to give it a try anyway.

Another option is to just raise the effect, je hardly ever see the lower part of the corn plants anyhow and the canopy has a fairly even hight distribution.

But this might be for later concern.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Mon May 22, 2017 5:47 pm

Shell texturing doesn't work very well on big heights, since you can see the gap between each layer at low view angles.


Actually, can't we tell the geometry shader we want the 'sides' of the extruded triangles closed? Then we could run a comparison of the normal with the up vector to decide what to draw - either shell from above or vertical bent stripes from the side. Not ideal, but might hold for larger distances...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby icecode » Tue May 23, 2017 12:40 pm

What you are describing is exactly what is done in the full implementation of shell texturing. By adding those 'sides' at the silhouette edges, called fins, you get good results at low view angles. The problem is that you need relatively high poly models. A single triangle of FG's scenery can span across tens of meters, so I don't think fins would help.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Tue May 23, 2017 6:46 pm

Admittedly I don't see where poly detail comes in... unless you fly *very* low... I suspect it's in what you paint on the fins in the fragment shader that matters...

Anyway, I'm making good progress fully integrating this into ALS (geez, I have introduced too many goodies that all need to be supported...) and property-configurable for materials.xml

Here's how it looks with support for modulation by the overlay texture pattern, season, snowfall and brightness/gamma filtering all together.

Image
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby wlbragg » Tue May 23, 2017 8:52 pm

Wow, really nice!
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: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Wed May 24, 2017 1:18 pm

A first version of this is now on FGData.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby icecode » Wed May 24, 2017 2:23 pm

Just tried it and it looks really, really nice! I don't think you need any more help with that, it's looking great already. But anyway if you feel like needing anything else, I'm always willing to help.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Volumetric grass (was 3D textures and volumetric data)

Postby Thorsten » Wed May 24, 2017 4:33 pm

Well - big thanks to you for coming up with the effect in the first place. I just did some polishing...

But anyway if you feel like needing anything else, I'm always willing to help.


I think we're good for the time being, the rest is artwork and tuning... you can go and look into the next cool thing :mrgreen:
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Volumetric grass (was 3D textures and volumetric data)

Postby erik » Fri May 26, 2017 1:51 pm

This causes a drop in framerate of 50% for me (from 60 to 30 fps). So while looking great it's not for me at this time.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 5 guests