Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Cubic mapping support for 360 video #610

Open arianaa30 opened 8 years ago

arianaa30 commented 8 years ago

I see a CubeSceneObject in the API. Does GearVRf support playing of the Cubic mapped 360 videos, as introduced by Facebook recently?

https://code.facebook.com/posts/1638767863078802/under-the-hood-building-360-video/

thomasflynn commented 8 years ago

I think something custom will need to be done for this. Video is done via the texture_external_oes extension: https://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt

texture_external_oes does not support cube maps. I suspect what would need to be done is to use a custom shader with each cubeface. each cubeface would have a specific set of texture coords that maps to the necessary areas in the video texture (done via texture_external_oes). let me talk with some people internally and see if our ideas line up.

arianaa30 commented 8 years ago

Thanks. I would also ask this from FB guys maybe they have a player available for their cube maps.

danke-sra commented 8 years ago

@arianaa30 FYI, if it is hard to render a cubemap from a single texture (as from the video), a quick way is to blit it into 6 textures and use normal cubemap to render the video.

apjagdale commented 8 years ago

@arianaa30 Not quite right but you can check this: https://github.com/apjagdale/GearVRf-Demos/tree/GearVrfDemoBranch/gvr-fbCubic360Video