Jump to content

Fixing PBR WATER


Recommended Posts

Yes, it's bad, but I found a bit of a fix. Not perfect, but better. I put one of those big prims over my water...the one that spreads across 9 sims (but of course any size will work)...added a water texture...bit of transparency and glow...and it looks better.  Still too plastic, but better.

The water itself needs transparency is the problem.

Edited by Luna Bliss
  • Sad 1
Link to comment
Share on other sites

The water looks fine with the right EEP setting or at least a lot better. Linden Lab could fix it by putting decent PBR EEP water settings on their land.

PBR seems to do really badly with conflicting alphas on wave prims over water. There are overlapping ones in the water at Rollo - it is migraine inducing flashing and ugliness as the textures sort and resort with every movement of your camera. Not something I get or at least not as noticeable without PBR on. Until that alpha sorting issue is fixed I would n't put alpha textures on water.

  • Like 3
Link to comment
Share on other sites

9 minutes ago, Aethelwine said:

Until that alpha sorting issue is fixed I would n't put alpha textures on water.

Hmmm not doing that for me.  I wonder what differs in our PC's or viewer settings.

Link to comment
Share on other sites

The problem with PBR water is the same as the problem encountered with shiny surfaces, when no reflection probe is shielding the said surfaces from the sky... The ”blue hue”.

To work around this problem, LL, instead of fixing their shaders, changed the mid-day setting to remove entirely the Ambient light from it; have a look, by setting the environment in LL's viewer to ”Midday”, then open the ”Personal lighting” floater and look at the ”Ambient light” color: BLACK !... Which of course does have other impacts, especially on legacy contents rendering.

However, as soon as you switch to another EE setting (e.g. ”Sunrise”, or ”Midday (legacy)”), with a non-black ambient light, the water becomes toonish-sky-blue...

I proposed a fix for this (I made a pull request in LL's viewer git), but it got rejected by the Linden in charge for PBR, on the pretext they did not want to deviate from gLTF standards.

Of course, you will find this fix in the Cool VL Viewer (”World” -> ”Environment settings” -> ”Fix reflection blue hue”), and it does fix the toonish water (plus the bogus blue shine on reflective materials, but does not affect mirrors)...

Let's hope that now that Firestorm is PBR, LL will listen to the screams of the SLers about the ugly water, and that the Linden in charge will change their stance about it all.

In the mean time, you may manually edit the water shader, to at least make it look a tiny bit better:

  • Open the app_settings/shaders/class3/environment/waterF.glsl file (present in the viewer installation directory) in a text editor (not a word processor !).
  • Replace line 284 (color = ((1.0 - f) * color) + fb.rgb; ) with the following lines:
        // Make water appear less sky-blue: 0.65 and 0.8,0.85,0.75 factors added. HB
        color = ((1.0 - f) * color) * 0.65;
        color.r *= 0.8;
        color.g *= 0.85;
        color.b *= 0.75;
        color += f * fb.rgb;

    (note that this also fixes the improper mixing of ”fb” with ”color”: missing ”f” factor for fb in LL's code, which may over-saturate the color).

  • Save the file, and enjoy better looking waters !
  • You may of course adjust the factors to your heart's content.
Edited by Henri Beauchamp
  • Thanks 7
Link to comment
Share on other sites

51 minutes ago, Luna Bliss said:

Hmmm not doing that for me.  I wonder what differs in our PC's or viewer settings.

The only way I can stop it happening is turning off transparent water.

Have you looked at Rollo?

http://maps.secondlife.com/secondlife/Rollo/128/128/12

I am not used to doing gyazo video but this:

https://gyazo.com/46e58072fbd73ba726815f95e8c1beb4

As soon as I move or move my camera the alphas glitch. The only way to avoid it with PBR viewer is to turn transparent water off

Edited by Aethelwine
Link to comment
Share on other sites

Adding I have just tried Henri's viewer and I don't get the alpha sorting issue so that is something up with the Firestorm release.

That said I don't see animated water prims at all in the Cool Viewer. My Hot Tub is empty !

Edited by Aethelwine
Link to comment
Share on other sites

1 hour ago, Aethelwine said:

As soon as I move or move my camera the alphas glitch. The only way to avoid it with PBR viewer is to turn transparent water off

that happens when you place prims too close together...but is that one prim on top of linden water?

Link to comment
Share on other sites

1 hour ago, Henri Beauchamp said:

The problem with PBR water is the same as the problem encountered with shiny surfaces, when no reflection probe is shielding the said surfaces from the sky... The ”blue hue”.

To work around this problem, LL, instead of fixing their shaders, changed the mid-day setting to remove entirely the Ambient light from it; have a look, by setting the environment in LL's viewer to ”Midday”, then open the ”Personal lighting” floater and look at the ”Ambient light” color: BLACK !... Which of course does have other impacts, especially on legacy contents rendering.

However, as soon as you switch to another EE setting (e.g. ”Sunrise”, or ”Midday (legacy)”), with a non-black ambient light, the water becomes toonish-sky-blue...

I proposed a fix for this (I made a pull request in LL's viewer git), but it got rejected by the Linden in charge for PBR, on the pretext they did not want to deviate from gLTF standards.

Of course, you will find this fix in the Cool VL Viewer (”World” -> ”Environment settings” -> ”Fix reflection blue hue”), and it does fix the toonish water (plus the bogus blue shine on reflective materials, but does not affect mirrors)...

Let's hope that now that Firestorm is PBR, LL will listen to the screams of the SLers about the ugly water, and that the Linden in charge will change their stance about it all.

In the mean time, you may manually edit the water shader, to at least make it look a tiny bit better:

  • Open the app_settings/shaders/class3/environment/waterF.glsl file (present in the viewer installation directory) in a text editor (not a word processor !).
  • Replace line 284 (color = ((1.0 - f) * color) + fb.rgb; ) with the following lines:
        // Make water appear less sky-blue: 0.65 and 0.8,0.85,0.75 factors added. HB
        color = ((1.0 - f) * color) * 0.65;
        color.r *= 0.8;
        color.g *= 0.85;
        color.b *= 0.75;
        color += f * fb.rgb;

    (note that this also fixes the improper mixing of ”fb” with ”color”: missing ”f” factor for fb in LL's code, which may over-saturate the color).

  • Save the file, and enjoy better looking waters !
  • You may of course adjust the factors to your heart's content.

Thanks. Is that a fix that would make all people visiting my park see this?

Link to comment
Share on other sites

8 minutes ago, Luna Bliss said:

Thanks. Is that a fix that would make all people visiting my park see this?

They would have to apply the fix to their own viewer installation: this only fixes how water is seen in the ”fixed” viewer installation, not in visitor's...

Edited by Henri Beauchamp
  • Thanks 1
Link to comment
Share on other sites

Just now, Henri Beauchamp said:
9 minutes ago, Luna Bliss said:

Thanks. Is that a fix that would make all people visiting my park see this?

They would have to apply the fix to their own viewer installation: this only fix how water is seen in the ”fixed” viewer installation, not in visitor's...

I'll just have to toggle back and forth to see what my prim placed over the water looks like with and without PBR...hopefully find a compromise until glitches get worked out.

Link to comment
Share on other sites

On 6/22/2024 at 10:56 PM, Henri Beauchamp said:

The problem with PBR water is the same as the problem encountered with shiny surfaces, when no reflection probe is shielding the said surfaces from the sky... The ”blue hue”.

To work around this problem, LL, instead of fixing their shaders, changed the mid-day setting to remove entirely the Ambient light from it; have a look, by setting the environment in LL's viewer to ”Midday”, then open the ”Personal lighting” floater and look at the ”Ambient light” color: BLACK !... Which of course does have other impacts, especially on legacy contents rendering.

However, as soon as you switch to another EE setting (e.g. ”Sunrise”, or ”Midday (legacy)”), with a non-black ambient light, the water becomes toonish-sky-blue...

I proposed a fix for this (I made a pull request in LL's viewer git), but it got rejected by the Linden in charge for PBR, on the pretext they did not want to deviate from gLTF standards.

Of course, you will find this fix in the Cool VL Viewer (”World” -> ”Environment settings” -> ”Fix reflection blue hue”), and it does fix the toonish water (plus the bogus blue shine on reflective materials, but does not affect mirrors)...

Let's hope that now that Firestorm is PBR, LL will listen to the screams of the SLers about the ugly water, and that the Linden in charge will change their stance about it all.

In the mean time, you may manually edit the water shader, to at least make it look a tiny bit better:

  • Open the app_settings/shaders/class3/environment/waterF.glsl file (present in the viewer installation directory) in a text editor (not a word processor !).
  • Replace line 284 (color = ((1.0 - f) * color) + fb.rgb; ) with the following lines:
        // Make water appear less sky-blue: 0.65 and 0.8,0.85,0.75 factors added. HB
        color = ((1.0 - f) * color) * 0.65;
        color.r *= 0.8;
        color.g *= 0.85;
        color.b *= 0.75;
        color += f * fb.rgb;

    (note that this also fixes the improper mixing of ”fb” with ”color”: missing ”f” factor for fb in LL's code, which may over-saturate the color).

  • Save the file, and enjoy better looking waters !
  • You may of course adjust the factors to your heart's content.

I have to admit when I read this it went over my head, but I shared it with a friend and they made the edit and are happy with it  so I will try this evening too.

Nb I thought I had updated what I said about your viewer not displaying my hot tub water already but maybe that was on another thread, anyway the problem I was having was solved by clearing cache and downloading my sizeable inventory fresh. So that issue was at my end and nothing to do with your viewer.

For anyone else that dropped using a PBR viewer because of ugly water or anyone on the verge of doing so might want to edit the glsl file as instructed in the quoted post.

 

Edited by Aethelwine
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...