Saturday, June 25, 2022
HomeWeb DevelopmentEasy methods to make a 360 VR video in Unity

Easy methods to make a 360 VR video in Unity


On this article, I’ll present you how one can create a 360 VR video in Unity with the assistance of two instruments:

  1. Unity Recorder
  2. Google Spatial Media Metadata Injector

This method can be utilized to create 360 VR movies for any scene inside Unity. For demonstration functions, I might be utilizing the free House Package asset out there within the Unity Asset Retailer, and that is what you’re going to get after following the steps on this article.

Play the YouTube video and swipe throughout the video participant to get a 360 view of the residence.👇

Let’s get began:

Moreover, right here’s the total video tutorial:

Undertaking setup

When you haven’t achieved so already, create a brand new Unity 3D mission and title it “VR 360 House.”

You are able to do so by launching Unity Hub in your laptop and clicking New Undertaking.

New Project Button Highlighted

After clicking on New Undertaking, the beneath window pops up. To make sure that we’re making a 3D mission, do the next steps:

  1. Choose 3D from the templates
  2. Replace the Undertaking Identify from My Undertaking to VR 360 House
  3. Click on the Create Undertaking button

3D Create Project Button

The mission will take a couple of minutes to open up in Unity.

As soon as the mission is open, go to the Unity Asset Retailer and get the House Package asset. As an alternative of the Open in Unity button (within the picture beneath), you will notice the Add to my Property button. After clicking the Add to my Property button, additionally, you will see the Open in Unity button.

Open in Unity

When the Open in Unity button seems, click on on it.

That is what you will notice👇:

Apartment Kit Dropdown

This window is known as the Package deal Supervisor. On the left-hand facet, you will notice all of the property that you’ve bought from the Unity Asset Retailer. On the right-hand facet, you get the outline of that asset. Handy, isn’t it?

Click on Obtain. As soon as the asset will get downloaded, click on Import.

Import Apartment Kit

After clicking on Import, merely click on on the Set up/Improve button for those who get a warning. After that, you will notice this pop-up:

Import Apartment Kit

N.B., many instances while you import a third-party asset just like the one above, you needn’t import all of the recordsdata of that asset in your mission. That is why Unity provides you the choice of choosing particular recordsdata to your mission so that you simply don’t bloat your mission with pointless issues.

For the aim of this tutorial, be certain that all of the recordsdata are checked after which hit Import.

After the asset is imported, you will notice a brand new folder referred to as Brick Undertaking Studio beneath Property within the Undertaking Panel on the underside left-hand facet. Which means you could have efficiently downloaded the House Package asset. 🎉

Project Assets

💡 If the property panel seems to be a bit completely different for you, you’ll be able to change the view by dragging the little change left and proper (as demonstrated beneath). The change is positioned on the underside right-hand facet.

Bottom Right Slider

Now click on on the Scenes folder positioned beneath Property > Brick Undertaking Studio > House Package. And now double click on to open the Scene_01.unity file.

Double Click Scene

That is what you will notice within the Scene panel:

Scene Panel

Strive zooming in to get an excellent view of your residence:

Looking Around Apartment

Within the Scene Hierarchy window, develop the Base Scene Sport Object.

Choose First Particular person Participant. Reposition this recreation object in order that it’s contained in the residence. Here’s a fast demo:

First Person Player

We place the First Particular person Participant contained in the residence in order that the Digicam object (little one of the First Particular person Participant recreation object) can be positioned contained in the residence. We’ll use this Digicam in a later step on this article.

Please guarantee that this Digicam object is tagged as Primary Digicam. Right here is how you are able to do so from the Inspector Panel:

Main Camera Inspector Panel

Additionally, uncheck the Mouse Look Script Element for the Digicam recreation object from the Inspector Panel.

Uncheck Mouse Look

Phew! Now the residence is about up.

All we’ve to do now’s report a 360 VR video of the residence.

Let’s go.

Report a 360 VR Video of any scene in Unity

Step 1: Go to Window > Package deal Supervisor

Window Package Manager

Step 2: Change to Unity Registry as an alternative of My Property

Select Unity Registry

Step 3: Set up Recorder by Unity Applied sciences

Select Recorder

Step 4: Go to Window > Common > Recorder > Recorder Window

Recorder Window

Step 5: Add Recorder > Film

Select Movie

Step 6: Within the Film Settings, hold the next settings (annotated within the picture beneath).

  1. Set Supply as 360 View
  2. Set Digicam as MainCamera
  3. Set Output Dimensions Width = 4096 & Peak = 2048
  4. Set Dice Map Measurement Width = 2048
  5. Deselect Report In Stereo
  6. Embrace or exclude audio (private desire. I’m excluding it as we don’t have any sound results on this mission)
  7. Set Output File > File Identify to “House 360 Video”
  8. Choose Output File > Path. The default path will create a folder referred to as Recordings contained in the mission itself. If you need, you’ll be able to set it to a customized vacation spot in your laptop by clicking the three dots icon on the right-hand facet

Recorder Window Fields

Hold this Recorder window open. We’ll want it within the subsequent two steps.

Step 7: Click on the play button within the Unity Editor.

Play Button

Step 8: Whereas in Play Mode, click on Begin Recording within the Recorder Panel.

Start Recording

Step 9: After 30 seconds (roughly) cease recording. You’ll be able to report an extended video primarily based in your requirement. Then go to your Undertaking folder > Recordings. One can find a file referred to as “House 360 Video.mp4.”

Apartment 360 Video Folder

Strive enjoying the above video in any video participant equivalent to VLC Media Participant. It’ll seem a bit distorted. It’s anticipated conduct. This occurs as a result of the video doesn’t embrace any knowledge concerning the 360 assist functionality. So as to add this 360 assist, it’s important to inject knowledge, or moderately “metadata,” utilizing a instrument by Google.

Let’s see how one can set up Google’s Spatial Media instrument after which inject 360 metadata into House 360 Video.mp4.

Step 1: Obtain the Spatial Media Meta Knowledge from their official repository. Scroll down a bit until you see this Property part of their releases web page. Get the “360.Video.Metadata.Instrument.win.zip” file.

File for Video

Step 2: Extract the zipped folder anyplace in your laptop after which run the Spatial Media Metadata Injector.exe file. You’re going to get this pop-up.

Popup Spatial Media

Step 3: Click on Open. Choose your House 360 Video.mp4 file after which click on Open.

Click Open

Step 4: Lastly, click on on Inject Metadata. This may create a file referred to as House 360 Video_injected.mp4. That’s it.

Inject Metadata

Now, this video will be simply uploaded to YouTube or you’ll be able to even strive enjoying it on VLC Media Participant. It is possible for you to to pan across the 360 video by holding the left click on in your mouse and transferring round.

Strive it out within the YouTube video participant:

Conclusion

You will get the last mission right here.

Be at liberty to make use of different property from the Unity Asset Retailer and create your individual 360 movies in Unity. You’ll be able to even create your individual environments utilizing completely different property, prepare them as you would like, after which report a 360 video of it. Isn’t that incredible?🙂

When you’re exploring AR and VR, get my 100+ AR/VR Sources Pack and save 1000’s of hours on AR/VR analysis. Or take a look at a few of my different work right here.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments