Universitat Oberta de Catalunya

Unity: Basic 360 video

This tutorial explains the basics for creating a Unity scene to visualize a 360 video file.

It assumes that you have a 360 video file ready, and either you’ve created a new Unity project or are working on one where you want to have a 360 video in one of the scenes.

      1. Import your video file. You can do this by dragging & dropping it into the Project panel. Before doing so, note the size of the video in pixels (width and height; e.g. 2560×1280).
      2. Create a new Render Texture.
        Right click on the project panel, where the assets are located, and select Create > Render Texture.

        You can (and should) rename the Render Texture immediately after creating it, or at any time, using the project panel.

      3. Set the Render Texture’s size to the same as the video you want to play, so that it plays the video correctly.
        Use the Render Texture’s Inspector panel to change the size parameters to fit those of the video pixels.

      4. Create a new material.
        Right click on the project panel, where the assets are located, and select Create > Material.

      5. Link the Render Texture to the Material.
        Click on the Material in the project panel, and view the corresponding Inspector panel, where, there is a field labelled Spherical (HDR).

        In order to link the Render Texture to the Material, you can either click on the select button within the field, or simply drag the texture you created in step 2 into this field.

      6. Set the material as the scene’s Skybox
        The final step with the material is to set it as the Skybox (the surrounding environment) in your scene.

        You’ll need to do this using the Lighting panel, which you can open via the menu Window > Rendering > Lightning Settings.


        In this panel, the first field is Skybox Material. Once more, you can set your material by dragging & dropping or by clicking on the select icon, which is the small circle on the right:

        Once you’ve set your material, it should look something like this:

      7. The last step is to create a Video Player.
        You can do this by using the menu GameObject > Video > Video Player, or by right clicking on the hierarchy panel and selecting Video > Video Player.

        Now a Video Player object will appear on your Hierarchy panel. Make sure it is not a child of any 3D object there. i.e.: it is not indented and with a small arrow.

        Not this:

        But this:

        Click and drag to ‘unchild’ the camera if it looks like the first image.

      8. Reset the camera position to 0,0,0
        Now that the focus is on the Hierarchy, make sure your camera is at the centre of the 3D world. This is not essential, but it makes sense, as you want your viewpoint in the centre.

        Click on the Main Camera and, in the inspector’s top field, right click Transform (which marks any 3D object’s position, rotation and scale) and select reset.

        Now the Transform should look like this:

      9. Set the Video Player to…  play the video
        Final step: Click on the video player and view the Inspector panel. We are interested in the fields Video Clip and Target Texture.

        Once more, either by selecting the menu or by dragging & dropping, assign the video file you imported in step 1 to Video Clip and the Render Texture you created in step 2 to Target Texture.

      10. Click Play to test
        Make sure your game window is visible somewhere on the Unity interface (Window > General > Game; or ctrl+2 (pc) / ⌘+2 (mac)), and click the Play button in the top central part of Unity:

        If everything is correct, you should now visualize the video as seen by the main camera in the Game window (and most likely in a different perspective on your 360 video in the Scene window, which is where you manipulate the 3D elements).

        Now you are ready to export your application and test it on a VR device or smartphone.

    Recommended citation: SOLER-ADILLON, Joan. Unity: Basic 360 video. Mosaic [online article], November 2019, no. 176. ISSN: 1696-3296. DOI: https://doi.org/10.7238/m.n177.1960.

Acerca del autor

Profesor de Digital Media en el departamento de Media Arts de Royal Holloway, Universidad de Londres. Licenciado en Filosofía por la Universitat Autònoma de Barcelona, Máster en Telecomunicaciones Interactivas por la New York University (ITP; Tisch School of the Arts), Máster Oficial en Sistemas y Media Cognitivos Interactivos por la Universitat Pompeu Fabra y Doctor en Comunicación Social por la Universitat Pompeu Fabra. De 2006 a 2016 trabajó en el Departamento de Comunicación de la Universitat Pompeu Fabra ejerciendo la docencia en: Grado en Comunicación Audiovisual, Máster de Artes Digitales, Máster en Vídeo Digital – del cual fue director -, Escuela Superior Politécnica y escuela de diseño ELISAVA. Además, ha impartido clases en la Universitat de Vic y en la Universitat Oberta de Catalunya, así como en la Universidad San Francisco de Quito (Ecuador). También Ha realizado varios proyectos de instalaciones interactivas, performance y vídeo que ha presentado en Nueva York y Barcelona, además de diversos talleres y conferencias. Como investigador, destaca su investigación en el campo del arte digital y del documental interactivo.

Deja un comentario