Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Other Tutorial: How to install Application-Spacewarp

Discussion in 'VR' started by ShantiHLeitch, Nov 14, 2021.

  1. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    Ok, it took me a long time to figure this out (I'm not very knowledgeable about git etc)
    So I just wanted to give A Simple Step by Step process for using application space warp.

    Requirements: Unity 2020.3, Git bash, Git LFS.
    1: create a folder anywhere and rightclick and select "gitbash here"

    2: Use this command:
    git lfs clone -b 2020.3/oculus-app-spacewarp https://github.com/Oculus-VR/Unity-Graphics.git

    3: after you have downloaded the files, open your unity project file in file explorer and open the packages folder. Open the downloaded file folder and move "com.unity.render-pipelines.core", "com.unity.render-pipelines.universal", "com.unity.shadergraph" into the packages folder.

    4:now open the project and there shouldn't be any errors.

    now just enable preview packages and download oculus xrs newest version, and oculus intergration package. Enable ASW in the oculus project settings and add a urp asset.
    use this code: OVRManager.SetSpaceWarp(true);
    and you should be basically set. have fun!

    Extra:
    https://developer.oculus.com/documentation/unity/unity-asw/#how-to-enable-appsw-in-app
     
    Last edited: Nov 17, 2021
    aurelag, atomonun and glenneroo like this.
  2. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    141
    is this for new projects, or am I able to update an existing one this way?
     
    ShantiHLeitch likes this.
  3. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Error when writing ovrmanager.SetSpaceWarp no such thing. I've follow all steps above.
     
    ShantiHLeitch likes this.
  4. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    233
  5. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    you should be able to update existing projects with this but things might break
     
  6. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    are you sure you got the oculus xr preview package? ovr manager comes with that
     
  7. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    How do I choose the frame rate that I want? It seems to half the framerate when turned on
     
    Last edited: Nov 16, 2021
  8. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    233
    Yes as @rz_0lento already answered you here this is expected behavior. It's also written in the documentation that this is how ASW works.

    Here is the introduction text but there is a lot more information about frame rates in the documentation, you should definitely read it to the end to understand about frame rates:
    "AppSW allows an app to render at half-rate (i.e. 36 FPS vs 72 FPS) by rendering a lower resolution motion vector buffer and depth buffer that the system uses to synthesize new frames, which results in an output of 72 FPS to the display."
     
  9. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Hi I’m having trouble getting application space warp to work with the quest 2. Should I create a standard pipeline 3D unity project and then add these folders into packages or add these folders to a already created urp project?
     
  10. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    both scenarios should work fine from my testing before
     
  11. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Interesting.. and it actually works for you? I don’t get any generated frames. Just half frame rate only.. Could you possibly send over the project file of it working?
     
    Last edited: Nov 23, 2021
  12. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    have you assigned a URP asset in the project settings? I'm pretty sure I had the same issue before when forgot that
     
  13. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Yes Iv done that. Still doesn’t work.. any chance you could send me the project file? Would be really appreciated
     
  14. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    Ok sure. When I have some free time I:ll send you a blank working one!
     
  15. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Thankyou so much. Any idea when that may be?
     
  16. liam-poli

    liam-poli

    Joined:
    Jan 19, 2014
    Posts:
    1
    Managed to get it working on there sample project, but when i add it to my project AWS activated and goes down to 36 frames but it fails to generate the new frames correctly.
     
    OstrichBoy likes this.
  17. Sholms

    Sholms

    Joined:
    Nov 15, 2014
    Posts:
    85
    Unity have plans to implement spacewarp with shadergraph? All my shaders are created with it.
     
  18. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    Where is their sample project and what version of unity are you using? 2020.3.0f1?
     
  19. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    I have set this up now but when I use OVRManager.SetSpaceWarp(true), It halves my framerate and becomes choppy. At what point will it fill in the frames? This is simply just halving my frames and nothing more..
     
  20. ShantiHLeitch

    ShantiHLeitch

    Joined:
    Jan 17, 2021
    Posts:
    7
    Hey there sorry for not giving the sample project. Ive been very busy and I don't have the time to set it up.
    if you go to Oculus-VR/Unity-Graphics: Unity Graphics - Including Scriptable Render Pipeline (github.com) you can get their offical sample project. I haven't touched AWS in a while so they may have updated some things. I'm not that knowledgeable on AWS I just shared the method that worked for me. I'm not sure of the cause of the frames not being filled in but if you use the oculus debug tool you should be able to see the AWS frames and the actual framerate. cheers
     
  21. OstrichBoy

    OstrichBoy

    Joined:
    Dec 28, 2014
    Posts:
    15
    What version of Unity did you use? It says it was last opened in another version. Any help is really appreciated. I've been trying to get this working for weeks and no one can help. I just get this error when I open the project
    ShaderGenerator\CSharpToHLSL.cs(3,7): error CS0246: The type or namespace name 'ICSharpCode' could not be found (are you missing a using directive or an assembly reference?)
     
    Last edited: Dec 12, 2021
  22. UnbelievableFlavour

    UnbelievableFlavour

    Joined:
    Aug 20, 2019
    Posts:
    4
    If you haven't fixed this yet; OVRManager is in Oculus Integration package, not in the Oculus XR plugin package. Both need to be updated. Oculus Integration just needs to be last version, not preview.
     
  23. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    141

    Sorry to come in late with the solution, but the most likely issue here is that you didn't clone with LFS. some of the files in the fork are hosted vis LFS, including, most importantly, ICSharpCode.NRefractory.dll, which is causing the error here. if the file is 1kB on your system rather than over 500kb, that's your problem.
     
    amit-chai and glenneroo like this.
  24. hanisherif1997_unity

    hanisherif1997_unity

    Joined:
    Jun 25, 2021
    Posts:
    14
    Hey, I cannot seem to get the Text/UI elements to work. It jitters when moving. Is there a shader in the URP fork GIT that supports application spacewarp ?