unity3d - 如何在 Unity 中为桌面 VR 应用逐帧显示 360 度视频?

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

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

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

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

最佳答案

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

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
}

关于unity3d - 如何在 Unity 中为桌面 VR 应用逐帧显示 360 度视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50851653/

相关文章:

unity3d - 共享全息图上的共享和注释/标记如何在新的混合现实工具包 (MRTK) 上工作以实现统一

camera - 放大时Unity整个场景消失

c# - Unity Particle Collider 与粒子

ffmpeg - 使用 FFmpeg 为 360 视频转码保留 Side Data 信息

virtual-reality - 有什么方法可以判断视频是 360 度还是全景图?

visual-studio - 我只能在 HoloLens 上部署 1 个 Unity 应用程序

c# - 在 C# 中使用动态键创建字典

android - 所有司机的虚拟现实

html - VR iframe 允许无法识别的功能

android - 如何为 Android VR View 获取正确格式的 360 VR 视频