Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Unity Achieve beautiful, scalable, and performant graphics with the Universal Render Pipeline

Discussion in 'Universal Render Pipeline' started by Andre_Mcgrail, Feb 11, 2020.

  1. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    BoatAttack.jpg
    Blogpost
    | Github | Download

    Hey All!

    We have released a blogpost detailing how Universal RP was used to create some of the effects and systems in the BoatAttack demo project. Grab a look here, and if you have any questions or run into issues feel free to post them here so we can help out where we can.

    Some notes about the demo project:
    • The GitHub repository requires GitLFS to be installed as all the texture and meshes use this system
    • If you want to skip using GitHub then you can download this project zip, you will still need to download and install Git as the Unity Package manager requires it for one of the packages the project references, but you will not need to use Git itself.
    • The project has been tested on Windows, OSX, iOS, Android, Switch, Xbox One and Playstation 4
    I hope you find something useful out of this project and the provided information.
     
  2. nachocgi

    nachocgi

    Joined:
    Mar 13, 2018
    Posts:
    18
    great Andre! much apreciated!
     
  3. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    252
    Very cool project, after hurdles with Git I was able to open it.

    I like your approach with the Water shader. Can this be carried over to HDRP? It has custom passes, too. Or is there anything that would be not compatible?

    Also, your low poly human models made me really laugh, nice work. ;)
     
  4. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    507
    @Andre_Mcgrail thanks for replying on the Blog Post! Your recent commit prevents the crash (thank you!); however, the scene still throws hundreds of exceptions both when importing and when pressing Play.
     
  5. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    Are you able to post these here?

    Not without a heap of work I believe, the pass architecture is quite different between URP and HDRP, but I do plan on trying to port the shader over to Shader-graph once it is a bit more feature complete.

    Yea, don't look at them close haha.
     
  6. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    507
    I'll make screenshots of them tomorrow, it's really just pressing "Reimport All" and the console is spammed with them.

    You might be interested in my fork for VR ;) https://github.com/prefrontalcortex/BoatAttack/tree/boat-attack-vr. There's (expected) issues with Opaque/Depth Texture and the Water shader, and I had to update URP to 7.2.0 to fix the Terrain in VR, but it's already fun to fly around. URP is slowly getting there, feature-wise. There's still some pretty visible bugs with depth passes occluding the clouds and other transparent objects that I reported a couple months back.
     
    phil_lira likes this.
  7. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    151
    So basically all post is ShaderGraph advertising.
     
  8. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    Ah ok good to know, I have seen quite a few warning appear, and there are some errors related to Volumes I also saw. I'll try see how much are project related vs UniversalRP related.

    Ha, cool, yea I have yet to find the time to make sure the custom stuff in the demo works with stereo rendering, it's on my list, also I will be updating the project to 7.2.0 now as the package has finally become published.

    Partially :) I mean we are trying to get people on board with the SRPs, and Shader-graph is what we would like shaders to be generated in going forwards, a graph based data model makes it a lot easier to upgrade and convert between features and rendering pipelines. Saying that, there are many things it cannot do still so that is why this project still contains custom shaders.
     
  9. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    507
    So turns out Boat Attack VR is the perfect URP + Quest playground which has ALL the bugs! :)
    Stripping out URP features piece by piece brings it into a "well that looks okay I guess" state.

    As-is (just disabled water) - in this version even the startup Unity Logo is cross-eyed!
    screen_2020-02-12-13-17-15.png

    Stripping away posteffects
    screen_2020-02-12-13-31-12.png

    Stripping away Opaque + Depth texture sampling, HDR, regenerating all lighting
    screen_2020-02-12-13-43-05.png

    Repairing shaders that use platform-specific normal packing to use proper Normal maps that work cross-platform ("repair" in the sense of "don't use occlusion and normals right now)
    screen_2020-02-12-14-32-28.jpg

    Re-enabling Shadow Cascades and turning off Occlusion Culling brings the Terrain back for whatever reason
    screen_2020-02-12-14-47-17.jpg

    To be continued. @phil_lira @ThomasZeng looking forward to your input on this from URP perspective!
     
    ROBYER1 and Lars-Steenhoff like this.
  10. KokkuHub

    KokkuHub

    Joined:
    Feb 15, 2018
    Posts:
    151
    Yikes! So it's more like "Achieve beautiful, scalable, and performant graphics with the Universal Render Pipeline, except on Oculus Quest" then
     
  11. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    503
    Ya I did some tests on oculus quest with the OVR player to. Took screenshots with the quest capture screenshot mode. I stripped out everything so it was just the bare stuff nothing special. I took shadows out to and the water has problems using the basic cubemap mode in this screenshot it looks good but in quest doesn't look that good. These screenshots actually look better then it looks and feels in the quest. Alot of alpha buzzing like crazy on everything alpha to. Inside the quest it feels and looks like N64 type graphics not good.

    Really wanted this to work but URP is def not quest ready as is in 2019.3. Keep going Unity us quester's need this to work so we can show off great things with unity in mobile VR.
     

    Attached Files:

  12. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    507
    Hey, that's pretty cool! Would you mind making a pull request to my VR fork with your adjustments? Curious how you even got the water to work.
    https://github.com/prefrontalcortex/BoatAttack/tree/boat-attack-vr

    Also questions:
    - is this using GLES3 or Vulkan?
    - is this using XR Plugin Management or "old" Oculus plugin?
    - is this using Multipass or Singlepass?
     
    ROBYER1 likes this.
  13. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    503
    I just clicked on the cubemap box for the water and dragged in 1 reflection probe from the scene. I stripped out everything so I was just mesh textures and 1 directional lightmap and 1 reflection probe from that dock area. I brought in oculus utilities from the asset store and used the OVR player to walk around in quest. Whats the point tho still doesn't run or look good on quest. URP is useless on mobile vr until they have something REAL to show and prove to us how it can look and run. So it's just gonna look pretty on desktop all day which is awesome but for us dev's making real things on quest better to stick with standard pipeline in 2019.3. Really would love to be proved wrong here uhh cough *Unity*.
     
    CubicleNinjas and ROBYER1 like this.
  14. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    Hey All,

    I would like to just say some things on this subject, first off the demo was never intended to work in stereo, and this includes a 2080ti on desktop, the project simply is not setup to work, the water shader/system was never tested on stereo rendering.

    I know there are some serious issues on XR in terms of just vanilla URP, and these are being looked at with high priority, unfortunately my team isn't responsible for this so I cannot give an update on how things are going there, I will look into getting more information there as to what the plans are.

    I am looking at getting a quest or similar headset in our office(I had an oculus go but that died :( ) so that I can start looking at making sure the demo itself can run as cleanly as possible when rendering in stereo. But I also need to add some shader levels to the water as there are some effects there that are too heavy for mid range mobile devices and also any mobile device rendering full resolution/stereo.
     
    ROBYER1 likes this.
  15. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    507
    Hi Andre, no worries, we all understand that Boat Attack wasn't made to work in stereo. However, it serves very well as broken example / many bug reports towards the XR teams (both Core and URP) - that's why I tried to port it over to VR (and those are being worked on, as you said).
    I have fought many fights with the URP team over the last year about XR, so a "semi-official" Unity example scene breaking is "great" in the sense that it finally forces Unity to fix those issues.

    Ideally, once those issues are fixed, we can bring Boat Attack to the same visual fidelity in XR - happy to help out with this in terms of necessary shader changes / quality levels / Quest performance optimisation!
     
    ThomasZeng likes this.
  16. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    Indeed, thank you @fherbst for the bug reports and work into converting and running this in XR, as you said this is exactly how we can help get this issues solved quicker.
     
    ROBYER1 and fherbst like this.
unityunity