unity 360视频_如何将360视频与Unity集成

unity 360视频_如何将360视频与Unity集成

unity 360视频

Since the introduction of the new Video Player component in Unity 5.6, we’ve had a lot of questions about how to integrate 360 video into a Unity project. Over the past months we have slowly been refining our suggested workflow and working on a high quality shader to make it happen. Today, we are pleased to announce that we are ready to share our work in the form of a beta shader ready for use in any Unity 5.6 or later project.

自从Unity 5.6中引入新的Video Player组件以来,我们就如何将360视频集成到Unity项目中提出了很多疑问。 在过去的几个月中,我们一直在慢慢完善建议的工作流程,并致力于打造高质量的着色器以实现这一目标。 今天,我们很高兴地宣布,我们已经准备好以Beta着色器的形式共享我们的工作,可以在任何Unity 5.6或更高版本的项目中使用。

The concept is simple and straightforward. Take any supported video file (like an .mp4) containing either 360 or 180 equirectangular or cubemap content, import it as an asset, and play it through a Video Player component. The key is to target the Video Player to a Render Texture of the same dimensions as the video. Then, connect that texture to a Material set to use the new Skybox/PanoramicBeta shader and use that as your Scene Skybox Material.

这个概念很简单明了。 提取包含360或180等角矩形或立方体贴图内容的任何受支持的视频文件(例如.mp4),将其导入为素材资源,然后通过视频播放器组件进行播放。 关键是将视频播放器定位到与视频尺寸相同的渲染纹理。 然后,将该纹理连接到材质集,以使用新的Skybox / PanoramicBeta着色器并将其用作场景“ Skybox材质”。

Voila! You now have a Skybox being driven by your panoramic video! Turn on the Virtual Reality Support Player Setting and throw on a VR headset and you’ll immediately be surrounded by your video in full 360.

瞧! 现在,您的全景视频驱动着一个Skybox! 打开Virtual Reality Support Player设置并戴上VR头戴式耳机,您将立即在360度全景视频中被包围。

If you have 3D 360 content, you can take things a step further for the ultimate immersive experience by using the Skybox Panoramic shader’s 3D settings.

如果您拥有3D 360内容,则可以通过使用Skybox Panoramic着色器的3D设置进一步提升最终沉浸式体验。

Full project details and documentation available at our GitHub project page.

完整的项目详细信息和文档可在我们的GitHub项目页面上找到

翻译自: https://blogs.unity3d.com/2017/07/27/how-to-integrate-360-video-with-unity/

unity 360视频