Board index FlightGear Support Graphics

strange water colour and tile selection modes

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Re: strange water colour and tile selection modes

Postby Thorsten » Mon Apr 13, 2015 6:13 pm

Yeah, I sort of understand where the problem comes from, I just don't understand why the first clamp didn't fix it...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: strange water colour and tile selection modes

Postby gsagostinho » Mon Apr 13, 2015 6:56 pm

Thorsten wrote in Mon Apr 13, 2015 6:13 pm:I just don't understand why the first clamp didn't fix it...


Thorsten, which recommendation do you mean by "first clamp"? Let me know so I can give it more tries and see if it works under certain conditions or not.

And as always, all your help is highly appreciated -- thank you so much.
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby Thorsten » Tue Apr 14, 2015 6:29 am

the problem is related to the angle of the sun, and there is an exact angle in which the water colour comes back to normal. Look at these two pictures taken with exactly the same settings (no reloading of weather or anything), I just simply moved the sun down slightly with the time warp:


Also, just to be clear, the problem is much more visible from the ground. The higher I am in the air, the more normal-looking the water becomes (it likely has something to do with the angle of reflections).


Am I to understand that this is an intermediate region issue?

I.e. if you look from very high under an almost 90 degree angle, the reflection looks good, if the sun reflects under a shallow angle the reflection looks good, but not in some intermediate region?

Does this perhaps go negative? What about

Code: Select all
specular_color += (  max((0.15*(1.0-ctrefl* ctrefl) * fresnel) - 0.3),0.0)   *  specular_light.rgb;


does this help as well?

P.S.: This is almost certainly my mistake, you're just kind enough to help me understand it...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: strange water colour and tile selection modes

Postby gsagostinho » Tue Apr 14, 2015 11:10 am

Thorsten wrote in Tue Apr 14, 2015 6:29 am:if you look from very high under an almost 90 degree angle, the reflection looks good, if the sun reflects under a shallow angle the reflection looks good, but not in some intermediate region?

Yes, that's correct. See this series of images all from a same flight:

Image

Image

Image

Image

Image

Thorsten wrote in Tue Apr 14, 2015 6:29 am:Does this perhaps go negative?

I am sorry Thorsten but I don't understand what you mean by the effect going "negative".

Thorsten wrote in Tue Apr 14, 2015 6:29 am:What about
Code: Select all
specular_color += (  max((0.15*(1.0-ctrefl* ctrefl) * fresnel) - 0.3),0.0)   *  specular_light.rgb;

does this help as well?

Not really, this completely breaks the water reflections on any weather. See:

Image

Thorsten wrote in Tue Apr 14, 2015 6:29 am:you're just kind enough to help me understand it...

It's my pleasure, please let me know which other tests should I run.
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby gsagostinho » Tue Apr 14, 2015 11:13 am

Just one more thing: this happens very easily when using the Fair Weather scenario, like 95% of the time the effect is really strong, although sometimes it's more subtle (I believe this is because of some randomness used in generating the parameters, am I right?). But when the subtle version occur, simply clicking on "Apply" again in the weather menu will likely make the white ocean effect strong again. But also, sometimes this effect appears in other weather scenarios, such as Core of high pressure system, although less often and less predictable then with fair weather.
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby Thorsten » Sat Apr 18, 2015 9:07 am

Upon investigation, I found that it is possible that color values outside [0:1] are returned under certain conditions - I've now explicitly taken care of these cases and pushed this change.

I don't know whether that was at the root of the problems you've seen though.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: strange water colour and tile selection modes

Postby gsagostinho » Sat Apr 18, 2015 1:48 pm

Great, Thorsten! I can only pull the changes on Monday though, but I will let you know if it fixes the problem on my side.
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby gsagostinho » Wed Apr 22, 2015 10:28 am

Hi Thorsten,

Sorry for my late reply, I am having a crazy week. Anyway, I pulled fgdata now from git, but the problem persists:

Image

Would you like me to do any more tests?

Cheers,
GIlberto
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby Thorsten » Wed Apr 22, 2015 12:07 pm

I'm not sure what to test at the moment... :-( Let me think about this and get back to you, it is very vexing.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: strange water colour and tile selection modes

Postby gsagostinho » Wed Apr 22, 2015 12:49 pm

No problems ta all, Thorsten. If you think of something to test just let me know (as well if you ever need something not related to this thread tested in a ATI card, I am also up for helping).
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: strange water colour and tile selection modes

Postby MIG29pilot » Sat Jul 18, 2015 11:10 pm

gsagostinho wrote in Tue Apr 14, 2015 11:10 am:Not really, this completely breaks the water reflections on any weather.

You really threw cold water on that idea :D
User avatar
MIG29pilot
 
Posts: 1465
Joined: Tue May 19, 2015 5:03 pm
Location: 6 feet under Snow
Callsign: MIG29pilot
Version: 2020.1.3
OS: Windows 10

Previous

Return to Graphics

Who is online

Users browsing this forum: No registered users and 4 guests