- Home /
is unity compatible with 360 videos?
im trying to make an app for oculus rift, i found a sample 360 video online, but when i try to play it in the editor, i get sound, but the preview is black and everything else in the editor freezes. Also, the play button for the preview does not turn into a pause button, so theres no way to stop it. I have to close unity through task manager to make it stop. I can get other regular videos to play in the preview completely fine, but this one will not work. the video file is pretty big(87 mb) the regular video i had was only 3 mb. Could the big file size be the issue? I also realize, it could be the video file itself, does anybody know where i can find other 360 videos to download? It also makes me wonder are 360 videos even really compatible with unity yet?
EDIT: I just realized something, on my desktop, it says that the video file is 87 MB, but in unity it says its only 1.5MB. It looks as if unity only imported part of the video(or maybe just the sound). Ive never seen a partial import like that before, what could be causing this?
I already did this kind of project and unity IS able to do it (I would not recommend to deploy such applications on mobile as video textures are consu$$anonymous$$g a lot of resources in unity)
If you want a HD 360 video than means you need like a 4k texture size so that for each field of view you have almost a 1080p "view" of this part of the video. (but unity cant handle that big video formats).
If you want to add interactions in this video or make a complex application around it you will have to be happy with a low quality video. simple steps: create a sphere on blender, revert normals (you can also UV unwrap and map a frame of the movie on it to be 100% sure it will display the way you expect) ,then import it inside unity . Apply a video texture to this sphere, import your movie and play it on it! It should be working!
I$$anonymous$$O The best way would be to code a native plugin to render such video.
interesting. now the problem im having at the moment is that the video cant even play correctly in the preview. Would it actually work if i put it as a movieTexture on s sphere? Or would i need to make that plugin first? How would i go about making that plugin ive never actually made a plugin in unity before
I have not done any native plugin (a native plugin is not the same as a regular plugin as they use c/c++ compiled libraries), you would have to work on a lower level of programmation. You only need to write a native plugin if you want a true HD video played inside unity, basically that is how are made the plugins for movie textures on mobile phones. But you should first try to make it work with the built-in options and then decide if the quality is enough for what you want to do (using basic $$anonymous$$ovieTexture).
"the video cant even play correctly in the preview" - you mean from the inspector? i don't get what a preview is...
try to use it as a movie texture in your scene to know if it works (can be a cube/sphere/plane it doesn't matter at first)
Then if you have put your camera inside of a sphere to be able to turn around and see the video from inside, you will have to create your own sphere (with normals toward inside).