Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Unity Sentis: can't display image in VR mode #451

Closed
2 of 5 tasks
ocularbioengarhku opened this issue Jan 30, 2024 · 1 comment
Closed
2 of 5 tasks
Labels
bug Something isn't working

Comments

@ocularbioengarhku
Copy link

ocularbioengarhku commented Jan 30, 2024

SPECIFIC ISSUE ENCOUNTERED

I am making a AR app that using Unity Sentis + Google Cardboard. It is real-time program estimating the camera depth by machine learning. And I would like to make it in VR mode.

The code is basically have a world camera canvas and inside having two raw image displaying the webcamtexture and the depth map result processed by Sentis.

It works normally in editor and android, but when in iPhone, it can't display the camera feed and depth map in VR mode, it will just display them in full screen.

One interesting thing is that the Google Carboard close and gear button still clickable, but it is not shown on screen. So I wonder if there is some rendering order issue happening?

I also have another thread on Unity Sentis side, please see if that can give more information. Thank you!

SMARTPHONE (please complete the following information):

  • Device
    • iPhone 13 mini (OS: 16.5)
    • iPhone 6s (OS: 15.4.1)
  • OS
    • Android
    • iOS

STEPS TO REPRODUCE THE ISSUE

  1. Download the Unity Sentis - Depth Estimation Project
  2. Add Google Cardboard plugin
  3. Make a new scene that have the google cardboard vrmodecontroller script and the InferenceWebcam from Sentis
  4. Make a world camera canvas and put two raw image, it is for displaying the camera feed and depth map
  5. Change a bit the code in InferenceWebcam to display the webcamtexture and outputtexture on the raw image, but not bilt on screen. And no need the rainbow scan shader.
  6. Build on iPhone and error appears.

EXPECTED BEHAVIOR

It is expected the camera feed and depth map displaying in VR mode, just like this picture. Tested device on UleFone Armor 8 Pro
Screenshot_20240130-184917

VERSIONS USED

What version of Google Cardboard are you using?
Google Cardboard XR Plugin for Unity 1.23.0

If you are using Cardboard XR Plugin:

  • What version of Unity are you using?

    • 2023.2.0b17 (As the requirement of Unity Sentis)
  • Select in which graphics API you can reproduce the bug.

    • OpenGL ES2
    • OpenGL ES3
    • Metal

LINK TO A REPOSITORY WITH CODE TO REPRODUCE THE BUG

(This is not mandatory but it allows us to faster reproduce, prioritize, debug and fix the reported issue)
Here is the zip file of the Unity project

SCREENSHOTS

Here is the screen recording of the app on iPhone 13 mini

ADDITIONAL CONTEXT

Here is the xcode log file when running the app on iPhone 13 mini

@ocularbioengarhku
Copy link
Author

Kind of find out the problem of this issue is cased by the different versions in Google Cardboard and Unity Sentis. I decide to close this thread and open other new threads to discuss the versioning issue in more basic and easy example.

If you are interested, please see the following links:
Can’t display VR mode on iPhone in Unity 2023.2+
Abnormal darken color in VR mode on iPhone, Unity 2021.3+
Depth estimation example on v1.3.0 vs v1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant