【问题标题】:How to display a 360 video frame by frame, for a desktop VR app in Unity?如何在 Unity 中为桌面 VR 应用逐帧显示 360 度视频?
【发布时间】:2018-06-14 07:15:04
【问题描述】:

是否可以通过事件(例如按下控制器按钮)来控制 360 度视频在时间上向前或向后移动(帧 +/- 1)?

这里的想法是从视频中提取环境。视频不应播放。当按下按钮时,我们可以转到下一帧/上一帧。

有这方面的一些文档吗?我只找到了Skybox-PanoramicBeta.shader

【问题讨论】:

  • 你试过什么?如果您有视频播放器,您应该能够将其暂停并向前或向后跳 1/60 秒。

标签: unity3d virtual-reality 360-virtual-reality 360-panorama


【解决方案1】:

您是否尝试过暂停视频并设置帧?

https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-frame.html

VideoPlayer.frame 
public long frame;

VideoPlayer 当前显示的帧索引。 剪辑的第一帧为 0,第二帧为 1,依此类推。

https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html

你能尝试一下类似的东西吗?

public long currentFrame; // something to hold the frame that's currently paused
VideoPlayer.Pause(); // pause the video
currentFrame = VideoPlayer.frame; //set the current frame to the current frame
// then when you want to move to the next frame
void PlayNext()
{
    VideoPlayer.frame = currentFrame + 1; //set the frame being played to one more than the one saved
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-12
    • 1970-01-01
    • 2017-07-04
    • 2017-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多