Unity

Integration Description

We have created a custom Unity Package that allows you to easily import your volumetric videos into Unity to be played back in your projects.
The package can be download here: https://ef-eve.com/downloads/

How to Use

  1. Download the package from https://ef-eve.com/downloads/
  2. Either create a new project or update your existing project to a unity version of at least 2021.1.16f1. (Older versions might work, but also might not, your mileage may wary)
  3. If creating a new project, make sure it is using the Universal Render Pipeline (URP), or if you already have a project and it isn’t using URP, upgrade your project to use URP (you can find how to through google).
  4. After opening your unity project, in the topbar, choose Assets -> Import Package -> Custom Package and in the opened dialog choose the downloaded package file.
  5. You should now have a folder called EVE.Sequence_Playback in your assets folder.
  6. To start with, experiment with the Example Scene provided with the package by opening EVE.Sequence_Playback->Example Scene->Scenes->Main.unity in your unity’s project files window.
    1. In the Hierarchy navigate to the Sequence Loader gameobject.
    2. In the Inspector you should now see a script called Sequence Loader

      With it you can load volumetric videos into your project, with a couple of steps that you need to do:
      1. Decide if you wish to load the video into RAM or into the disk memory. If you wish to use RAM, then enable the Use Buffer toggle (For now this only works when loading meshes in .obj files. Alternatively keep the toggle off.
      2. Next click the Select Sequence Folder button and select the folder that contains your .obj or .ply files.
      3. Now click Generate Frames and wait for the code to process and import your volumetric video.
    3. Now you should have imported a volumetric video into your project. It is either all loaded into your scene, therefor taking up space in RAM, or it is all saved in a new folder within the [Streaming Assets->PreLoaded Data] directory. The video can be found as a new child object of the Sequence Loader.
    4. To Control the playback of your video you need to select the newly created object and use the Sequence script attached to it.
      1. You can change the playback framerate here:
      2. Loop Type determines the functionality when the playback reaches it’s end. Once means that it will stop when the end is reach. Loop means it will repeat from frame 0 when the end is reached. Ping Pong means that when the playback reaches the end it will start playing backwards until it reaches the start again when it will flip again to play forwards.
      3. By changing the Renderer object you can change which Renderer controls the visual display of this specific volumetric video.
      4. You can use the buttons at the bottom to control the playback of the video. Their names are self-explanatory.
      5. You can also control the playback of the Sequence script through code, with functions such as Play() Stop() Pause() and so on. The code is open source so you can easily see which functions you should call from within the script.
    5. To control the visual side of your videos you’ll need to use the Renderer. In the example scene in the Hierarchy you can find the Default Renderer object that has a Renderer script attached to it.
      1. The Renderer is responsible for controlling the display of both pointcloud videos and mesh videos at the same time.
      2. You can use the buttons at the top to switch between 4 different presets for mesh materials, which also account for whether or not you’re using meshes that are using vertex colors or meshes that have textures.
      3. This Unity package comes with 8 different vfx graphs, which you can use from the get go by changing the Current Vfx value to represent the index of the vfx that you wish to use from the Vfx Filter list. Or you can change an existing vfx graph or create a new one and add it to the list here. Keep in mind that if you’re changing the vfx graph at index 0 it will not work because index 0 is used for all the variations of the simple point cloud point display, which itself has 8 variations based on how many points your pointcloud has (this is done for optimization purposes).
What are your feelings
Updated on August 20, 2024