THOUGHT:

Using 360-degree video in a VR setting

Corporation Pop’s Unity Developer, Peter, has been exploring the use of 360-degree video in virtual reality. This is how it went.

What are 360 videos?

360-degree videos are recorded in every direction at the same time, giving an all-encompassing view. They are typically recorded using either a special rig of multiple cameras, or a dedicated camera with multiple lenses embedded into it, which records overlapping angles simultaneously. While watching these videos — on websites which support 360 video like YouTube or Vimeo — you’re able to control the viewing direction and watch them from whichever perspective you’d like.

Setup

First, within a Unity project, I created a material and set its shader to ‘Skybox/Panoramic’. I then applied the material to the current skybox within the scene, thus acting as our new skybox. Next, I applied a render texture to the skybox material. 

I then used the texture on the video player component as its target texture. This meant the video would be projected onto our skybox material, giving the full 360-degree video illusion. 

By using a skybox, the video will always be centred around the player. This means that no matter their physical position, they will always be at the focal point of the video. 

I needed a suitable 360-degree video to use as a demonstration and uploaded some high-quality footage I found of a drone flying over Ayutthaya in Thailand, which was perfect. 

With everything in place, my last steps were to bring in my already constructed VR rig from a previous project. This contained all the elements required for viewing a VR experience in Unity.

360 video still from Unity

The experience

The setup for this project was swift and simple. It was easy to swap out whichever video we used and made for an excellent viewing experience. Once inside the project in VR, I was pleased with its simplicity and the sense of immersion I felt when viewing the video in its full 360-degree glory.

As I moved my head around, I could easily focus on different areas of the video, and was so immersed to the point that I felt vertigo from looking down as the drone was hovering above the ground. 

Thailand scenery still

What next?

The work we’ve done is transferable to other projects that require the use of 360-degree videos within VR. 

It’s also a quick and painless way of getting the full 360 video effect without using YouTube VR or other websites or software. 

We have a (secret) virtual reality project in the pipeline in which we’ll be using this technology, so it’s handy to have it on standby. It will require minimal work to convert, simply swapping out the current video clip for a new one.

I am really pleased with this project, which showcases 360-degree videos within Unity to their very best. I can’t wait to use what we’ve learnt with our clients.

Peter Greenhalgh - Unity Developer
AUTHOR:

Peter Greenhalgh
Unity Developer