viktorradnai / flightgear-ask21

ASK21 glider model for Flightgear
5 stars 6 forks source link

Fuselage is too dark #83

Closed ghost closed 7 years ago

ghost commented 7 years ago

Particulary in shadows

gilbertohasnofb commented 7 years ago

See @viktorradnai pictures posted at https://github.com/viktorradnai/flightgear-ask21/pull/82#issuecomment-285986993

viktorradnai commented 7 years ago

The fuselage looks great in sunshine but it's too dark and has an unnatural metallic shine when it's in the shade. See how the tug aircraft (DR400) looks in comparison, it's much more natural.

fgfs-screen-245 fgfs-screen-246 fgfs-screen-248 fgfs-screen-249 fgfs-screen-250

viktorradnai commented 7 years ago

I rememebered using ambient-correction to try and fix this in the past but I cannot find any trace of having committed that in. I'll have another go unless you guys feel like doing it.

viktorradnai commented 7 years ago

Setting ambient-correction to 0.1 looks better. See screenshots: fgfs-screen-254 fgfs-screen-257

viktorradnai commented 7 years ago

I think the shininess needs to be reduced. This is a tricky one because gliders are shiny but only when the light hits them at an angle. The white coat diffuses reflections but it has a layer of clear coat on top which behaves similarly to water: it reflects light hitting at low angles but lets them pass through if they come in at a steep angle (close to perpendicular to the surface). Therefore it's shiny when a surface is at at an angle but not so shiny when it's looked at flat. I think the current reflections are the opposite, they are shiny when the light is perpendicular, not shiny (and slightly dark) otherwise.

@D-ECHO @gilbertohasnofb what do you think?

![Uploading fgfs-screen-258.png…]() fgfs-screen-259 fgfs-screen-261 fgfs-screen-262

ghost commented 7 years ago

Maybe this can be of help? http://wiki.flightgear.org/ALS_technical_notes#Glossy_surfaces It says something about angles and reflections ;)

viktorradnai commented 7 years ago

@D-ECHO, thanks for that. That page and the reference (https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/model-combined.eff/README.model-combined.eff) did help but the best trick was this code: https://forum.flightgear.org/viewtopic.php?f=47&t=30175&sid=6c8b34784cb4061baff97367f53c72a2&start=15#p292338

I've added this to our model, not sure if I should commit it but it's definitely useful for tweaking.

BTW, the fuselage has different reflectivity properties to the wing. Is there a good reason for this? I think they should be identical. I've got some promising settings, I can create a branch and commit them but I think I'd get better results if both materials are the same.

viktorradnai commented 7 years ago

OK, I think I have it nailed :)

fgfs-screen-283

viktorradnai commented 7 years ago

OK, looking top down the wing still looks way too shiny when under a cloud, wonder if there is a reflection map to blame for this. From every other angle it looks pretty sweet, so I'm going to create a PR for this.

viktorradnai commented 7 years ago

fgfs-screen-288

gilbertohasnofb commented 7 years ago

@viktorradnai

OK, I think I have it nailed :)

Yes you did, that looks stunning!

gilbertohasnofb commented 7 years ago

Once this is merged, someone could post some screen shots at the forum as this is looking really good!

viktorradnai commented 7 years ago

fgfs-screen-285 fgfs-screen-286

Here's a couple, but I'd encourage you to take a few more yourself. You get the best results with dawn / dusk light reflecting off the fuselage at a shallow angle, a scenario that is not hugely common in gliding but looks pretty sweet :)

viktorradnai commented 7 years ago

I'm going to close this and open another one to make the fuselage / wing material properties (reflectivity) the same.