pannellum icon indicating copy to clipboard operation
pannellum copied to clipboard

Support for VR headsets

Open hhkaos opened this issue 9 years ago • 69 comments

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

hhkaos avatar Jun 18 '15 06:06 hhkaos

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.

mpetroff avatar Jun 18 '15 14:06 mpetroff

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:

ofekd avatar Jun 22 '15 00:06 ofekd

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:

  • https://github.com/hawksley/eleVR-Picture-Player
  • https://github.com/hawksley/eleVR-Web-Player

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

Thanks!

hhkaos avatar Jun 22 '15 06:06 hhkaos

@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.

ofekd avatar Jul 18 '15 01:07 ofekd

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).

mpetroff avatar Jul 18 '15 02:07 mpetroff

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?

ofekd avatar Jul 19 '15 04:07 ofekd

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

mpetroff avatar Jul 19 '15 16:07 mpetroff

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!

ofekd avatar Jul 20 '15 22:07 ofekd

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!!

rferreiroa avatar Feb 05 '16 00:02 rferreiroa

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!

jeffreyvandenbossche avatar Feb 12 '16 11:02 jeffreyvandenbossche

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

mpetroff avatar Feb 12 '16 12:02 mpetroff

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 ?

jeffreyvandenbossche avatar Feb 12 '16 12:02 jeffreyvandenbossche

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!

rferreiroa avatar Feb 12 '16 12:02 rferreiroa

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

jeffreyvandenbossche avatar Feb 12 '16 13:02 jeffreyvandenbossche

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

rferreiroa avatar Feb 12 '16 14:02 rferreiroa

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

jeffreyvandenbossche avatar Feb 12 '16 14:02 jeffreyvandenbossche

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.

rferreiroa avatar Feb 12 '16 14:02 rferreiroa

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.

jeffreyvandenbossche avatar Feb 12 '16 14:02 jeffreyvandenbossche

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 avatar Feb 13 '16 15:02 rferreiroa

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

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

rferreiroa avatar Feb 13 '16 15:02 rferreiroa

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.

lodestarops avatar Apr 26 '16 17:04 lodestarops

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.

Aykelith avatar Aug 29 '16 08:08 Aykelith

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?

gurmukhp avatar Nov 03 '16 12:11 gurmukhp

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

Aykelith avatar Nov 03 '16 13:11 Aykelith

Any idea how to do this?

On 3 November 2016 at 13:20, Prisacariu Alexandru [email protected] 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 .

gurmukhp avatar Nov 03 '16 13:11 gurmukhp

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 avatar Nov 03 '16 17:11 Aykelith

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.

Aykelith avatar Dec 08 '16 10:12 Aykelith

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

On 8 December 2016 at 10:02, Prisacariu Alexandru [email protected] 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 .

gurmukhp avatar Dec 08 '16 11:12 gurmukhp

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?

EM-LilianaIturribarria avatar Jan 11 '17 23:01 EM-LilianaIturribarria

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

Wavesonics avatar Mar 22 '17 07:03 Wavesonics

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

neuhaus avatar Jun 07 '17 12:06 neuhaus

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.

BetaStacks avatar Jun 07 '17 14:06 BetaStacks

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

neuhaus avatar Jun 12 '17 06:06 neuhaus

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

BetaStacks avatar Jun 12 '17 10:06 BetaStacks

Thanks. Any update on this?

ghost avatar Sep 12 '17 11:09 ghost

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

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

BetaStacks avatar Sep 12 '17 15:09 BetaStacks

Subscribing to this one.

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

theroyaltyclub avatar Oct 16 '17 18:10 theroyaltyclub

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

DStillingfleet avatar Nov 25 '17 08:11 DStillingfleet

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

gazhay avatar Feb 24 '18 12:02 gazhay

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

Sent from my phone.

On 24 Feb 2018, at 12:46, GazHay [email protected] 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.

DStillingfleet avatar Feb 25 '18 09:02 DStillingfleet

@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?

Wavesonics avatar Feb 25 '18 21:02 Wavesonics

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 [email protected] 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.

DStillingfleet avatar Feb 25 '18 21:02 DStillingfleet

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

davidkhess avatar Jun 13 '18 13:06 davidkhess

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 [email protected] 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.

DStillingfleet avatar Jun 13 '18 16:06 DStillingfleet

no news about this ?

micker avatar May 23 '19 20:05 micker

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

timakima avatar Jun 27 '19 08:06 timakima

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.

mpetroff avatar Jul 16 '19 14:07 mpetroff

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.

DStillingfleet avatar Jul 16 '19 19:07 DStillingfleet

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? ;-)

hubick avatar Jul 22 '19 21:07 hubick

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.

mpetroff avatar Jul 23 '19 22:07 mpetroff

Any updates on this?

joshuakoh1 avatar Mar 30 '21 14:03 joshuakoh1

WebXR now has some degree of browser support, so there's finally a reasonable implementation path open. However, Google also recently discontinued Cardboard, so it's not clear what degree of support there will be for it going forward. Regardless, this isn't a priority for me in the immediate future.

mpetroff avatar Mar 31 '21 20:03 mpetroff

@mpetroff Could you point me in the direction of what I need to replace to make WebXR work?

joshuakoh1 avatar Apr 07 '21 00:04 joshuakoh1

Nothing needs to be replaced, since no similar functionality was ever developed. At the the bare minimum, you would need to develop code to initialize WebXR, render views for each eye, and process WebXR motion control inputs. Ideally, you'd also need to develop a WebXR-based user interface for interacting with hot spots and progressing through tours.

mpetroff avatar Apr 07 '21 14:04 mpetroff

I don't understand why my thread was closed here -- mpetroff/pannellum/issues/1086#issuecomment-1087801168 -- yet redirected to this thread here, i only wanted to know why 360s aren't viewable at all through the viewer not that it doesn't reperesent VR but you cannot even use it on the browser format. Sure, i threw in the sentences are they willing to support VR headsets, cause! why not ask while i'm here. As it stands Pannellum browser cannot even view 360s in standard browser formats when viewing from a headset with any bells & whistles non-active, just simple browser mode, the entirety of the 360s lag on vanilla chrome mode. Google Maps doesn't lag the 360s at all. Pannellum 360 player is a lead balloon viewing it through the chrome browser wearing a headset, try it if you must.

p.s - i don't see the google cardboard as a gimmick, phones improve over time

L00ncan avatar Apr 04 '22 20:04 L00ncan

@L00ncan I don't have an Oculus Rift headset, so I can't test with it. I also don't understand how you're trying to use Pannellum with it, given the current lack of WebXR support. I have no idea what you mean by viewing in "standard browser formats" or what "vanilla chrome mode" means.

Your issue was marked as a duplicate of this one since you asked about VR headset support, and this is the issue tracking that feature (I just updated the title to make it clear that the discussion in this issue has moved past just support for Google Cardboard).

mpetroff avatar Apr 05 '22 23:04 mpetroff

Alot of VR headset applications are owned by the Facebook, Google or Steam corporations. All web browser dependable corporations at their origins of source. It's only natural they would provide web browsers to browse the web with their VR to use their services, when you visit the web browser pannellum does not work without major lag into non-useable display, when google maps loads the same 360s in browser format the same 360s load fine. . pannellum does not work in VR web browser

L00ncan avatar Apr 06 '22 12:04 L00ncan

I think what L00ncan is saying is that the in-headset browser on a quest works with things like google streetview, and other applications with "no lag".

If you navigate that browser to a page using pannellum, the pannellum instance is then rendered within that browser window and has "lag" and is "unusable".

I'm not commenting on the validity of the use-case of pannellum within a headset browser application, but the optimization would be the responsibility of the browser implementation, not the pannellum project author. Or perhaps a fork would be more appropriate?

gazhay avatar Apr 06 '22 14:04 gazhay

I, for one, wouldn't expect the tiny little CPU and very limited RAM (6GB on Quest2) in those headsets to be able to handle Pannellum and all the data from a large pano. Not even close. Google Maps and other websites don't need to load comparably massive amounts of image data. The fact that you even expect it to work, I think shows how well most experiences on those devices have had their resources tailored and optimized specifically for the limitations of the device in order to work well.

hubick avatar Apr 06 '22 16:04 hubick

I never mentioned the Oculus Quest2 i use The Oculus Rift and not limited to facebooks standard mobile ram, i use my Gamer PC with my my Oculus Rift S, i have 32 Gb of ddr4 ram on my i7 processor with my 1060TI Geforce and 8Tb hdd space

My catalogue of 360s is enormous.

L00ncan avatar Apr 06 '22 16:04 L00ncan

In that case, the issue isn't with pannellum. In your use-case everything renders on the PC and the headset is a display.

I am not overly familiar with those setups, but that would require the graphics card to render two images (one for each eye) which are slightly different. 1060 is a bit low spec these days and maybe can't handle it, esp 3GB variants.

In any event, the headset is only displaying what the PC supplies and as such I don't see how pannellum could change that for you.

gazhay avatar Apr 07 '22 10:04 gazhay

When i load maps or 1080p/360/4k video non full-screen on webpages similar it works great though, seems like you're shooting fish in a barrel trying to conjure vr-web-page explanations. . The future investment of my web projects are solely depending on Augmented VR as a staple long before Mark Zuckerberg announced his interest, so i'm gonna need a little better than vague guesses at this point.

L00ncan avatar Apr 07 '22 12:04 L00ncan

You are clearly the expert. The beauty of open source allows you to fork pannellum, fix the issue and submit a PR for the fix to the benefit of the community.

Good luck 👍

gazhay avatar Apr 07 '22 13:04 gazhay