Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

LWRP Boat Racing Demo from GDC

Discussion in 'Graphics Experimental Previews' started by Rowlan, Apr 17, 2018.

Thread Status:
Not open for further replies.
  1. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Cool, thanks for that info. Regarding HDR vs LDR, do you have a rough idea how much more costly it is using HDR + tonemapping on mobile platforms, vs just using regular LDR with the pp stack v2?
     
  2. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  3. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    Currently a bug with that shader, since it's a Shadergraph shader that contains a subgraph it tends to not import correctly, if you reimport the shaders folder it should fix the issue. I have recently changed the terrain back to using the actual terrain system and also the new LWRP terrain shader as it now supports GPU instancing and the other updates in 2018.3 beta.

    I'll post here when that update happens as it should be soon(TM)
     
    ekergraphics likes this.
  4. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    reimporting the shader still not fixed it, but i got it fixed by open shader graph and resave it
     
  5. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    We're still plagued by constant "could not read file" error messages in Unity, but since this has persisted on many imported projects from 2017.x up to 2018.3, perhaps it's a local PC issue in our side (the obvious temporary disabling of OfficeScan did not immediately help). Anyway, 100+ importing errors sadly prevent me from checking this out at the moment. I'll wait until there's a stable release and see if I can sort this out.

    The chances of getting this to run in single pass stereo mode in VR is probably slim anyway. :)
     
  6. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    This sounds almost like a permissions issue, either the user account doesn't have rights or Unity is run with a use that doesn't have rights.

    I actually got it 'running' but the water shader is not setup with it so it failed to render, I had to also disable MSAA and post effects, but it ran on an Oculus GO :)
     
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,525
    Unloading broken assembly Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll, this assembly can cause crashes in the runtime


    Any idea what could cause this?
    I used unity 2018.3.b04
    with repo 4.0
     
  8. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    You can safely remove it: it's Rider plugin, it does nothing if you don't have Rider.
     
    Lars-Steenhoff likes this.
  9. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    rizu is correct, it's just a rider plugin and can be removed. I will look at removing it from the repo later this week.
     
    Lars-Steenhoff likes this.
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Andre_Mcgrail I assume the waterFX distortion that happened on the edge of the screen (like in the screenshot) are the product of screen space displacement isn't?
    screenedge_Distort.png
     
    Last edited: Oct 13, 2018
  11. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    Correct, this could be solved by rendering the waterFX pass at a higher FOV, essentially creating bleed for the image used.
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    actually i try to do that, but since my SRP knowledge are still very basic i failed :D.
    which bring me to some question if you don't mind.
    - is the CameraData are the actual camera that used for rendering the game view?
    - is it possible to override the CameraData.Camera setting for rendering the WaterFX pass, or should i create a new camera for that?
     
  13. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    How to import water and material in HDRP ?
     
  14. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @konsic you can't:
     
  15. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    So what about a decent water solution in HDRP! This has been the most requested and yet forgotten feature even in the normal pipeline for years. Guess the latest water system officially released was in Unity 4!
     
  16. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    i doubt will get that sooner, until HDRP support custom renderpass at least.
    at the moment water solution in HDRP just transparent with panner normal (or flowmap) with distortion pass
     
    TerraUnity likes this.
  17. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    Hi, any way to make the water shader double side for underwater effect? thanks.
     
  18. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    That's exactly what I did to create a lake but far from a real water surface, the Refraction Model does not seem to give the depth illusion and I'm not sure if I set the right settings for it, also the Distortion is everywhere including the outer surface itself! Can you share your settings and screenshots to compare?
     
    antoripa likes this.
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oh i didn't use refraction, i just don't like how it looks. I use distortion only
    WaterDepth.png
    Basically it is like this
    BaseWater.png
     
    Last edited: Nov 3, 2018
    bolorbatbold1 and TerraUnity like this.
  20. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Reanimate_L That's so cool man, thanks for sharing, just realized I'm definitely not using the distortion properly. Also I never tried ShaderGraph and just used the parameters in the material UI, that would be a great start for me discovering the ShaderGraph ;)
     
  21. tom_painter

    tom_painter

    Joined:
    Nov 8, 2018
    Posts:
    13
    @Andre_Mcgrail I'd like to pass on my thanks and congratulations to you and the team for making this beautiful demo.
    Good to see its not just the HDRP guys getting all the limelight, can't believe this runs well on a 6S. Looking forward to digging in and looking at all the tricks you used to pull this off.

    I'm hoping I can transplant the grab pass refraction into glass objects in my AR experience. I've scoured the internet for good realtime refractions in AR and it seems elusive. But it feels like this might give results that are more than good enough considering the restrictions.
     
    ROBYER1 likes this.
  22. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    it's amazing what could be achieved through LWRP!! Amazing resources to learn form!!

    yet i can't hide my disappointment on a sample project that runs 10fps on handheld devices.. even less on mid range devices.
    it would be amazing if all these amazing graphics can be run at least at 30fps on mid range devices! isn't this the purpose of LWRP in first place??
     
  23. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,978
    What handheld device though?

    "Handheld device" could be a low budget android phone with barely any power, or it could be an iPhone Latest / Samsung Galaxy Latest which would have tons of power.

    Knowing which hardware you tried on would be good, and no it will never run at the same 30fps on all devices, as there are just so many different levels of hardware power out there in the mobile market, some are not very powerful at all.
     
  24. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    i have tested it on lenovo tablet with adreno 506 (not sure if this considered low end or mid range, around 1 year old device) i got like around 5 fps

    i have tried it on pixel 1 with adreno 530 this is considered a highend device almost 1 and half years ago.. when this project is published..and i got like 10 fps..

    i noticed that the scene in the project isn't "fully" optimized for mobile in fist place... so i tried disable everything in scene.. and only left a single boat with the sea.. tested it on pixel 1 again and got like around 20fps.. this is less than 30fps on almost an empty scene!

    that is why i was wondering what's the point of showcasing "LWRP" in this project..
    if it can't run well on devices that are 1 to 2 years old..
     
    Last edited: Nov 9, 2018
  25. tom_painter

    tom_painter

    Joined:
    Nov 8, 2018
    Posts:
    13
    @mangax they said they are getting near to 60FPS on an iphone 6S
    I get the impression it has been mainly tested on recent apple mobiles.
     
  26. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    No way it can run around 60fps!!
    actually in the demo video they stated their target is 30fps on iphone 6... i wonder how is that achieved?

    the project scene have so much of top known "performance killers" on mobiles..
    a post-processor.. a Terrain .. so many Vertex animated vegetation.. with super heavy sea shader..
    have you checked the drawcall counter?? it's hitting around 400+ <-- only PC can handle this
     
    Last edited: Nov 9, 2018
  27. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Well. . . . what do you know. With enough hacking this technique can be done in HDRP apparently. But yeah. it's a total hack, so it bound to glitch etc
    Also the way i'm doing it right now, it might be the least performant way to render water pass in unity :S
    HDRP_WaterPass Hack.png
     
    Flurgle and TerraUnity like this.
  28. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,978
    I have an iphone SE (same as 6/6S) and it runs around 50fps-60fps so I do believe their claims are true
     
  29. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    mind sharing a small video sample of demo running on your phone??
    if it is possible (which i doubt) am interested to know why android version is not getting same performance..
     
    Last edited: Nov 12, 2018
  30. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,978
    nevermind, i tested this on my iphone X not SE, so thats why its running well (£1000+ phone)
     
  31. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    i see now,,, Anyway you shouldn't post false information which can miss-guide people...
     
  32. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,978
    I wasnt. I had gotten confused between which work device I was using. We have 20+ phones, Im not going to know off top of my head without looking back at logs which I just did.

    Dont try and make it sound like I was purposefully misleading people, theres no need to try and inflame for no reason.
     
  33. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    We have currently seen some massive regressions in speed in the Boat Attack demo which we are currently looking into on iPhone6 we've gone from ~30fps to <15fps which is unacceptable, but the project did get more complex at the same time. I know I'm doing some bad stuff in the water shader and optimisations can be made project side but we have also caught a few bad things we are doing LWRP side which we are looking at.

    Sorry for the lack of information right now, we are currently working hard to make our cutoffs for getting LWRP out of preview so it's been a lot of heads down atm.
     
  34. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    I was not able to run it on iPhone 7 FWIW due to runtime shaders errors (using Preview-4.0 branch)
    That _might_ be my somehow screwed setup, but this run in the Editor however
     
  35. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    the whole project was an attempt to optimize everything to achieve 30fps!!
    Check their presentation.. this means automatically that the challenge is to get it to work at 30fps at max on iphone 6..

    so when you said you got like 50 to 60 fps on SE similar to their claim (which isn't)...let alone 60 on SE..
    i was forced to doubt your test!... but i see now you have a lot of phones :)

    thanks for clarification.. i was worried that there might be a gap between iphone and android phones in terms of performance on almost similar spec phones..
     
  36. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,978
    I think based on what andre has said and our own tests, that the current performance isnt what its meant to be. Certainly we were expecting higher fps too so hopefully by the time the LWRP is out of preview they will work out the exact bottlenecks and address them.

    For now though, dont be disheartened, Im sure it will become usable soon for your purposes. That said you could always look into some performance optimisation assets from the asset store in the meantime if you have immediate needs of high FPS on mobile and are struggling.
     
  37. sarebots2

    sarebots2

    Joined:
    Jul 4, 2016
    Posts:
    34
    Is there a specific commit that was able to get 30fps on iPhone 6?
    Because after numerous optimizations, greatly reducing Quality settings, Graphics Settings, Post Processing etc., I was able to get the fps on OnePlus 5 (High end, Snapdragon 835) to 40fps. I think it won't translate well to iPhone 6 (Would probably get <10fps).
     
    Shorely likes this.
  38. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    Not currently, there are some optimisation branches for both the boat demo and LWRP that we have managed to get it back to an almost stable 60fps on iPhone6s(without lowering anything), which means it should be hitting 30 on a 6, but there is a fair amount of testing and checking to do before committing all these changes to make sure there are no breakages elsewhere.

    A lot of optimisation and bug fixing work is going on now so I will post back here when it is back up to speed :)
     
  39. Frienbert

    Frienbert

    Joined:
    Nov 14, 2012
    Posts:
    112
    Just curious if the bugs were fixed
     
  40. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @Andre_Mcgrail just noticed that the Boat Attack github repo is under GPL license. I don't think you can do that though as GPL is a copyleft license and it requires you to relicense all other code your project touches, in this case it would mean also things from Unity's side, including but not limited to LWRP (which you can't relicense).

    Most common options on the table for licensing that doesn't clash with Unity's terms would be MIT, BSD, Apache, CC-BY and if you want to prevent others from using this content commercially then pick CC-BY-NC.

    Just don't swap to CC-BY-SA as that's also a copyleft license and has the same issues as current GPL license has.
     
  41. lucpham

    lucpham

    Joined:
    Feb 2, 2017
    Posts:
    4
    Hi in this repo there is an infinite water scene. I kinda understand what it does. Can anyone give me a technical detail of how it actually works.
     
  42. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Any chance this water will work on the hdrp?
     
    Rowlan likes this.
  43. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    any updates? I've just tried the master branch with unity 2019.1.1 and no luck yet
     
  44. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    Hey, I'm having a hard time allocating time to work on this, but you should be able to use the `release/2019.1` branch with 19.1
     
  45. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    No, using 2019.1.1 it throws errors on console and not able to hit play to test it
     
  46. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    What errors are you seeing?
     
  47. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    A whole bunch, but also missing water files. I tried doing a pull and also with a zip download with no luck.
     
  48. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    errors when loading (it looks for d:\srp which is not on my path)
    An error occurred while resolving packages:
    Project has invalid dependencies:
    com.unity.render-pipelines.core: The file [D:\SRP\com.unity.render-pipelines.core\package.json] cannot be found
    com.unity.render-pipelines.lightweight: The file [D:\SRP\com.unity.render-pipelines.lightweight\package.json] cannot be found
    com.unity.shadergraph: The file [D:\SRP\com.unity.shadergraph\package.json] cannot be found
    A re-import of the project may be required to fix the issue or a manual modification of D:/BoatAttack/Packages/manifest.json file.


    then I hit reimport all, so it will redo the manifest file. Same error
     
    Last edited: May 8, 2019
  49. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Then what I had to do was reset absolutely everything on the package manager and redownload (i'm sure there is a better way)
    But then when I hit play I get this:

    Unexpected exception System.IO.FileNotFoundException: Could not load file or assembly 'Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    File name: 'Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null'
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x000aa] in <20f4cb175a08451fa80782a69dc19e2a>:0
    at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002bc] in <20f4cb175a08451fa80782a69dc19e2a>:0
    While compiling job: System.Void Unity.Jobs.IJobParallelForExtensions/ParallelForJobStruct`1<WaterSystem.GerstnerWavesJobs/HeightJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)


    no clue what's that "smash" thing
     
  50. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,683
    It's Burst and package manager issue. Just restart Unity solves Smash error.
     
Thread Status:
Not open for further replies.