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 12: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.
erik
 
Posts: 1503
Joined: Thu Nov 01, 2007 1:41 pm

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

Postby Icecode GL » Mon May 22, 2017 1: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 GL
 
Posts: 464
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

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

Postby Thorsten » Mon May 22, 2017 1: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: 9909
Joined: Mon Nov 02, 2009 8:33 am

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

Postby erik » Mon May 22, 2017 1: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
erik
 
Posts: 1503
Joined: Thu Nov 01, 2007 1:41 pm

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

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

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

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

Postby Icecode GL » Mon May 22, 2017 1: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 GL
 
Posts: 464
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

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

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

Icecode GL wrote in Mon May 22, 2017 1: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
erik
 
Posts: 1503
Joined: Thu Nov 01, 2007 1:41 pm

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

Postby Thorsten » Mon May 22, 2017 4: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: 9909
Joined: Mon Nov 02, 2009 8:33 am

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

Postby Icecode GL » Tue May 23, 2017 11:40 am

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 GL
 
Posts: 464
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

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

Postby Thorsten » Tue May 23, 2017 5: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: 9909
Joined: Mon Nov 02, 2009 8:33 am

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

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

Wow, really nice!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4116
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

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

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

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

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

Postby Icecode GL » Wed May 24, 2017 1: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 GL
 
Posts: 464
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

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

Postby Thorsten » Wed May 24, 2017 3: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: 9909
Joined: Mon Nov 02, 2009 8:33 am

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

Postby erik » Fri May 26, 2017 12: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
erik
 
Posts: 1503
Joined: Thu Nov 01, 2007 1:41 pm

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 2 guests