On this article, I’ll present you how one can create a 360 VR video in Unity with the assistance of two instruments:
- Unity Recorder
- 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.
After clicking on New Undertaking, the beneath window pops up. To make sure that we’re making a 3D mission, do the next steps:
- Choose 3D from the templates
- Replace the Undertaking Identify from My Undertaking to VR 360 House
- Click on the Create Undertaking 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.
When the Open in Unity button seems, click on on it.
That is what you will notice👇:
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.
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:
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. 🎉
💡 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.
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.
That is what you will notice within the Scene panel:
Strive zooming in to get an excellent view of your residence:
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:
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:
Additionally, uncheck the Mouse Look Script Element for the Digicam recreation object from the Inspector Panel.
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
Step 2: Change to Unity Registry as an alternative of My Property
Step 3: Set up Recorder by Unity Applied sciences
Step 4: Go to Window > Common > Recorder > Recorder Window
Step 5: Add Recorder > Film
Step 6: Within the Film Settings, hold the next settings (annotated within the picture beneath).
- Set Supply as 360 View
- Set Digicam as MainCamera
- Set Output Dimensions Width = 4096 & Peak = 2048
- Set Dice Map Measurement Width = 2048
- Deselect Report In Stereo
- Embrace or exclude audio (private desire. I’m excluding it as we don’t have any sound results on this mission)
- Set Output File > File Identify to “House 360 Video”
- 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
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.
Step 8: Whereas in Play Mode, click on Begin Recording within the Recorder Panel.
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.”
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.
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.
Step 3: Click on Open. Choose your House 360 Video.mp4 file after which click on 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.
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.