googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.48k stars 253 forks source link

Loading 360 degree Panoramic images #39

Open vinamragupta7 opened 4 years ago

vinamragupta7 commented 4 years ago

Can this SDK provides functionality to load 360 degree panoramic images in a view inside an APP. Does it has any Header exposed ? Is this SDK alternate for GVRSDK?

jballoffet commented 4 years ago

Cardboard SDK currently doesn’t have a built-in 360 degree panoramic image capability. You should be able to draw the required scene on a texture that could be afterwards distorted and rendered by the Cardboard SDK.

About the differences between this SDK and GVR, please see issue #6.

Kowboj commented 4 years ago

I used GCSPanoramaView and loaded an image. I get 360 degree image, when I look around with iPhone.

This might be a separate issue, but... any interaction (switch to cardboard view/full screen) causes a crash MPMoviePlayerController is no longer available. Use AVPlayerViewController in AVKit. I also get warnings from the main thread checker Main Thread Checker: UI API called on a background thread: -[UIView layer] PID: 51524, TID: 12361000, Thread name: com.google.cardboard.RenderThread That's inside a SwiftUI app. Any idea off the top of your head @jballoffet ?

jballoffet commented 3 years ago

As far as I can see based on your comment, you seem to have an issue with MPMoviePlayerController, which has been deprecated in iOS 9. As explained above, you would need to draw the appropriate scene on a texture in order to use Cardboard SDK for distortion and rendering. A 360 degree panoramic image sample is low on our priority list and we will not get to it this year. If you want to author such a sample, we would be happy to accept your changes. Please read CONTRIBUTING.md and follow the process. Patches are welcome.

DaReign commented 9 months ago

Try this approach https://docs.unity3d.com/Manual/VideoPanoramic.html