Search Unity

Is It Worth Upgrading Existing Vr Project To Hdrp/ldrp Pipeline?

Discussion in 'VR' started by unity_3drapidsolutions, Apr 10, 2019.

  1. unity_3drapidsolutions

    unity_3drapidsolutions

    Joined:
    Nov 18, 2017
    Posts:
    21
    Hello everyone,

    Just a few quick questions. First some context. I have been working on my current VR experience, and fortunately all I have been optimizing has been the coding and interaction elements - I have not yet gone into significant effort into the shaders / textures / etc. I have been amazed by the new work coming out of shadergraph, but I am aware I need to switch into the scriptable render pipeline (and 2019.1) to utilize it. Fortunately, I have no assets that use old shader techniques, so I am at no risk of having them depracated when I upgrade.

    Here are my questions:
    (1) Should I assume that the best way to port to Oculus Rift / HTC Vive / Etc would be using the HDRP pipeline? And consequently to port to the Quest I should use the LDRP VR pipeline? However, from what I've read the project becomes irreversibly changed once I have chosen to incorporate one of these pipelines, so how and when do I incorporate this pipeline while still giving myself flexibility to compile for different platforms?

    (2) I have read that using shadergraph I will need to upgrade to 2019.1. (I'm currently at 2018.3). Is that true? Will I need to specifically choose the HDRP or LDRP at that point? Or is there a more generalized SRP option? I am a bit worried to move forward until I've confirmed this.

    (3) Do you think its currently 'safe' to begin working in these pipelines? Or should I first wait until at least 2019.1 moves out of beta? I still have a significant amount of work to do on various parts of the game that will be completely unaffected by this new shading/rendering options, so maybe it is best if I stick on working on those for now? I'm just very motivated to begin using the new ShaderGraph system but hesitant to upgrade yet.

    Thanks!!
     
  2. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Also curious about this..
     
  3. Bonkahe

    Bonkahe

    Joined:
    Jul 11, 2013
    Posts:
    14
    So obviously I am not a unity employee, however I have been working on vr projects the last few months, I went from standard renderer, up to lwrp, then hdrp, then in 2019.2 lwrp and hdrp, and I've got a bit of an answer to your questions, at least I hope.

    First a note on hdrp and lwrp in general:
    I tried out hdrp, and while it does, technically, allow vr. It really isn't ready, even in 2019.2, there are several hoops you have to jump through to get to it, the ability to have effects graph is great, however some effects I pulled from their examples (I'm a programmer not an effects artist :p ) simply didn't work with vr, I didn't investigate to hard, but sometimes I could literally run millions of particles on the gpu, and sometimes it just didn't show up. As far as performance, it was alright.
    lwrp in 2019.1 and 2019.2 seems to be considered full support of vr, as it no longer an option when launching a project to select "Lwrp" or "Lwrp VR(experimental)" it's just lwrp now, and it shows. The performance is off the charts and you barely lose anything, most notably I do tend to miss point light shadows, but everyone and their brother says no realtime shadows in vr so there's that. (not sure I entirely agree with that but w/e)

    1: I honestly wouldn't assume the hdrp for desktops and the lwrp for mobile, I would look at it more like hdrp for non vr projects, and lwrp for vr projects, they are working towards support for vr in hdrp but as I said above I don't think it's there yet. That being said they arn't impossible to switch from one to another, I have swapped before. Once you have both packages installed via the package manager you theoretically will just have to swap the renderer asset, I'm sure more stuff will come up (like transferring your shaders from one to the other) but they are based off the same SRP project, so it should allow for hot swaps like that, I will boot up a little test project and test it in a second.

    RESULTS: So I spooled up on of my old projects and installed both hdrp and lwrp on the same project (little test project with like 3 scripts on it that happened to have steamvr and openvr installed on it), and here's the results, when you install a render pipeline like hdrp, it installs it's version of shadergraph, which in hdrp is a different version, to get the same version you have to first install lwrp, then go to hdrp and expand with the little arrow then click "show all versions" and select the version that is the same as the lwrp version, that will make sure the shadergraph that is installed works with both, once your there you can rightclick/create/rendering/ to create a hdrp asset or a lwrp asset, and for the shaders the rightclick/create/sahders/ menu will be populated with hdrp and lwrp shader options. However while it does run there is a error cropping up whenever compiling a shader:
    Maximum number (256) of shader global keywords exceeded,
    Followed by the specific shader keyword that it will be ignoring, I am unsure how to fix this as I'm out into uncharted waters at this point, while it does work I assume that the keywords that are ignored may result in unintended behaviour.

    2: I cannot 100% verify whether you have to be 2019.1 to get shadergraph, I sware I used it before then but I honestly can't remember. However I can say about shadergraph being specific to a render pipeline, it is not, it will run with both as seen above with the project test it requires both renderer pipelines to be the same version, and there are issues which you might need to work through, but it does work with both.

    3: I know what unity staff will say, anything other than 2018 lts will not be safe, and to wait until the end of the year. What I say? hmmm, if your careful you have nothing to worry about, I run my project in a folder which is backed up to another harddrive, google drive, and collab. That's my primary project folder. While it can be anoyying to set up, (and God knows google drive is a pain as when it uploads unity has to be off, so I just leave it off until I'm done at the end of the day). I have 3 backups of my code, 2 of which are off site. Anything goes wrong go to the one with the latest info and retrieve it.

    That all being said, my personal opinion. I would upgrade to lwrp in 2019.1 (maybe 2019.2, but there are some problems with that atm), the performance is off the charts and allows you to do all kinds of interesting stuff, I ran ECS with 100k entities and I gotta say, it was a hell of an experience in vr, there are also quite a lot of features that even hdrp vr doesn't have (render scale is not currently in hdrp, and the MSAA which hdrp doesn't seem to have fully functional). Right now my belief is that lwrp is the best environment to make vr projects in unity, desktop or mobile, regardless it out performs, and has more fully developed features than hdrp or standard.

    Well, didn't mean to make the wall of text, but I got waist deep in, and there's no reason to stop at that point :D let me know if need me to answer any other questions.

    ~David House.
     
    plink, blastfx, konsic and 6 others like this.
  4. BenjaminWalbrook

    BenjaminWalbrook

    Joined:
    Mar 13, 2019
    Posts:
    2
    Certainly answered some questions that I have been seeking out for some time so thanks David. Its other (experienced) peoples case studies that I was looking for so thanks again for taking the time.
     
  5. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Can't use either, no camera stacking