Mixedrealitytoolkit-unity: LWRP not working in RC2

Created on 13 Jun 2019  ·  15Comments  ·  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

When using LWRP With MRTK V2.0.0 RC2.1 , nothing shows up in the game window when in play mode.

To reproduce

Steps to reproduce the behavior:

  1. Import & Configure LWRP
  2. Convert standard shader to LWRP using the MRTK Menu.
  3. Open any example scene
  4. Screen only show skybox
  • Unity Version : 2019.1.5f1
  • MRTK Version : V2.0.0 RC2.1

Target Platform (please complete the following information)

  • Editor
  • HoloLens
Bug

Most helpful comment

I found the public tracker for this bug, Unity should update it with progress on it's fix: https://issuetracker.unity3d.com/issues/uwp-xr-lwrp-gameview-camera-rendering-from-incorrect-transform-when-entering-play-mode

All 15 comments

I can take a look at this tomorrow. Out of curiosity, what LWRP package version did you see this problem in?

I'm using 5.7.2. I'm trying another version (5.16.1) to see if it fixes the issue.

I'm using lwrp 5.7.2 too and unity 2018.4.0f1 !I use the same procedure.I'm using a completely new project. There's only one cube in the scene. I created a PBR material and assigned it to the cube.When I switched the platform to uwp, the cube displayed normally
SharedScreenshot1
when I clicked the play button of the unit editor, but when I checked the XR Settings in the player settings to Virtual Reality Supported, the cube in the game view would be reduced to the lower left corner of the screen,and it is very smaller,
SharedScreenshot
and when unchecked, they would return to normal.

Hi @tomkrikorian & @Lenovezhou I have some good news and bad news. The good news is I was able to reporduce the issue you are seeing. The bad news is I believe this is a Unity issue and _not_ an MRTK issue. It looks like when Virtual Reality Supported is checked _and_ a stereo headset is not attach, the scene renders in the bottom left of the viewport (and scaled oddly). I was able to reproduce this issue without the MRTK installed (and using the built in Unity shaders, please see the below screenshot). So, I would recommend reporting this issue to Unity via their bug report tool.

Capture

As a workaround, you can make sure you have a stereo headset attached to your computer when testing in the editor or you can temporarily un-check Virtual Reality Supported when working in the editor and re-check it when building for a device. Not the best workflow, but a potential stopgap until Unity addresses this issue.

I'm going to close this issue for now, but please don't hesitate to ask any questions!

https://github.com/microsoft/MixedRealityToolkit-Unity/releases
Here says MRTK Standard Shader works with Unity’s Lightweight Render Pipeline;

But I can't do it according to the steps here.
https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4311
Is there demo project available? Or more detailed steps

Hi @Lenovezhou, you should be good to go after following those steps. I made a quick demo project for you in this branch: https://github.com/Cameron-Micka/MixedRealityToolkit-Unity/tree/mrtk_release_lwrp_example

Note, I had to disable "Virtual Reality Supported" in the project settings to see anything in the editor. But, when you got to play/build on a stereo headset please remember to re-enable the "Virtual Reality Supported" option.

@Cameron-Micka thank you

Anyone contacted Unity concerning this issue? Is there any issue open that we can track so we can be aware of any released fix?

Thank you.

Hi @benjamincoven, I have a bug open with Unity but haven't heard back from them yet. Sadly you can't open issues on Unity's Scriptable Render Pipeline repo anymore and have to open/track them though their internal database. I'll let you know when I hear back!

Thank you very much!

I found the public tracker for this bug, Unity should update it with progress on it's fix: https://issuetracker.unity3d.com/issues/uwp-xr-lwrp-gameview-camera-rendering-from-incorrect-transform-when-entering-play-mode

Any update or movement on this? Would be great to be able to use LWRP with hololens given that its been out of preview for a while now

Hi @isurfraz, you should be good to use the LWRP with HoloLens and MRTK right now (we are using it for a few projects). You may just have to follow Unity’s recommendation to disable VR while using the editor if you don’t have a stereo headset attached with playing in the editor.

Found a simpler workaround: instead of toggling virtual reality supported on / off for editor vs HoloLens, instead switch the camera target eye property from both to left eye when working in the editor (and switch back to both when building).

Great find @christjt!

Was this page helpful?
0 / 5 - 0 ratings