WebVR support is extremely problamatic

vr
viewer
3d

(Bandersnatch) #1

I was initially excited to play around with WebVR support for Sketchfab, after all, being able to view a ton of models in VR easily certainly sounds exciting!

However, I quickly found problems. The first of which is that I was unable to get Firefox Nightly to recognize Sketchfab for WebVR. Every other WebVR application I tried on it worked fine, but Sketchfab was never recognized (for reference, when I pressed the VR button with WebVR set up properly on Firefox Nightly, it just gave me the cardboard link). That left me with Chromium, which I tried and did recognize Sketchfab for WebVR, but is decidedly less stable than the Firefox Nightly. For example, Chromium currently doesn't limit the WebGL write access to your graphics memory, so if you have too large a model or more than one tab open which can access WebVR it crashes without throwing a proper error. This meant that every minute or two I'd have to restart Chromium. This is not ideal, and if you plan to support WebVR, you should definitely get it to work for the Firefox Nightly which is far more stable.

My next problem was that not only was positioning your viewpoint in VR incredibly hard, it was inconsistent too! This is actually two separate issues. One is that there seems to be a bug where the viewpoint is completely screwed up. With no rotation or zooming of the model I often found the models to be behind me, or super far away, or way too close, and so on. The non-VR viewport's perspective to the model had no decipherable impact on this initial pose. However moving off of the initial viewpoint in the non-VR viewport caused even more issues often times, and made it so several times I just outright lost the models from the VR viewpoint. The second issue is that the controls for looking around with the non-VR viewport don't translate to giving a good VR view. As such when the view was working correctly, it was difficult to actually get the perspective I wanted. Often times I'd try to put my head height at that of a humanoid character and be right in front of them, but that was surprisingly difficult. What I'd recommend is to instead make the VR viewport position be independent of the non-VR viewport, and when the VR mode is turned on, create an icon of the VR viewport position, then allow this to be dragged around and rotated into the point the viewer wants it in the scene. This would make it much easier to orient it correctly.

While we're on the topic of the viewport, I often found myself wanting to rotate the model while in VR mode. I'm proficient at using my keyboard while in VR, and while I know a lot of people aren't I feel like it should still be an option to drag around on the viewport area to rotate the model and change the viewport while you're in VR.

My last complaint is a weird one, but it's actually a complaint about the depth. I set up the Sketchfab WebVR after looking through the Sketchfab Oculus Rift Application. In that all of the pieces had a very nice sense of depth, regardless of your position. Shifting to WebVR, I found that even looking at the same pieces as were shown in the Sketchfab rift application, they looked flat. This makes me think that for some reason your WebVR implementation flattens the depth somehow. It's worth noting that several other WebVR pages have this problem too, not all of them, but some. Alternatively, it could be because I wasn't able to get the camera close enough to get the proper perspective for depth to be apparent.

I think that Sketchfab could benefit greatly from proper implementation of WebVR (or a sketchfab browsing app for VR headsets), however, this current implementation is extremely lackluster, and needs a lot of work. Best of luck though!


(Stephomi) #2

WebVR in firefox is not there yet, they are still based on the old API which we stop supporting since it's going to be removed very soon. We don't want to support legacy stuffs for things that were never stable to begin with.

Here's a page stating which browsers are up-to-date regarding the webVR API : https://iswebvrready.org/ (navigator.getVRDisplays is the needed part).
Note that this page is maintained by mozilla. Apparently end of may for firefox should be ok.

As for chrome crashing once and a while, I experienced many crashes on the webVR build, but it wasn't sketchfab specific, obviously these things will be improved, development on webvr is moving quickly.

Yes the non-vr camera rotation is currently independent but we'll probably make it either dependent or reset the camera so that it faces the models.
Currently you can press the space bar once you have your headset on to reset the camera.
As for FOV, VR mode is using its own FOV and it's dependent of the headset.

Overall, the navigation in vr is not done in sketchfab yet. It'll probably be something along teleportation instead of model rotation though, but nothing is decided yet.

Currently you can move FPS-style through wasd-arrow keys shortcuts (you have to click once on the embed though to get the focus).
Also if you want a visual feedback on your screen you can add "?preserveDrawingBuffer=1" at the end of the url.

We don't know the scales of our models, so we can't magically infer the scale of the VR experience (diorama, human-size scene, etc...).
So in practice, we choose a default scale that is relative to the model bounding box. This default scale might change in the future, and we'll maybe add the option for the uploader to set the scale of the VR scene.
Currently you can change your scale with the o and p shortkeys.
o will make the model smaller (for diorama-like scene, where you can easily move the head around the model), p will do the opposite.


(Bandersnatch) #3

Thanks for the response! I was unaware that the firefox branch wasn't up to date anymore. That's unfortunate since the Chromium version is so unstable. I also wasn't meaning to imply that the chromium crashes were Sketchfabs fault, it's a known bug and due to the way it's designed. It's not readily apparent on most computers, but those with a small gpu memory will crash when the gpu memory is full and the WebVR of chromium tries to access more. It's a known bug that unfortunately has not yet been fixed.

Sounds like you guys have plans to fix this already. It was just extremely annoying to find the model initially be in some random direction and extremely tiny every so often. Also just so you know, non-VR camera rotation does currently affect the position of the VR camera when the model is not centered properly. This obviously isn't something easy to fix, but unfortunately is there. Also when I was talking about perspective, I wasn't referring to FOV, obviously the FOV is going to be that of the headset, things would look really weird otherwise (though it might be a fun thing to mock up in Unity to see what it would be like to have eyes on the back of your head through a super wide FOV).

I didn't know about the movement controls, but those are useful! You might want to make it so there are some instructions somewhere on those existing, since I saw no documentation of those anywhere (though I guess many people might instinctively try them). That said, teleporting would likely be much better. A side note, if you intend people to walk around somewhat (which a teleporting movement scheme implies) you might want to add a floor at the lowest point of the bounding box and default the initial viewpoint to head height above that. Both Oculus and HTC/Valve strongly recommend having a floor in VR applications where there is the intention to walk around, without one, people feel uncomfortable in the space.

Shifting the scale is definitely something that would be nice as I much prefer things to feel "diorama sized" by being to small than to feel as flat as most things did. The main reason for adding VR to view models is to see their depth, so erring on the side of having the depth be more pronounced is probably a good thing.

Anyway, hope the VR viewer works out for you guys!


#4

Small note that the controls and other instructions are documented here


(Bandersnatch) #5

Oh, cool thanks! I didn't see that. Might be handy then to link it on the page if you activate WebVR mode. Thank you for all your help though!