Search Unity

Default scene in Lightweight Render pipeline with VR displays black screen when built to android

Discussion in 'AR/VR (XR) Discussion' started by alexchesser, Jul 9, 2018.

  1. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Hi There,

    I'm wondering if anyone can help me figure out what I'm missing here.

    The steps to build this weren't a problem. From a "New project" with a lightweight render pipeline + VR setup, all I had to do was ensure the platform was set to android and that I had assigned a bundle identifier.

    I did go ahead and switch to IL2CPP and .NET40 but I don't think those were required steps.

    The problem is that this basic project is ALL BLACK screen when I load to device. I would expect to see the same "builder's scene" that I see in the unity editor view.

    Is there something simple I'm missing which prevents this template from working correctly out of the box?

    Additionall, in previous VR projects, holding the ALT key while moving the mouse in editor mode would essentially simulate head movement in the GAME view. This does not seem to be happening in the lightweight render pipeline template's version. Am I misunderstanding the intention of this starter template?
     
  2. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Ok I spent a few more hours today trying to get this right. Still no luck and my tests have been more rigorous.

    Steps to reproduce:

    From unity latest version (2018.1.7)
    New project
    Switch platform android
    Set bundle identifier
    Set minimum android sdk to 19
    Xr settings for enabled
    Install Cardboard API
    Build and run to device

    Result:
    Very screen black

    If you build without xr enabled you can see the scene without a problem.

    Has anyone solved this?
     
  3. lego082

    lego082

    Joined:
    Jun 19, 2018
    Posts:
    6
    hey,
    does it work on your pc? im afraid i cant help you. but im experiencing the blackscreen anytime i hit play with the vive and with lwrp. how did you manage to get it working there? (before i start game mode it displays just fine. also without vr but with lwrp it works.)
     
  4. Maddieman

    Maddieman

    Joined:
    Sep 27, 2015
    Posts:
    3
    Last edited: Jul 10, 2018
    ROBYER1 and alexchesser like this.
  5. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    i briefly tried getting the LW demo scene working with steam vr/htc vive and had no luck either. maybe some one can help us as i wanted to test this new feature in VR...
     
    alexchesser likes this.
  6. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Thanks Maddieman - YES - I started up a new scene without the LWRP and I can build to device with VR functioning as expected. Looks like you're right. LWRP doesn't seem to be ready for VR yet.
     
  7. Tonieh085

    Tonieh085

    Joined:
    Nov 25, 2016
    Posts:
    14
    I have the same problem. I recently update to 2018.2 with the new LWRP version and I can't use VR neither.
    I have the VR enabled but with a null (nothing) SDK, when I start a level it changes to Cardboard SDK.. that works without the LWRP
    :(
     
    Last edited: Jul 10, 2018
  8. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Can confirm that this occurs also when building for Daydream (using LWRP in either VR or normal variant, and 2018.2). All black. Couldnt get it to work for Gear VR either, though there it would show the simple scene, but rendered monoscopically.
     
    zebria likes this.
  9. aggamer

    aggamer

    Joined:
    Apr 8, 2013
    Posts:
    3
    Using 2018.2.0f2, I'm able to deploy and test successfully with stereoscopy working on oculus go headset. I would have to get my old gearvr device setup with a sig to test so I haven't yet but if it would help someone I could test gear. The wonderful thing about this for me is, shader graph works!

    Potentially relevant details...ymmv

    From a new blank project using 3D template:
    Build platform to android
    Min API level 22 (optional think this can be as low as 21?)
    .NET 3.5

    Package manager:
    Render Pipeline Core
    Lightweight Render Pipeline
    Oculus (Android) 1.24.0

    After all that still had to add the Oculus Integration from asset store and update.
    XR Settings: Oculus
    Stereo Rendering Method: Single Pass

    Warnings that pop up in console afterwards that I ignore:

    GUID [517af1b5b81b93b43b9745d58f017562] for asset 'Packages/com.unity.xr.oculus.android/Plugins/Android/OVRPlugin.aar' conflicts with:
    '../Editor/Data/UnityExtensions/Unity/VR/Android/OVRPlugin.aar' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

    GUID [0d3bb855445e36e479c85976fc88383a] for asset 'Packages/com.unity.xr.oculus.android/Plugins/Android/libAudioPluginOculusSpatializer.so' conflicts with:
    '../Editor/Data/UnityExtensions/Unity/VR/Android/libAudioPluginOculusSpatializer.so' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.
     
  10. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    That's interesting! However, Go & Gear seem to be quite different under the hood, and Oculus seems to have cared a lot more about Go than about Gear lately, which might explain it (or not).

    Would still be interested to hear if it works for Gear on your system....
     
  11. aggamer

    aggamer

    Joined:
    Apr 8, 2013
    Posts:
    3
    Black screen on gearvr as well. Tested a variety of options and all lead to same black screen result on gearvr, while working on oculusgo. Also tested stock lightweight render vr template with oculusgo and it deployed just fine, yet gearvr didn't work with that one either. It works when I don't use SRP on gearvr of course. Found an issue listed under issuetracker but may not be related. Maybe there should be one? https://issuetracker.unity3d.com/is...gle-pass-stereo-rendering-on-2018-dot-2-alpha
     
    WendelinReich likes this.
  12. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Hi, yeah I think you should file a bug report, its a separate issue specific to the LWRP. I've searched around and so far, there is no mention of this problem (or of support for the LWRP in Gear VR/Daydream) from either Unity or Oculus...
     
  13. Tonieh085

    Tonieh085

    Joined:
    Nov 25, 2016
    Posts:
    14
    Hi, I have the same problem with LWRP and Cardboard, single pass and multi pass not works for me :(
     
  14. TrueMasterBuilder

    TrueMasterBuilder

    Joined:
    Nov 20, 2016
    Posts:
    3
    Going to Edit -> Project Settings -> Player, then XR Settings, Stereo Rendering Method = Single Pass
    got rid of the black screen for me (Vive, OpenVR sdk, 2018.2.5.f1 64bit).
     
    herrenderschoepfung likes this.
  15. Deleted User

    Deleted User

    Guest

    When you create a new VR LWRP Project and want to deploy on Android (e.g. Oculus GO), delete all Post Processing scripts and gameobjects. That helped to get rid of the black screen. Nevertheless the aliasing is really stong, even with MSAA 4x. Whereas going back to the non-LWRP renderpipeline results in smooth edges.
     
  16. Tonieh085

    Tonieh085

    Joined:
    Nov 25, 2016
    Posts:
    14
    I'm still have black screen with the Cardboard enabled.. wtf
     
  17. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
    Still happening for me. 2018.2.5, LWRP 3.0.0
     
  18. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    You guys need to file bug reports if you want Unity devs to pay attention to this problem...
     
  19. rick-mendez

    rick-mendez

    Joined:
    Jul 15, 2013
    Posts:
    2
    WendelinReich likes this.
  20. scvnathan

    scvnathan

    Joined:
    Apr 29, 2016
    Posts:
    75
    It's getting ridiculous that linear color space is not the default for new projects at this point...
     
  21. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
    Linear is the default, at least on the current VR template.

    I've tried with a number of settings now, still no luck. Filed a bug.
     
    Amaro_, zebria and WendelinReich like this.
  22. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
  23. zebria

    zebria

    Joined:
    Sep 5, 2018
    Posts:
    3
    Here everyone! Actually I'm kind of relieved to read your posts. I was starting to get insane about this crazy VR bug with LWRP!
    Heads up on my current situation:
    - Try to use LWRP because it's supposed to be the state-of-the art renderer for optimized mobile VR experience
    - Am using Graph Shaders
    - My project builds on Android/Gear VR with the LWRP for VR. Stereo Camera ok. Head movements ok. BUT: Blue screen background and I can see only the halo of my graph shaders.
    - Trying to use regular (I mean non VR) LWRP instead. 2 things happen:
    1) If using Other Settings>Color Space>Gamma => Blackscreen
    2) If using Other Settings>Color Space>Linear (as suggesteb by rick-mendez) => over-exposed scene (hope I didn't damage my retina ;-) ) + mono camera + no VR setup at all (my Head movement script are not activated).
    So, no patch seems to actually work, at least not for everyone. And no recipe seems to be safely reproducible.
    I'll dig further and keep you posted ... In the mean time let's stick together ... or simply ditch this LWRP.
    Cheers.
    Z
     
  24. zebria

    zebria

    Joined:
    Sep 5, 2018
    Posts:
    3
    Issue on github returns 404. Is issue closed? Fixed? I doubt it.
     
  25. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
    zebria likes this.
  26. zebria

    zebria

    Joined:
    Sep 5, 2018
    Posts:
    3
  27. BrandonFogerty

    BrandonFogerty

    Joined:
    Jan 29, 2016
    Posts:
    83
    Unfortunately, there is not ubiquitous hardware support for multi-view due to gpu driver issues. To mitigate this we are implementing single-pass double wide as a fallback stereo rendering method when multi-view isn't supported for a SRP.
     
    Shizola likes this.
  28. Slyesarenko

    Slyesarenko

    Joined:
    Jul 18, 2016
    Posts:
    4
    Any information when this be ready?
     
  29. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
  30. Pivetta

    Pivetta

    Joined:
    Oct 11, 2013
    Posts:
    19
    Sorry for this necro. I have the same behaviour now and tested it on 2018.3 and 2019.1 with the according highest LWRP avaiable (4.8 - 4.9 and 4.10 on 2018.3 and 5.2 on 2019.1).

    I used to have a phone where I had no trouble, a Samsung S5 LTE (G901F). The phone fell and broke so I got a new one of the same kind - I supposed at least - and I had this terrible black screen.

    I downgraded the phone from Lollipop to Kitkat to be sure it was no OS problem. And I pretty much tested every possible configuration on unity or even the different Unity versions and LWRP.

    My only clue is now that the GPU is not managing it:

    My S5 (G900F) has a Ardeno 3XX series GPU which doesn't support ES 3.1 but only 3.0
    My old phone had another graphic card supporting ES 3.1.

    I'm pretty sure now that the single pass double wide rendering system needs ES 3.1. Sadly I didn't have found documentation about this so I am not speaking any certain word but It's my only clue, I am waiting for a more modern device to test on (and selling my 2 new G900F devices).

    Btw, non XR rendering works flawlessly.

    EDIT: I am working on S5 phones because they used to be the minimum stable device for Cardboard VR and wanted it to be my minimum spec device for "full" framerate.
     
  31. MrFigment

    MrFigment

    Joined:
    Jan 5, 2017
    Posts:
    27
    How do you configurate it? I have a S5 too but only shows black screen with que white line at the middle.
     
  32. lowbl_dan

    lowbl_dan

    Joined:
    Jan 22, 2019
    Posts:
    34
    Hi, I also had the black screen when I tried building it on 2018.3.6 ( LWRP + cardboard in XR settings).

    When i read the release notes for 2019.2.0a9 included the following:
    1. Single-pass double wide rendering has been implemented as a stereo rendering method fallback for android devices that do not support single-pass instancing or multi-view.
    I tried building it on the phones again and there were visuals, but only the left eye was being rendered . The right side of the screen was black and android device monitor didn't flag any errors at all.

    Summary of testing
    Unity 2018.3.6f
    Moto X 2nd Generation (Output : black screen with white line)
    Samsung galaxy note 2 (Output : black screen with white line)
    Xiaomi A1 (Output : Working as expected)

    Unity 2019.2.0a9
    Moto X 2nd Generation (Output : only renders left eye)
    Samsung galaxy note 2 (Output : only renders left eye)
    Xiaomi A1 (Output : Working as expected)
     
  33. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
    This is still affecting 2019.1
     
    Amaro_ and Shizola like this.
  34. MrFigment

    MrFigment

    Joined:
    Jan 5, 2017
    Posts:
    27
    Update:
    In 2019.1 compiling to cardboard with a Samsung S7 S8 S9 works fine, in the Samsung S5 still shows a black screen

    The bug ID that I submitted is 1140801
     
    ROBYER1 likes this.
  35. nukkuepuss

    nukkuepuss

    Joined:
    May 17, 2016
    Posts:
    3
    For Oculus Rift, Player Settings -> XR Settings -> remove OpenVR (it's on by default) got rid of the black screen for me.
     
    Wurstautomat likes this.
  36. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Is this issue related to this issue?
    https://forum.unity.com/threads/vr-cardbord-black-screen-in-lwrp.649036/
     
  37. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    I have only skimmed this thread (so sorry if this is something that you have already tried) but I see no mention of what graphics API people are using. I have had cases in the past with VR+Android with black screen that is fixed by un-selecting Auto Graphics API and removing Vulkan.
     
  38. pravinanimataaar

    pravinanimataaar

    Joined:
    Jul 26, 2016
    Posts:
    1
    For those, who face Black Screen problem in Google VR and LWRP in unity 2019. Following thing worked for me.
    1. I used HelloVR Scene from Google VR SDK in untiy
    2. In Hierarchy, delete or disable GvrInstantPreviewMain GameObject.
    thats all.
     
  39. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    130
    I had the same problem

    Fixed by the following:

    Set project color space to Linear.
    Set Project API to OpenGL 3 instead of Auto API.

    Thats all I've done.

    Unity 2019.1.7F1 + Gear VR
     
  40. rollingdjs1

    rollingdjs1

    Joined:
    Apr 25, 2016
    Posts:
    2
    This worked for me. Thank you.
     
  41. zxcvb7653

    zxcvb7653

    Joined:
    Nov 11, 2017
    Posts:
    24
    This is the solutions that fixes my black screen issue (iOS)

    • In Hierarchy, delete or disable GvrInstantPreviewMain GameObject.
    • Set project color space to Linear. ( require gamma to build) - This works! But then it has the mirror display issue
    • Going to Edit -> Project Settings -> Player, then XR Settings, Stereo Rendering Method = Single Pass
    However using google VR it has a mirror display issue, mentioned here: https://answers.unity.com/questions/1627145/cardboard-google-vr-ios-results-in-upside-down-vie.html
    The solution was to set Project API to OpenGL 3 instead of Auto API. But the problem is that Only "Metal" can be used when building in Linear Colourspace.

    I will update if I find a solution
     
  42. phygitalmadhouse

    phygitalmadhouse

    Joined:
    Jan 19, 2017
    Posts:
    12
    In 2019.2.10 , after 1 day going absolutely crazy , just change

    Edit -> Project Settings -> Player, then XR Settings, Stereo Rendering Method = Single Pass to Multypass and unity looks like get rid of the unsupported devices singlepass.
     
  43. histired

    histired

    Joined:
    Feb 15, 2019
    Posts:
    3
    Unity 2019.2.11f1, Developing for the Oculus Quest and the problem is only able to see in the left eye.
    I managed to fix it by setting certain options in the Project Settings (Build Settings for Android):
    Player > Other Settings > Color Space - Gamma
    Player > Other Settings > Multithreaded Rendering - true
    Player > XR Settings > Stereo Rendering Mode - Multiview
     
  44. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    114
    Unity 2019.3 worked for me. It's the only one that would build singlepass.
     
  45. crude_slick

    crude_slick

    Joined:
    May 9, 2018
    Posts:
    3
    Using Unity 2019.3.0b12, first got only left side rendered, then I did setting for single pass and OpenGLES3 first (manual). Now I am getting stereo view but with 8 views! That's right:

    I tried restarting computer as well. Any suggestions please?
    My settings:

    Same result by removing Vulkan and switching to IL2CPP
     
    Last edited: Jan 5, 2020
    ROBYER1 likes this.
  46. Amaro_

    Amaro_

    Joined:
    Oct 11, 2019
    Posts:
    1

    And what happens when u try a different api level like 7.0 nougat?