Quilt Video Audio and Playback
In addition to recording video content, it is possible to record audio and to play back quilt recordings in the Unity Editor. Both require some specific setups and workarounds to function.
To record the audio from your Unity scene, you must use the Unity Recorder, an in-editor only utility.
To enable the Unity Recorder you must first import it from the Package Manager. The package can be found in the main Unity registry. Simply select the Unity Recorder from the Package Manager and select "Install". Note that in Unity 2018, you'll need to include enable preview packages in order to locate the recorder package.
Ensure that your scene has a HoloPlay Capture object in it, and the HoloPlay Recorder component added to the object. You can see an example of this setup in scene "8 - Recording Example Scene" under the examples folder of the HoloPlay plugin.
You'll need to set the recording up to begin when you enter Play mode. To do so, you can add a script to your HoloPlay Capture object that calls HoloplayRecorder.StartRecord() in Start and ensures that HoloplayRecorder.EndRecord() is called when you exit Play mode. You can download an example script for your convenience here.
With the Unity Recorder package installed, go ahead and open the recorder window by pressing Window -> Recorder -> Recorder Window. Once the window is open, click the "Add Recorder" button and create an audio recorder -- this means it will only capture the audio from your scene.
Most configurations of the audio recorder will be compatible, however I recommend that the "Target FPS" is set to match the frame rate on the HoloPlay Recorder component, and that "Exit Play Mode" is toggled on so that the video and audio recordings capture the same number of frames.
Now you're ready to press the "START RECORDING" button and capture your video and audio! Note that they will be separate files, and you'll need to combine them using video editing software of your choice.
It is possible to view a quilt video from within the Unity Editor using the Video Player component and the override quilt property of Holoplay.cs.
First, import a quilt video asset into your project. Once imported, it's recommended to transcode the video with the following settings to ensure smooth playback - in particular changing the codec to be H264:
Now, add an object with the video player component to your scene. You can do so by selecting GameObject -> Video -> Video Player. Add the quilt video to the "Video Clip" property on the component. Then create a new render texture and ensure that its resolution is set to match the resolution of the quilt video - for a Looking Glass Portrait, this is typically 3360 by 3360. Set this render texture to be the "Target Texture" for the video player component.
Next, add a HoloPlay Capture object to your scene - it can be found in your assets folder in Holoplay -> Prefabs -> Holoplay Capture. Open up the dropdown for "Quilt Settings" on Holoplay.cs, and set the "Override Quilt" texture to be the same render texture as the video player component's target texture.
It's important to ensure that the quilt settings of the quilt video match the quilt settings of Holoplay.cs. In particular, make sure that the views and columns match the imported quilt video rows and columns. You can freely adjust the rows and columns of your HoloPlay Capture by setting the "Quilt Preset" to be "Custom" and changing the values of "View Columns" and "View Rows".
Now simply activate the preview window (Ctrl + E or ⌘ + E) and press play to view your quilt video.
Last modified 1yr ago