Board index FlightGear Development Effects and shaders

Glass

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

Glass

Postby Thorsten » Mon Feb 23, 2015 4:39 pm

Playing with some ideas for an environment-responsive glass effect.

Frost on the F-16 canopy:

Image
Image

Starting with rain splashes (that's a hard one, as it's dynamical and the pattern changes a lot with airspeed...). Looks better in reality because you see the splash impacts.

Image
Thorsten
 
Posts: 9368
Joined: Mon Nov 02, 2009 8:33 am

Re: Glass

Postby zlsa » Mon Feb 23, 2015 4:42 pm

This looks awesome! How is the frost effect done?
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: Glass

Postby daveculp » Mon Feb 23, 2015 4:46 pm

Looks great! The frost pics remind me that scratches alone would really enhance the reality.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Glass

Postby wlbragg » Mon Feb 23, 2015 5:58 pm

Looks like someone tried to use the wiper spray during subzero temps.
Looks good, don't ya just hate that?

Is there potential to use wipers to temporarily clear the effect?
That would be double awesome!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3945
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass

Postby Thorsten » Mon Feb 23, 2015 6:28 pm

This looks awesome! How is the frost effect done?


Simple - it's a Perlin-noise modulated overlay texture.

Looks great! The frost pics remind me that scratches alone would really enhance the reality.


Funny you'd post here Dave, because I meant to contact you about this anyway. You must know how rain from the cockpit in-flight looks like - is it like in a car on a highway, or different? Do the drops move upward after impact, or does everything just splash away?
Thorsten
 
Posts: 9368
Joined: Mon Nov 02, 2009 8:33 am

Re: Glass

Postby daveculp » Mon Feb 23, 2015 6:44 pm

It looks much like it does in a car. The drops smear upwards and distort the image through the smear. Maybe I can get a pic today. It's raining here.

It has to rain pretty hard for the wipers to be needed. I only use them 2 or 3 times per year. Usually the air flow stretches the smears and dissipates them fast enough.

On a fighter - type canopy the smears stretch and dissipate rapidly.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Glass

Postby tigert » Mon Feb 23, 2015 6:48 pm

This looks amazingly nice!

Frosted windows in a C172 like the "snowline based on metar temperature" would be fun, then once you start the engine, start defrosting first near the vents and then further until in like 5 mins the whole cockpit is cleaned :-) Could do the same with fogged windows during humid weather.

Gliders frost when soaring in mountain wave as the temperature can get very low, and there is no heater, the exhaled air will create moisture that freezes in the canopy.

Aircraft surface and window ice when flying in icing conditions would look really nice this way, but I guess one has to draw the line of what should be modelled somewere :-)

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

Re: Glass

Postby wlbragg » Mon Feb 23, 2015 7:46 pm

window ice when flying in icing conditions would look really nice this way

If the shader's there, I don't see any reason why a modeler/aircraft system designer couldn't easily account for those conditions and activate the shader when they occur.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3945
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass

Postby Thorsten » Tue Feb 24, 2015 6:54 am

It looks much like it does in a car. The drops smear upwards and distort the image through the smear. Maybe I can get a pic today. It's raining here.

It has to rain pretty hard for the wipers to be needed. I only use them 2 or 3 times per year. Usually the air flow stretches the smears and dissipates them fast enough.

On a fighter - type canopy the smears stretch and dissipate rapidly.


Thanks - that's helpful already.

Frosted windows in a C172 like the "snowline based on metar temperature" would be fun, then once you start the engine, start defrosting first near the vents and then further until in like 5 mins the whole cockpit is cleaned Could do the same with fogged windows during humid weather.


The idea is to have basically all these effects modeled aircraft side.

For instance, the shader can't know under what angle the airflow will go over a window as a function of airspeed (and hence predict the splash angle for drops) - but a human can usually make a reasonable guess just by looking at the aircraft. So the modeler will have to provide the splash vector as function of airspeed. Likewise, the modeler will have to decide under what conditions frost appears, when glass would fog, what to do to remove fog and frost,... the shader will just accept flags which affect the visuals and do the light scattering physics of these (ice flowers and fog are strong Mie scatterers, they are way more pronounced if the sun falls through them, and that I can model easily).

I guess similar with a scratch/dirt model - the shader can draw the overlay texture, but the modeler has to decide when this happens.
Thorsten
 
Posts: 9368
Joined: Mon Nov 02, 2009 8:33 am

Re: Glass

Postby Thorsten » Wed Feb 25, 2015 4:42 pm

Interaction with lighting - color change and Mie scattering of the frost effect is done. Looks quite cool in the right light...

Image

Progress on rain as well - for a procedural effect, it doesn't look too bad. And once the aircraft starts moving, the droplets are pushed along with the flow - looks actually quite compelling.

Image
Image
Thorsten
 
Posts: 9368
Joined: Mon Nov 02, 2009 8:33 am

Re: Glass

Postby wlbragg » Thu Feb 26, 2015 3:49 am

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

Re: Glass

Postby CaptB » Thu Feb 26, 2015 1:40 pm

That's so beautiful. Makes me wish I knew GLSL more :D
CaptB
 
Posts: 474
Joined: Thu May 23, 2013 6:36 pm
Callsign: EKCH_AP
IRC name: CAPTB
Version: 2018.1
OS: Xubuntu, Win7 64

Re: Glass

Postby Thorsten » Sat Feb 28, 2015 1:05 pm

Static cube-map support for reflections of the cockpit interior on the glass:

Image

Is there actually any plane which has an uv-mapped and textured glass surface for testing fogging map functionality? I understand that's usually not needed for glass so the planes I've looked at it don't seem to have it, but maybe there is one anyway.
Thorsten
 
Posts: 9368
Joined: Mon Nov 02, 2009 8:33 am

Re: Glass

Postby Catalanoic » Sat Feb 28, 2015 2:21 pm

This is a good graphical feature!!
User avatar
Catalanoic
 
Posts: 956
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Glass

Postby Lydiot » Sat Feb 28, 2015 6:12 pm

I have a man-crush on you Thorsten. Awesome work!
Lydiot
 
Posts: 922
Joined: Tue Oct 22, 2013 10:50 pm

Next

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 2 guests