unity3d - 统一录制 360° 视频不是等距矩形

标签 unity3d 360-degrees 360-virtual-reality

我在 Unity 2018.2.10f1 中有一个时间线项目。我使用 Unity Recorder导出 360° 视频。这是设置:

enter image description here

但输出不是等距矩形,不能作为 360° 视频播放:

enter image description here

有什么问题以及如何解决?谢谢

2:1视频

enter image description here

免费相机设置

enter image description here
enter image description here

最佳答案

编辑 3:
显然这个问题是由 Physical camera 引起的相机组件上的设置。关闭物理相机将按预期导出 equirectangular 图像/电影。

下面的信息仍然相关,但不是这个特殊问题的确切解决方案。

您的设置现在不会导出等距柱状图图像,而是导出方形图像。 Equirectangular 图像需要具有 2:1 的纵横比。而您当前的纵横比是 1:1。

在 Unity 记录器设置中,您已将“360 度 View 输出”设置为 2048x2048。导致您看到的方形图像。尝试将其设置为 4096x2048。这将生成纵横比为 2:1 的 4k 图像,这应该适用于等距柱状投影。

See this page有关等距柱状投影如何工作的更多信息。 (强调我的)

Scanning cameras sometimes cover more than one 360° turn but software often assumes that equirectangular images cover 360° horizontally and 180° vertically, i.e. make sure that your equirectangular image has a proper aspect ratio of 2:1.



编辑:
查看 2:1 图片,Unity 似乎记录了立方体贴图,而不是等距柱状图。您可能需要使用 RenderTexture.ConvertToEquirect 将立方体贴图转换为等距矩形。来自 the docs :

if (renderStereo)
{
    cubemap.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Left);
    cubemap2.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Right);
}

看看这个Unity bog其中进一步详细介绍了 unity 如何使用立方体贴图/等距柱状投影
来自博客:

After stereo cubemaps are generated, we can convert these cubemaps to stereo equirectangular maps which is a projection format used by 360 video players [...] To convert cubemaps to stereo equirectangular maps, call RenderTexture.ConvertToEquirect()


Recorder 上的“立方体贴图”宽度参数可能需要调整以获得所需的结果。但不确定哪个值最有效。

编辑 2:
我创建了一个测试项目(在 GitHub here 上)。但是,尽管(似乎)具有相同的设置,但我没有得到与您相同的输出。我的输出看起来像一个完美的等距柱状图(不需要做任何转换,因为我认为可能需要,正如我在第一次编辑中所解释的那样)。

我的设置:
Settings of the Unity Recorder

输出:
360 equirectangular output image

关于unity3d - 统一录制 360° 视频不是等距矩形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59239336/

相关文章:

swift - 从 0° 转 359° 时,如何修复我的指南针应用程序进行完整转动?

ios - 使用 SceneKit 和 CoreMotion 播放 360 度视频时相机位置错误

html - 如何使用 css 在网站中添加和显示 4d 图像

algorithm - 如何在 360° 视频中找到具有相同颜色的像素的质心?

c# - Unity3D项目配置: Treat warnings as errors

firebase - 使用 google 登录时,unity 应用程序崩溃,使用 firebase

unity-game-engine - 如何使用unity 3D为360图像设置动态热点

android - 如何播放 360 mp4 视频?

c# - 订阅 Func 事件后不会调用协程方法

unity3d - 错误 CS0234 : The type or namespace name `iOS' does not exist in the namespace `UnityEditor' . 您是否缺少程序集引用?