mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.17k stars 714 forks source link

Support for VR headsets #82

Open hhkaos opened 9 years ago

hhkaos commented 9 years ago

I was thinking the other day that it would be great to make an app like Google Expeditions for Google Cardboad but using web technologies (p.e. mixing Pannellum + Ionic Framework).

What do you think about doing a pannellum's fork to start a Pannellum Cardboard o something like this?

Cheers! Raul

mpetroff commented 9 years ago

I think adding WebVR support directly to Pannellum might be a better route, as this would (eventually) allow a variety of VR headsets to be supported. From what I've read, there's currently WebVR support in Firefox Nightly for the Oculus Rift only, with plans to add Cardboard support, and there are experimental Chromium builds that support WebVR for both the Rift and Cardboard.

There's also the school of thought that VR is sufficiently different from the regular viewer and shouldn't be integrated directly as it requires a completely different UI. In this case, it would make the most sense to write a separate Pannellum VR viewer using libpannellum.

ofekd commented 9 years ago

I've been able to use this (somewhat) successfully on Firefox for Android: https://vr.chromeexperiments.com/

I guess it doesn't use WebVR - are you insistent on waiting for it?

Thanks for looking into it :+1:

hhkaos commented 9 years ago

Hi guys!

I have tried both :), WebVR doesn't work very good in my phones (LG G3 and Nexus 5) but it seem to work better on my desktop. It crashes in Firefox and in Chrome very frequently.

About Chrome Experiments works great.

But I also tried:

It works better than WebVR but not on every phone I think.

Thanks!

ofekd commented 9 years ago

@mpetroff - what's your current view on this? We would like to start development and are wondering about integration vs separate viewer. In any case we will probably do something similar to Chrome Experiments.

mpetroff commented 9 years ago

I don't feel particularly strongly about VR, so any sort of implementation isn't a priority for me, particularly since VR technology and standards have yet to stabilize. At the moment, I'd tend toward a separate viewer since I'm not sure I want to integrate something that's still in so much flux (and I haven't implemented a plugin architecture yet, which would be a happy medium between integration and a separate viewer).

ofekd commented 9 years ago

It looks like having a plugin architecture along with a proper API like as mentioned in #30 will enable a lot of progress. Do you need any help with it? Where is the work coordinated?

mpetroff commented 9 years ago

I just need time to work on it, which always seems to be in short supply.

ofekd commented 9 years ago

As always :) We really want to get this going, so if you need any help (excluding a time machine) let me know.

Thank you very much for investing your time and sharing Pannellum with us!

rferreiroa commented 8 years ago

Hello! How it's going? I am developing with panellum and webvr. I really find interesting a plugin arch and a proper api. I can help with this stuff Kind regards!!

jeffreyvandenbossche commented 8 years ago

Hello @selko , I'm making a VR project with pannellum so i want to move the picture with the device orientation. I use gyro.js for access the gyro and accelerometer. But when i use it in the viewer it is totally flickering and spinning around and when i reach the coordinates -360 on the yaw it totally spins around to the coordinate 360. Can you help me ?

Kinds regards!

mpetroff commented 8 years ago

The yaw should be set in [-180, 180].

jeffreyvandenbossche commented 8 years ago

I have try it but when i reach now -180 it flipping the pic around to the coordinate 180 and if i use the arrows it is no problem to go from -180 to 180. Is there a function that you use for this that is not happening ?

rferreiroa commented 8 years ago

Hi! I can help you of course. @jeffreyvandenbosche . I need to implement gyro.js and test it. Have you a link or something to test it too? The option that suggest @mpetroff is good. Develop a function for these limits (-180, 180) is not very complicated, but could not be the best option. Let me test and i tell you.

Kind regards!

jeffreyvandenbossche commented 8 years ago

@selko i don't have anything online for testing, do you need something specific for testing ? Thanks that you will help me

rferreiroa commented 8 years ago

I need only implement gyro.js and test it. From the other hand, have you two viewers in your pannellum development? Its necessary to see with carboards

jeffreyvandenbossche commented 8 years ago

The javascript file can be found here, and the code that I have insert in pannellum.js could be found here No i just try it now without the cardboard, just a 360 panorama viewer with device orientation. And there is a problem also with the vertical position

rferreiroa commented 8 years ago

Ok, i'll test it this weekend. Let me see. To Open two viewers, a simple solution is open a parent iframe, but i don't like so much.

jeffreyvandenbossche commented 8 years ago

okay, thank you. For the cardboard support im not sure how to do it on the best and cleanest way. But that is for later, first fix the device orientation.

rferreiroa commented 8 years ago

I found a free app virtual 360 (https://itunes.apple.com/us/app/virtual-360/id566962234?mt=8). Interface is very similar to Pannellum and has gyro working very good

rferreiroa commented 8 years ago

http://jquery.vostrel.cz/reel another jquery plug in for this.

+info, http://www.yolinux.com/TUTORIALS/Web-Display-Panoramic-Photos.html

lodestarops commented 8 years ago

Looking forward to this =) is there a preview we could check out? VR seems to be getting pretty big. I'd like to help if I could as well.

Aykelith commented 7 years ago

I would love to see this feature implemented. I done some research and I found webvr-polyfill and here('Use polyfill') are examples(especially this one) on how to implement. I don't have much gl knowledge, but I don't think is much to work on.

gurmukhp commented 7 years ago

I've had a go at doing this but it's not been easy at all. Integrating the webVR stuff isn;t too bad, but for some reason when VRDisplay.update is called in the animate function, the browser locks up. I've even got it to show the cardboard image to signal a VR experience is about to start.

Any pointers?

Aykelith commented 7 years ago

From what I see I think maybe we should implement the stereoscopic 3d effect and use webVR to get the eyes variables.

gurmukhp commented 7 years ago

Any idea how to do this?

On 3 November 2016 at 13:20, Prisacariu Alexandru notifications@github.com wrote:

From what I see I think maybe we should implement the stereoscopic 3d effect and use webVR to get the eyes variables.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpetroff/pannellum/issues/82#issuecomment-258139782, or mute the thread https://github.com/notifications/unsubscribe-auth/AA26uf7JyB1HH9xYUWARzeVpm9El2Cyiks5q6d-WgaJpZM4FGB3c .

Aykelith commented 7 years ago

Yes, but need OpenGL knowledge because also the shaders need to be changed. You can find on internet a lot of sources that implement 3D stereoscopic effect. Maybe take a look at this code.

Aykelith commented 7 years ago

Because of the actual implementation and all the hard work that should have been done to accomplish this feature I have written my own library using WebVR for drawing and it's working good and in some month I hope I will make it public.

gurmukhp commented 7 years ago

I did something similar, wrote it from scratch using the WebVR polyfill

On 8 December 2016 at 10:02, Prisacariu Alexandru notifications@github.com wrote:

Because of the actual implementation and all the hard work that should have been done to accomplish this feature I have written my own library using WebVR for drawing and it's working good and in some month I hope I will make it public.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpetroff/pannellum/issues/82#issuecomment-265701301, or mute the thread https://github.com/notifications/unsubscribe-auth/AA26uXT0bp6th3FhEn4rI0tiOL3fknKlks5rF9WxgaJpZM4FGB3c .

EM-LilianaIturribarria commented 7 years ago

Is there a way with some listeners for "tilt" and updating the pannellum according to these values? if so how can i use the setYaw ... etc?

Wavesonics commented 7 years ago

Man I would love to see some sort of simple VR support. Are there any active efforts in this vein?

neuhaus commented 7 years ago

WebVR support is getting better and more widely available all the time. Also, this bug should have its title changed to "Support for WebVR"

BetaStacks commented 7 years ago

This is high on my priority list. This would make Pannellum a complete VR Tour solution for me. VR is running great on the Galaxy S8.

neuhaus commented 7 years ago

This is high on my priority list. @BetaStacks So you're working on this? Cool!

BetaStacks commented 7 years ago

I am indeed. I'll let you know when I find a workable solution.

ghost commented 6 years ago

Thanks. Any update on this?

BetaStacks commented 6 years ago

I just found this on Sunday. Haven't tried it yet.

https://github.com/googlevr/webvr-polyfill

theroyaltyclub commented 6 years ago

Subscribing to this one.

Curious to see if an update can be made to Pannellum now that WebVR is accepted across the board now.

DStillingfleet commented 6 years ago

Just to let you know that Pannellum in its existing format can be used to make a pretty good (if I do say so myself) Google Cardboard compatible tour.

You only need to place two instances of Pannellum side by side, and add a little javascript under the hood for the navigation. I have cross hair that appears when close to a hotspot and travel from scene to scene is enabled by maintaining focus of the cross hair over the hotspot.

see example at http://www.virtualmountains.co.uk/LakeDistrict/TourControlV20.html

gazhay commented 6 years ago

@DStillingfleet any chance of a PR for the required javascript?

DStillingfleet commented 6 years ago

Happy to help GazHay, but not sure what you mean by PR.

Sent from my phone.

On 24 Feb 2018, at 12:46, GazHay notifications@github.com wrote:

@DStillingfleet any chance of a PR for the required javascript?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Wavesonics commented 6 years ago

@DStillingfleet he means a Pull Request so that the javascript you added could be incorporated into the library.

However I'm guessing you did something a bit more custom than would be appropriate for the master library?

DStillingfleet commented 6 years ago

Hi Adam

Thanks for helping out here.

I’m very much a self taught amateur, always learning something new.

And yes, I’m not sure my code would be suitable for adding into the library, very custom and calls the Pannellum scripts rather than modifies them. My techniques are also likely to be frowned upon by those who know their JavaScript better.

Kind regards

Derek

Sent from my phone.

On 25 Feb 2018, at 21:23, Adam Brown notifications@github.com wrote:

@DStillingfleet he means a Pull Request so that the javascript you added could be incorporated into the library.

However I'm guessing you did something a bit more custom than would be appropriate for the master library?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

davidkhess commented 6 years ago

@mpetroff I'd like to chat with you about this feature in more detail – I reached out to you in email.

DStillingfleet commented 6 years ago

Hi David

I am Happy to discuss further.

Did you already send me an email? I hadn’t seen one from you.

What is your project?

Best wishes

Derek

Sent from my phone.

On 13 Jun 2018, at 14:21, David K. Hess notifications@github.com wrote:

@mpetroff I'd like to chat with you about this feature in more detail – I reached out to you in email.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

micker commented 5 years ago

no news about this ?

timakima commented 5 years ago

I would be also interested to know if VR is currently on the roadmap?

mpetroff commented 5 years ago

It's a very low priority, so it's not happening anytime soon, at least without something in particular to change my priorities. I find Google Cardboard to provide a terrible user experience and see it as little more than a gimmick. Other VR headsets are probably considerably better, but I've never used one. Chrome for Android is the only mainstream browser to support WebVR by default at this time (Firefox doesn't count, since its WebVR support is Windows-only), so WebVR's utility is limited; WebXR is also in the process of replacing WebVR.

DStillingfleet commented 5 years ago

Matthew is probably right about the gimmicky aspect of Google Cardboard VR.

But for those who want to give it ago, it's really simple to use his masterpiece for VR, especially if you just looking for a view on one location. And because it's VR with two lenses, you can play with true 3D. I made a very simple example using photos from a Ricoh Theta S that you can view at https://www.virtualmountains.co.uk/X/360_3D_Experimentx4.html.

There's no secrets, so just take a look at the short html source to see how its done. No WebVR needed.

hubick commented 5 years ago

I don't care much for gaming, but the promise of virtual tourism totally drew me to VR. Sadly, I quickly realized there's a dearth of high quality content (at least gen2 HMD image quality has improved). That's why I've started stitching gigapixel panoramas - to create that type of content I want to see more of. Pannellum has been absolutely fantastic, and the only freely available solution I've found capable of getting that level of resolution onto the web, so anyone can easily see it in their browser. As such, I'd be very excited to see that capability extend to WebVR (if not here, then where?), and am equally sad to read it's a low priority :-( Every major VR HMD vendor should be sponsoring this!

I mainly do Java / back-end Web Services, so I don't really know where to start. How much work is this (for someone who knows what they're doing)? You want a bounty? ;-)

mpetroff commented 5 years ago

As such, I'd be very excited to see that capability extend to WebVR

As I previously mentioned, WebVR is deprecated; it's scheduled to be removed from Chrome by the end of the year. Building something with WebVR would thus be a complete waste of time.

WebXR is slated to replaced it, but its API is still unstable and is likely to undergo substantial changes over the next few months. I'd much rather have a stable API, preferably one that doesn't involve a user having to enable a particular browser flag.

If the final API ends up being similar to the current API, there are two significant areas of work. One is low-level WebGL work to integrate in support for using projection and view matrices. The other is the substantial UI changes that would be required.

The final issue is available hardware. While I have a Google Cardboard viewer, I find it very unpleasant to use and would not like to use it for development. I also have a Daydream-ready phone but no Daydream View headset to go with it.