Search Unity

Water and the Lightweight Render Pipeline

Discussion in 'General Discussion' started by squirt, Feb 21, 2019.

  1. squirt

    squirt

    Joined:
    May 12, 2011
    Posts:
    26
    I converted a scene I'm working on to the LWRP so that I could achieve some very specific effects in the shader graph (which worked wonderfully). But that caused the water in my scene to stop working (WaterProDaytime). I also can't seem to create a water shader that works nearly as well with the shader graph, nor do there appear to be any realistic ones in the store.

    Does anyone know of a decent solution I can use? The page for the LWRP has a beautiful ocean scene with boats right on it!

    Thank you.
     
    Last edited: Feb 21, 2019
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
  3. squirt

    squirt

    Joined:
    May 12, 2011
    Posts:
    26
    Awesome. Thank you. I'll check it out.
     
  4. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
  5. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    Samsung J5 is a terrible phone to try to game on in my opinion, I'd try with a phone $300 or higher.
     
  6. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    I don't want to limit my game to only top devices. The J5 is on the top 10 devices that install my game... The J4 actually has more installs...
     
    angrypenguin likes this.
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If you're targeting low end mobile devices, I don't think realistic water shaders is something they are going to be able to support hardware wise.
     
  8. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Pretty much this, you wont get realistic or even close to realistic water on those devices, so your best either not supporting them, or switching to a more stylized /NPR water
     
    Joe-Censored likes this.
  9. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    I wouldn't say that, this https://github.com/eliasts/Ocean_Community_Next_Gen runs at ~40 to 45 fps, and I haven't even "optimized" it yet, it's already optimized but maybe I can remove the pieces I don't need and make it run faster, I just wanted to try LWRP for my next game but I'm guessing I'll have to pass and use the standard render.
     
  10. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Sure but a lot of users here wouldnt consider <60fps being a usable framerate in this day and age. Certainly not on something like a mobile where the end user has no way of upping that frame rate, locking them in a sub par experience. And I have used that shader extensively, your not going to get 20fps more on mobile simply by "turning bits off" without it becoming the same as making a NPR water shader in shadergraph yourself (which is what I was suggesting).

    Honestly your far better off creating a solution that is fit for your target platform power, instead of trying to tear apart something that is very much not made for your target platform power in the hopes of making it work.

    Also that water your using "WaterProDaytime" is seriously old, you shouldnt be using that anyway. That will be part of the problem of it bringing your device FPS down.

    This : https://www.artstation.com/artwork/Bm9Vl8 is a pretty nice looking well performing water made in LWRP and it shows the entire graph so you can remake it. Go for something like that. Users will care a lot more about FPS than how realistic the water is.

    NOTE non-realistic doesnt mean "bad". It just means that the waters rendering is not photorealistic doing things like accurate scattering etc. It also doesnt mean it wont do scattering etc, just that they wont be done in a physically accurate way, which more often than not is overkill for mobile anyway.
     
    Last edited: Jun 26, 2019
  11. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    What I do is aim for 30 fps on lower end devices, this means that on better devices I easily get 60fps, iPhone 5S for example can run the games easily at 60fps. This is why I'm saying 45 on a J5 isn't bad, but certainly needs more since the rest of the game will need to run together. I never had a complaint about fps.

    Thanks for the LWRP link, I spent all day yesterday searching for a LWRP solution, tried to make my own but wasn't happy with it, that link is in the right direction though, but as with all water I find it looks "oilish", I will play with it today and see if I can get better looks/performance.
     
  12. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    FYI regarding the oily look, from having a quick scan of that graph I can see its the "gradient noise" node that contributes that look, you can turn it down or replace with something else to fetter the effect. Not sure what removing it entirely would do but you can always give that a try too. For me its not oily as such, its just that the darker colours dont make sense for ocean, but you could replace the dark "oily" patches with a darker or lighter blue and that should work nice

    EDIT: ignore that, my bad I thought that branch was plugged into the albedo slot not the position slot. That gradient noise controls the vertex animation for waves, not the color.
     
    Joe-Censored likes this.
  13. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    We're apparently seeing two different things from your 45 fps result. It sounds like to me you think 45 fps from just playing a water effect is somehow a success. You still have to add an actual game to it, but you've got no hardware resources left.

    If you're targeting 30 FPS that means you need to fit everything else in your game into about half the processing you're budgeting on just the water effect. I'm going to take a wild guess that your game is going to need more than that.
     
    Last edited: Jun 26, 2019
    ROBYER1, MadeFromPolygons and Ryiah like this.
  14. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    124
    unfortunately Lightweight Render Pipeline performance is horrible, especially shaders made with shader graphs. You could test using normal 3d and unlit or mobile shaders maybe it's performance is better than LRP anyways.

    I'm at the same point right now. I want to implement water and I'm not so sure, if I should use LRP. I love it because of the shader-graph, but on the other hand, it definitely has some performance issues.
     
    grobonom likes this.