360 panorama in Browser, HTCVive, Oculus Rift - unity3d

can you please help me to understand how can I make 360 panorama for Web.
I am using SteamVR and Oculus sdk because I want universal app for (Web, HTCVive, Oculus Rift).
It works in Unity but after compiling for WebGL it does not work on web.
Please review this link.
Can you tell me what I am doing wrong?Or maybe to develop the universal app is impossible?
Thank you!

HTC Vive or Oculus SDK are meant for platform specific apps. You cannot use them in WebGL build. Unity at the moment doesn't have anything for WebGL + WebVR according to this.
But to support both features WebGL and WebVR you can this plugin. This is a WebGL template which has a wraper of WebVR in its js script.
Follow this link to implement it in your WebGL App : Exporting An Indie Unity Game to WebVR
But I recommend you create platform specific builds as well for Oculus and HTC Vive. Its not much effort to change the platform and build the app.
Hope this helps

Related

Agora unity sdk is not letting the scene to render with MRTK Oculus Integration

I am building an oculus app using MRTK (Mixed reality toolkit) and need Agora's video feed streaming capabilities.
While building my app I am able to hear sound but not able to see unity scene, it's all blank and appears as a black screen.
Has anyone encountered this before?
I did try Agora SDK with oculus integration without MRTK and it works fine.
yes change the project settings xr-Plug in management to oculus for android.

Setting up Oculus Rift in Unity with OpenVR + SteamVR

Hi I'm trying to set up my Oculus Rift in Unity to develop with OpenVR and Steam. I'm using Unity version 2017.4 and have added the SteamVR package from the asset store to my project. I'm guessing I need to download the github OpenVR folder and add to my project, but is that all? and will the Rift be recognised then? I'm not sure if I need the Oculus integration tool from the asset store as well or will it interfere? Any step by step assistance would be amazing, thank you in advance (also, I know developing with Oculus and not Steam might be easier but need to use Steam for this project)
I'm currently working with Oculus Rift so...
First you need to download Oculus Rift Software. It will help you setup your Rift. You can download it HERE
Second, you probably need Oculus Rift SDK for Unity. It's working perfectly well for me. I just click Play and app is starting in Oculus Rift. You can download it HERE. And use Import Asset to add in to your Unity Project. I highly recommend also Oculus Rift Avatar SDK (for hands and nice support for Touch Controllers) and Oculus Rift Sample Framework for prefabs (like grabbers for grabbing things obviously).
Also if you will have any problems, remember to update your USB Drivers (especially for USB 3.0).

Understanding VR ecology

I have background in android and have developed few apps of my own. Now I want to explore VR app development for android. Going through forums etc., first thing I understand is that I need to have basic infrastructure like unity 3d sdk, cardboard sdk, cardboard device etc. I am not able to understand roles these individual components play in overall bigger picture.
Like, why do I need unity 3d sdk if I have android sdk and cardboard sdk, and android studio as dev environment?
Then, if I plan to develop for something like Oculus then what all sdks and devices are needed, and which programming language I can work with?
Your options depend on which device you'll target:
Game engines like Unity: You need Unity and some plug ins and of course the device you will target too:
Google Cardboard / Daydream
Samsung Gear VR
From scratch application: Your language is java and you need to download the sdk for your target device:
Google Cardboard / Daydream SDK
Samsung Gear VR, Oculus Mobile SDK
Regards
I think there is a lot of promise in web-based VR. Of course, the app will not be as high fidelity as a native application built in Unity or Java but you get the benefit of being able to target many platforms out of the box. ReactVR is a cool project coming out of facebook that is making it easier and more performant to build VR apps with web technologies.
Here is a cool starter-kit that can help you get started if you are interested: https://github.com/scaphold-io/react-vr-graphql
P.S. GraphQL is a great tool for enriching your VR apps with data no matter if you're building it with React, Unity, or Java.
You can check out A-Frame (https://aframe.io), a web framework for building VR experiences. It's been out over a year and has a strong community and ecosystem. With web-based VR, you get cross-platform support across Rift, Vive, Cardboard, Daydream, GearVR out of the box. With A-Frame, you get all of the boilerplate with a single line of HTML. You just have to grab a VR-enabled browser.
A-Frame's architecture is similar to Unity's, entity-component, but A-Frame makes it declarative and similar to web development. With effort, the fidelity can rival native (https://blog.mozvr.com/a-painter/).

Should I enable VR support for google cardboard in Unity

I'm creating my firs VR app i unity for google cardboard. I noticed VR support setting in the inspector. I searched a little bit and it isn't clear for me if I should enable it for google cardboard. Here is the link for unity manual about it. Thanks for help!
For a while you should not enable VR support since Unity has no native support for Cardboard yet, although it was announced on Vision Summit 2016 for future versions.
By now, you should only use the Unity package with the appropriated prefabs for Google Cardboard available at https://developers.google.com/vr/unity/download.
You dont need to check Virtual Reality Supported to make an app for Google Cardboard. Make sure that you download the Google VR SDK for Unity and bring it in your assets folder in your project. Then just search for GVR Main in your assets folder and bring that into your project scene and you are good to go. Also you may not need the default camera in the scene as well. Just create your scene and your build is automatically supported for Google Cardboard. VR Supported is largely for computer dependent devices like the Oculus Rift and not apps that you run on your mobile phones.

Unity: how to embed a VR Cardboard game into a website

Right now, I think there is not a way to do it within Unity. This is what I have found so far (please, correct me if I'm wrong):
The most popular VR plugins compatible with Unity for both Android and iPhone are Durovis Dive SDK and Google Cardboard SDK.
I have read that most Android phones are compatible with those VR plugins. My experience is that just a few are compatible. Durovis Dive SDK seems to be the most compatible one nowadays. If the Android phone has not gyroscope and the game has the Google Cardboard SDK plugin, the game won't load or crash. If the Android phone has not gyroscope, the game will load but the image will be still when we move the phone.
Unity 5.3 has been just released. It includes WebGL support. It includes VR support. Samsung Gear and Occulus are supported. However, I have not found out anything about the compatibility with others Android or iPhone devices. Maybe it works (I have not test it. I have not found somebody who has test it yet).
Here there is a list with VR technology for the web.
We can find stuff to Export an Unity scene to Three.js. Scripts and animations don't seem to work though.
I just spoke with an industry leader in VR experiences for media companies a couple weeks ago. And his company was one of the first to attempt VR in a web browser through mobile. He said it didn't work very well. He was partially successful, but if his company had problems, I'm guessing it's still a few years off. He said new additions to HTML are coming that will improve this over the next few years.
Hope that helps!
could you try WEBVR
YouTube Tutorial: Demo WebVR Unity
Although it has some defects, but it can serve you for basic applications. I was testing it with 360 videos, this was very heavy for the platform.
You may try WebXR. But you can't add both SDK at the same time.