Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create VR Video player using Google Cardboard SDK for Unity

I just downloaded Google Cardboard SDK for unity. I am fine and able to create VR project. Setup is fine and everything is working fine.

I am noob at VR Apps. Just stepped in VR Apps.

I am planing to create my own VR Enabled Video Player for android, Just like the default Google Cardboard Youtube player.

Can any one suggest me a link or can guide me in developing this app.

like image 744
Rao Avatar asked May 16 '15 16:05

Rao


People also ask

How do I make a VR player in Unity?

Enabling Unity VR support To enable VR for your game builds and the editor, open the Player Settings (menu: Edit > Project Settings > Player). Select Other Settings and check the Virtual Reality Supported checkbox. Set this for each build target.

Can you play VR games with Google Cardboard?

You can use Google Cardboard for VR experiences such as gaming, exploring the world and beyond, visit popular places virtually, and much more.


1 Answers

Scott Driscoll's answer totally works. I had some initial problems getting the Easy Movie Texture Unity plug-in to work for me, but finally figured it out, and it works flawlessly. I now have 360-video running as a texture on the inside of a sphere on my iPhone 6. And I have to say, I didn't think it would happen.

For working on a Mac, here's what I did:

  1. Download the Easy Movie Texture plug-in from the Unity Asset Store
  2. Open the Demo Sphere demo scene from Assets/EasyMovieTexture/Scene
  3. Create a new (empty) Prefab to your project, and drag the Sphere GameObject from the Demo Sphere scene onto the Prefab.
  4. Reopen your Cardboard scene and drag the new videosphere prefab into your hierarchy.
  5. Open your source 360-video in Quicktime
  6. File -> Export -> 720p
  7. Change file extension from '.mov' to '.mp4'
  8. Drag your new mp4 file into your projects Assets/Streaming Assets directory. Note: don't import through the menu system, as this will force Unity to convert to OGG.
  9. On the "Media Player Ctrl" script component of your videosphere GameObject, locate the "Str_File_Name" field and provide the FULL filename. Make sure to include the extension as part of the string, "mymovie.mp4".

Pretty sure that's everything. Hope it helps other folks stuck on this problem. Thanks Scott Driscoll!

One last note, you can only view the video on the phone, not in preview in the editor. It would be better if it didn't work this way, but really once the initial issues of resolution and placement are resolved, I don't really need to see the video every time I run the scene in the editor.

like image 175
Shannon Perkins Avatar answered Nov 02 '22 16:11

Shannon Perkins