Search Unity

Scriptable render pipeline with the Hololens

Discussion in 'VR' started by Olias, May 8, 2018.

  1. Olias

    Olias

    Joined:
    May 8, 2018
    Posts:
    4
    Hey,
    I wanted to try out the new Scriptable render pipeline with the Hololens.
    But i unfortunatly run into some Problems.

    The first Problem was easy to fix: I had to change the Skripting Backend from .net to IL2CPP. But as it seems that .net is discontinued, this seems reasonable.

    The Second issue is where i`m stuck: After fixing the first issue i was able to deploy my App to the Hololens but unfortunatly i`m not able to launch the App. After clicking on the App everything disapears(as normal), but no Unity loading sign appears and after some second i hear a peep and i`m back at my homescreen.

    I already updated the Hololens to the newest Windows version which resoulted in a longer time where everything is disappearing, but no other changes.

    Now i`m wondering if anybody has get this working already, or has an idea to fix it.

    Unity Version 2018.1.0f2, 2018.2.0b3
    Hololens Version 10.0.14393.2248 and prev.
    Windows Version 1803
    Visual Studio Version 15.7.0
     
  2. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    580
    Do you have the correct Windows 10 SDK installed?
    (i.e. one that matches your Windows 10 Build or supports it)

    Not sure if SRP is supported properly yet? Maybe?. I assume you are trying the LWRP. Right?

    Also, have you tried with 2017.x or standard RP of 2018.1 and it was working properly?
    Make sure all your certificates etc are current.
     
  3. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    407
    This sounds like your Unity app is crashing, possibly a bug in SRP.

    Can you try running with a debugger attached to see what's happening? Also, does this still occur when you're not using SRP?
     
  4. Olias

    Olias

    Joined:
    May 8, 2018
    Posts:
    4
    I attached the debugger and got this Error:
    SRPTest.exe triggered an breakpoint

    The function in Question:
    // System.Void UnityEngine.RenderSettings::get_ambientProbe_Injected(UnityEngine.Rendering.SphericalHarmonicsL2&)
    extern "C" void RenderSettings_get_ambientProbe_Injected_m3312258528 (RuntimeObject * __this /* static, unused */, SphericalHarmonicsL2_t3220866195 * ___ret0, const RuntimeMethod* method)
    {
    typedef void (*RenderSettings_get_ambientProbe_Injected_m3312258528_ftn) (SphericalHarmonicsL2_t3220866195 *);
    static RenderSettings_get_ambientProbe_Injected_m3312258528_ftn _il2cpp_icall_func;
    if (!_il2cpp_icall_func)
    _il2cpp_icall_func = (RenderSettings_get_ambientProbe_Injected_m3312258528_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.RenderSettings::get_ambientProbe_Injected(UnityEngine.Rendering.SphericalHarmonicsL2&)");
    _il2cpp_icall_func(___ret0);//<----
    }
     

    Attached Files:

  5. Olias

    Olias

    Joined:
    May 8, 2018
    Posts:
    4
    Yea i have the right SDK installed, yes you are right i`m using the LWRP.
    I haven´t tryed out the 2017 version.
    I deployed the app(just two cubes) to the hololens with SRP disabled and everything works fine.
     
  6. Olias

    Olias

    Joined:
    May 8, 2018
    Posts:
    4
    Tryed out the newest build of Unity(2018.2.0b7) and the newset Version of the renderpipeline(2.0.1).
    Still getting the exact same error at the exact same position.
     
  7. ramJat

    ramJat

    Joined:
    Jun 12, 2018
    Posts:
    14
    Hello friend
    i am getting these errors when try to make build for Holocene
    i am using unity 2018.1.1 with lightweight pipeline.

    C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(75,40): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

    C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(76,40): error CS1061: 'Type' does not contain a definition for 'IsDefined' and no extension method 'IsDefined' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

    C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(77,41): error CS1061: 'Type' does not contain a definition for 'IsAbstract' and no extension method 'IsAbstract' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

    C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessManager.cs(80,34): error CS1579: foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'

    C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\PostProcessEffectSettings.cs(26,41): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
     
  8. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    283
    Are there any plans for supporting the Lightweight Pipeline and Post-Processing stack packages for Windows Store .NET backend builds?
     
  9. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    @timke can someone update on SRP status for hololens? Making commercial apps on such a perf hungry platform would be a lot easier with access to the newer optimised pipelines and APIs, but we cannot upgrade from 2017 without knowing it will work...
     
  10. quixotic

    quixotic

    Administrator

    Joined:
    Nov 7, 2013
    Posts:
    122
    The Lightweight Render Pipeline has been tested on Hololens, and we resolve bugs as they get reported (please report any bugs you find). I can't predict whether or not your project will hit any new issues. If you're risk adverse then you are likely better off avoiding features that are in preview–like Lightweight and SRP. Being in preview means APIs and features are likely to evolve. If you would like to try it out we recommend making a copy of your project first.
     
  11. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979

    The bug described here where you are kicked out before the app starts up when using SRP is still there, using latest unity 2018.2 release. Is there anyway a fix can be released so we can start targeting using the new SRP?

    Went through a lot of trouble setting up our project to be ready only to find you cant build anything out. Anything that is unable to build using SRP to hololens, builds fine when not using SRP. This is using stock shaders. @quixotic
     
    Last edited: Jul 23, 2018
  12. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    bump, have a live commerial project and need to resolve this?
     
  13. BrandonFogerty

    BrandonFogerty

    Joined:
    Jan 29, 2016
    Posts:
    83
    @GameDevCouple_I ,

    Hi! Which stereo rendering method are you using? Multi-pass/Single-Pass/Single-Pass Instancing? I ask because SRP does not support multi-pass. Only single-pass and single-pass instancing are supported.

    We are aware of issues with respect to compatibility between stereo rendering and the post-processing stack. These issues will be addressed in due time.

    Thanks!
     
  14. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    33
    Hi @BrandonFogerty, @quixotic and all,
    We just tried to work with LWPR and build to Hololens, followed your input and found info at the excellent page (unity docs): https://docs.unity3d.com/Manual/SinglePassStereoRendering.html

    Changed the rendering method to Single Pass Instanced, but we still have a problem with the post-processing errors like @ramJat mentions above.
    We saw in the docs that indeed the post-processing require "special attention" when switching to single pass rendering,
    And here it's getting too complicated... any ideas on how to disable/work with the post-processing in a way that we can build to Hololens?.
    Thanks.
     
  15. XI1stIX

    XI1stIX

    Joined:
    Jan 30, 2017
    Posts:
    2
    I am having the same problem as OP. This is not very fun.

    it works fine if I don't use the SRP
     
    Last edited: Aug 17, 2018
  16. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Can one of you supply a repro project I can look at? I've been trying to test Lightweight Render Pipeline on Hololens and also having a few troubles so I'd like to compare notes on what you guys are trying to what I am working on as well. This way, I can offer credible feedback to the SRP team on how people are using their feature.
     
  17. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    Hi We use single pass instanced, as we make high use of instancing in shaders. Problem still is there in either of them though.
     
  18. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
  19. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    bump, seriously nothing since august? Its annoying to see there is an optimized rendering pipeline that we cant even access!
     
  20. Keyveo_Dev_00

    Keyveo_Dev_00

    Joined:
    Mar 15, 2016
    Posts:
    4
    Hi,

    Got the same problem where application stops 2 seconds after being launched and cursor goes in Zz mode.

    Here is a link to project.

    I thought that testing the awesome LWRP feature on template scene would be a good start :)

    What I did is pretty simple:
    Create a new project using LWRP template and Unity 2018.2.16f1 (LWRP package version is by default v2.0.6)
    Switch settings to Hololens
    Remove post process effects


    Next are the full steps to repro.

    Build Settings:
    Switch to UWP platform
    Set 'Target Device' to 'Hololens'

    Player Settings:
    Add 'SpatialPerception' capability
    Check 'VR supported'
    Set 'Stereo Rendering Method' to 'Single Pass'

    Quality Settings:
    Set UWP quality level to 'Very Low'

    Scene:
    Remove 'Post-process Volume' gameobject
    Remove 'Post Process Layer' component from 'Main Camera'
    Set 'Clear Flags' of 'Main Camera' to 'Solid Color'
    Set 'Background' color of 'Main Camera' to #000000

    Build

    Visual Studio:
    Open solution in VS 2017
    Switch to 'Release', 'x86', 'Device'
    Deploy on Hololens using a wire



    Let me know if you need more info or if this bug has already been adressed.
     
    MadeFromPolygons likes this.
  21. Keyveo_Dev_00

    Keyveo_Dev_00

    Joined:
    Mar 15, 2016
    Posts:
    4
  22. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Hey guys, sorry for the slow replies on this. We are looking into this as I type, we've had some recent versioning happen on the render pipeline team and as a whole the LWRP system applies to to many platforms it's quite the puzzle to piece together the support level for all platforms and work out all the kinks as fixing one thing could break others. We should have some more concrete information this week to share on what we found and we can then compare notes to what you are trying to do. Keep in mind LWRP is still in preview so we expect some growing to be done as we exercise the system more and learn from use cases like yours.
     
    MadeFromPolygons likes this.
  23. Keyveo_Dev_00

    Keyveo_Dev_00

    Joined:
    Mar 15, 2016
    Posts:
    4
    Nice! GLHF
     
  24. Benjams

    Benjams

    Unity Technologies

    Joined:
    Oct 27, 2017
    Posts:
    20
    This has been investigated and the discussion here has helped us identify important issues. We are working to resolve them. Here are a few notes that you might find informative until the issues are fixed:

    The current SRP version is 5.2
    Using older version of Unity will require an older version of SRP that might have changes that haven't been backported into earlier versions of SRP. Consider upgrading to latest 2018.3 which will allow use of a more recent SRP. For the best results, upgrade to 2019.1 and use the very latest SRP.

    SRP and Post Processing have known issues on certain platforms and configurations
    Recent testing on HoloLens revealed issues when using Post Processing with SRP. In particular, single pass instancing is not working as intended. Single Pass (double wide) does compile and run, however, the builds occasionally fail when using Debug/Development builds. If using this configuration, consider attempting a Release build first with HoloLens.

    Removing post processing from the project may give better results for HoloLens
    Remove the package and any post processing volumes/layers from the project may resolve certain issues. However, some issues may persist with HoloLens. Specifically, you may encounter a Y-Flip in the final eye textures with the HoloLens using the single pass rendering methods. Furthermore, some of the built in lightweight shaders do not yet have gpu instancing enabled. Both of these issues are actively being investigated. Other UWP devices do not experience this Y-Flip in Single Pass.

    I cannot offer an immediate solution, however, to get development of your project unblocked, consider:
    1) Upgrade to the 2019.1 alpha.
    2) Use the most recent SRP from the package manager or grab the latest from GitHub.
    3) Remove Post processing from the project
    4) Use Single Pass stereo rendering mode until instancing is fully supported.
    5) Test on different UWP device until HoloLens support is fixed.
    6) Make sure that your project is configured correctly for UWP and SRP.

    We appreciate your feedback on these preview features.
     
  25. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    @Benjams

    While I am very glad your looking into this, I just want to chime in and mention that recommending people use an alpha version is not really the best solution to a path to deployment. Thats just opening up a can of worms of problems for peoples projects.

    As a hololens developer: I recommend everyone just hold of using SRP at all until it is properly compatible with HoloLens. If your using the MRTK or HTK which most users are, then 2018.3 is not supported, let alone 2019.1.
     
    Last edited: Dec 11, 2018