c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
79 stars 44 forks source link

Movement of raindrops on side windows should depend on airspeed and AoA #496

Closed wkitty42 closed 8 years ago

wkitty42 commented 8 years ago

The movement of the raindrops on the side windows should depend on the airspeed and AoA. Also, if the aircraft is not moving at all, then there should be little or no rain at all because the side windows are sheltered by the wings (acting like a roof).

Rain spots from blown rain is ok and maybe some running if there's enough drops accumulated together to overcome the adhesion factor and succumb to gravity making them roll down the window but certainly there shouldn't be any running down the door windows because of the wings acting like a roof.

gilbertohasnofb commented 8 years ago

I think this is one of the limitations of the techniques we use for rain drops, shadows, etc. Although I wouldn't completely agree that a side window would not be covered in raindrops during a thunderstorm, let's suppose the unique case of rain coming vertically down in light intensity so the window in a parked aircraft should be more or less dry. So now if the aircraft start moving, we would need to factor the angle of the rain coming, the speed of the aircraft, the aircraft speed, the intensity of rain of course, and fake the transition from dry window to thunderstorm wet window. This is basically impossible to be done I think, and even if it could I think it wouldn't worth the effort, to be frank.

gilbertohasnofb commented 8 years ago

I will leave this opened until we hear more opinions (@onox, @wlbragg), but my 2 cents is that we shouldn't bother.

wlbragg commented 8 years ago

Yeah, I wish we cold be a little more precise but I don't think we can. Maybe a little bit of programming could improve on it, but it wouldn't be much improvement for the amount of effort it would take. About the only thing we could do would be to remove the rain from the side windows. I guess we just have to imagine that we get no gentle rain in the FG world, only gales! :smile:

To test the thunder and lightning I just set the AW to Thunderstorm.

wkitty42 commented 8 years ago

On 11/02/2015 06:23 PM, Gilberto Agostinho wrote:

I think this is one of the limitations of the techniques we use for rain drops, shadows, etc.

yes, i understand that... that's why i mentioned about the possibility if the cube map might be able to be broken apart or (new thought) even have a second cube map with holes where the door windows are that could be switched out for the full cube map when rolling above a certain speed while on the ground...

Although I wouldn't completely agree that a side window would not have rain in a thunderstorm, let's suppose that the rain is coming vertically down and lightly so the window in a parked aircraft should be more or less dry.

right... i didn't say that the door windows would be completely dry... that's why i mentioned wind blown rain on them... what i'm mainly looking at is the drops striking the door windows and running down them as if the wings weren't even there and sheltering them...

So now if the aircraft start moving, we would need to factor the angle of the rain coming, the speed of the aircraft, the intensity of rain of course, and fake the transition from dry window to thunderstorm wet window.

seems to me, not knowing the whole coding intricacies involved, that this would be handled automatically when the cube map is switched out for the full one with the door window areas included...

This is basically impossible to be done I think, and even if it could I think it wouldn't worth the effort to be frank.

the impossible just takes a little longer to implement ;) O:)

wkitty42 commented 8 years ago

On 11/02/2015 06:25 PM, Gilberto Agostinho wrote:

I will leave this opened until we hear more opinions (@onox @wlbragg), but my 2 cents is that we shouldn't bother.

i understand that is a ""bit"" more detail to handle but that's one of the fun things about developing things ;)

wkitty42 commented 8 years ago

On 11/02/2015 06:41 PM, wlbragg wrote:

Yeah, I wish we cold be a little more precise but I don't think we can.

we can't have a cube map with hole in it where the effect doesn't apply? granted, i don't fully understand cube maps and how the effects are applied to them but it just seems like it should be possible... maybe torsten (or is that thorsten?) would have an idea on this?

Maybe a little bit of programming could improve on it, but it wouldn't be much improvement for the amount of effort it would take.

i don't see why that would be necessary since the effect already exists and applies to the referenced cube map... but again, i don't fully understand all this stuff (yet)...

About the only think we could do would be to remove the rain from the side windows. I guess we just have to imagine that we get no gentle rain in the FG world, only gales! :smile:

:lol: i hear that :lol:

tigert commented 8 years ago

Engine RPM should also be considered. Propwash moves the water just like if you were moving in the air.

wkitty42 commented 8 years ago

On 11/05/2015 03:42 AM, Tuomas Kuosmanen wrote:

Engine RPM should also considered. Propwash moves the water just like if you were moving in the air.

agreed... i hadn't gotten around to mentioning that, yet... great minds think alike :lol:

so IRL (in real life) we can be sitting on the tarmac, with the brakes set and the RPMs up and we should see raindrops moving up the windshield just like we do when in a car going down the road at speed? we should be able to see the same thing in the sim?

wlbragg commented 8 years ago

This sounds so familiar I looked at the code because I was sure we added rpm to the mix, but it is not there. If you want to get technical, I guess we really should be looking at airspeed and "wind direction and velocity". Because the wind alone could cause the drops to move.

wkitty42 commented 8 years ago

On 11/05/2015 10:07 AM, wlbragg wrote:

This sounds so familiar I looked at the code because I was sure we added rpm to the mix, but it is not there. If you want to get technical, I guess we really should be looking at airspeed and "wind direction and velocity". Because the wind alone could cause the drops to move.

:+1: :+1: :+1:

wlbragg commented 8 years ago

OK, I'll take this one on.

I am going to take it out of nasal and move it into FDM/XML. You OK with that @onox?

dany93 commented 8 years ago

@tigert wrote:

Engine RPM should also be considered. Propwash moves the water just like if you were moving in the air.

There's a prop for this: fdm/jsbsim/propulsion/engine/prop-induced-velocity_fps But something is wrong: it remains close to 0 when the aircraft is stopped on the ground...

I don't understand. :confused:

wlbragg commented 8 years ago

Hum, thanks, I'll keep this in mind as I work on it.

tigert commented 8 years ago

https://www.youtube.com/watch?v=anNZORVuJtA

It's actually moving somewhat less than what I remembered. Although I guess if you have more water, it forms little "rivers" and then the liquid flows there easier, but those small droplets are surprisingly stubborn there :-)

Edit: with more water, you see the flows a bit more: https://www.youtube.com/watch?v=9YsR246_B4E - see after landing when they give a burst of power to turn the aircraft.

onox commented 8 years ago

I am going to take it out of nasal and move it into FDM/XML. You OK with that @onox?

Yes, if you can write it in XML, use XML :smile:

wlbragg commented 8 years ago

Can we close this?

onox commented 8 years ago

Has it been fixed (at least depended on airspeed)? Or did we only fix the front window?

wlbragg commented 8 years ago

It is as good as I am going to get it. The side windows are at least as good as they were originally and overall it now is tied to engine RPM and airspeed. I'm happy with it knowing the limitations of the current implementation of the underlying shader code. It's just not designed for complete customization for every angle of window especially when using multiple window configurations at the same time.