WebVR on WebKit

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WebVR on WebKit

Sergio Villar Senin
Hi,

some weeks ago I uploaded [1] a patch (based on previous work by my
colleague at Igalia Zan) which basically adds the IDLs for WebVR 1.1
spec along with the required stubs and the cmake build configuration.
As Sam Weining perfectly pointed out, this needs some previous
discussion in the list in order to go ahead.

WebVR is an API which provides support for exposing virtual reality
devices (like HMDs) to web apps so that the info coming from those
devices could be converted into position, orientation and interactions
with virtual worlds. Note that for a complete VR experience some other
APIs would be needed as for example de Gamepad API for controller
support (some extensions were proposed).

Although the spec[2] mentions that 1.1 is deprecated it is what
browsers are shipping initially as 2.0 is still in a "do not implement"
state.

Regarding interest from other vendors, WebVR is already supported in
Edge, Firefox nightly and experimental builds of Chromium. Other
browsers supporting it are Samsung Internet and Oculus Carmel.

Our main interest is to eventually have some implementation working on
WebKitGtk and/or WPE on Linux but obviously there is a lot of cross-
platform work that needs to be done as well. Our initial idea would be
to use the OpenVR API as Valve released a Linux version of their SDK
some months ago. Looks like a safe bet as other vendors like Firefox or
Chromium already include it in their trees as third party.

WDYT?

BR

[1] https://bugs.webkit.org/show_bug.cgi?id=174202
[2] https://w3c.github.io/webvr/spec/1.1/
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Maciej Stachowiak

Though WebVR is not the most elegant API for VR, it's a least common denominator, and it seems like other browsers are on board. So I think it's worth at least experimenting with. (Other opinions may vary; this is just my personal view not an Official Apple Position or anything).

I'm guessing the hard work here is in implementing the back ends for specific platforms and achieving good quality.


Please consider reworking your patch to use a runtime flag instead of a compile-time flag. It doesn't seem to meet any of the reasons for using compile-time flags that are mentioned in our Feature Policy <https://webkit.org/feature-policy/>. Even with just the stubs, I think it would fit the guidelines for a default-disabled runtime flag. New features should use runtime flags whenever possible IMO.

As an added benefit, if the feature started out runtime switched, it could be tested immediately. I bet there's tests that would be relevant even with just stubs (at least a simple one of checking what classes and methods are present). With runtime flags, you'd be able to have tests in the initial patch.

Regards,
Maciej


On Aug 2, 2017, at 1:55 PM, Sergio Villar Senin <[hidden email]> wrote:

Hi,

some weeks ago I uploaded [1] a patch (based on previous work by my
colleague at Igalia Zan) which basically adds the IDLs for WebVR 1.1
spec along with the required stubs and the cmake build configuration.
As Sam Weining perfectly pointed out, this needs some previous
discussion in the list in order to go ahead.

WebVR is an API which provides support for exposing virtual reality
devices (like HMDs) to web apps so that the info coming from those
devices could be converted into position, orientation and interactions
with virtual worlds. Note that for a complete VR experience some other
APIs would be needed as for example de Gamepad API for controller
support (some extensions were proposed).

Although the spec[2] mentions that 1.1 is deprecated it is what
browsers are shipping initially as 2.0 is still in a "do not implement"
state.

Regarding interest from other vendors, WebVR is already supported in
Edge, Firefox nightly and experimental builds of Chromium. Other
browsers supporting it are Samsung Internet and Oculus Carmel.

Our main interest is to eventually have some implementation working on
WebKitGtk and/or WPE on Linux but obviously there is a lot of cross-
platform work that needs to be done as well. Our initial idea would be
to use the OpenVR API as Valve released a Linux version of their SDK
some months ago. Looks like a safe bet as other vendors like Firefox or
Chromium already include it in their trees as third party.

WDYT?

BR

[1] https://bugs.webkit.org/show_bug.cgi?id=174202
[2] https://w3c.github.io/webvr/spec/1.1/
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Dean Jackson-7
In reply to this post by Sergio Villar Senin


> On 2 Aug 2017, at 19:55, Sergio Villar Senin <[hidden email]> wrote:
>
>
> Our main interest is to eventually have some implementation working on
> WebKitGtk and/or WPE on Linux but obviously there is a lot of cross-
> platform work that needs to be done as well. Our initial idea would be
> to use the OpenVR API as Valve released a Linux version of their SDK
> some months ago. Looks like a safe bet as other vendors like Firefox or
> Chromium already include it in their trees as third party.

I agree with the idea to assume use of the OpenVR SDK at the moment. It
is the only major VR SDK that is available for macOS, Linux and Windows.

So maybe our platform API should be very similar to the OpenVR API?
I haven't looked at other SDKs like Oculus, but hopefully it isn't too
different.

Dean


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Alexis Menard-3
Hi,

On Aug 3, 2017, at 7:52 AM, Dean Jackson <[hidden email]> wrote:



On 2 Aug 2017, at 19:55, Sergio Villar Senin <[hidden email]> wrote:


Our main interest is to eventually have some implementation working on
WebKitGtk and/or WPE on Linux but obviously there is a lot of cross-
platform work that needs to be done as well. Our initial idea would be
to use the OpenVR API as Valve released a Linux version of their SDK
some months ago. Looks like a safe bet as other vendors like Firefox or
Chromium already include it in their trees as third party.

I agree with the idea to assume use of the OpenVR SDK at the moment. It
is the only major VR SDK that is available for macOS, Linux and Windows.

So maybe our platform API should be very similar to the OpenVR API?
I haven't looked at other SDKs like Oculus, but hopefully it isn't too
different.

You should also keep an eye on OpenXR which is being discussed in Khronos. These seems like the future standard API for applications to hook into to support VR (independently of the underlaying VR runtime). More info there : https://www.khronos.org/openxr


Dean


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Sergio Villar Senin
O Xov, 03-08-2017 ás 08:44 -0700, Alexis Menard escribiu:

> Hi,
>
> > On Aug 3, 2017, at 7:52 AM, Dean Jackson <[hidden email]> wrote:
> >
> >
> >
> > > On 2 Aug 2017, at 19:55, Sergio Villar Senin <[hidden email]>
> > > wrote:
> > >
> > >
> > > Our main interest is to eventually have some implementation
> > > working on
> > > WebKitGtk and/or WPE on Linux but obviously there is a lot of
> > > cross-
> > > platform work that needs to be done as well. Our initial idea
> > > would be
> > > to use the OpenVR API as Valve released a Linux version of their
> > > SDK
> > > some months ago. Looks like a safe bet as other vendors like
> > > Firefox or
> > > Chromium already include it in their trees as third party.
> >
> > I agree with the idea to assume use of the OpenVR SDK at the
> > moment. It
> > is the only major VR SDK that is available for macOS, Linux and
> > Windows.
> >
> > So maybe our platform API should be very similar to the OpenVR API?
> > I haven't looked at other SDKs like Oculus, but hopefully it isn't
> > too
> > different.
>
> You should also keep an eye on OpenXR which is being discussed in
> Khronos. These seems like the future standard API for applications to
> hook into to support VR (independently of the underlaying VR
> runtime). More info there : https://www.khronos.org/openxr

Right I'm aware of that effort. The thing is that using OpenXR does not
imply that you can get rid of native SDKs anyway. From conversations I
had with some other people involved in WebVR efforts it looks like the
main SDKs (like Oculus or Vive's) will be used anyway if available and
that OpenXR would be more like a fallback for the hundreds of devices
that will hit the market soon.

BR
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Alexis Menard-3
Hi,

On Aug 3, 2017, at 9:19 AM, Sergio Villar Senin <[hidden email]> wrote:

O Xov, 03-08-2017 ás 08:44 -0700, Alexis Menard escribiu:
Hi,

On Aug 3, 2017, at 7:52 AM, Dean Jackson <[hidden email]> wrote:



On 2 Aug 2017, at 19:55, Sergio Villar Senin <[hidden email]>
wrote:


Our main interest is to eventually have some implementation
working on
WebKitGtk and/or WPE on Linux but obviously there is a lot of
cross-
platform work that needs to be done as well. Our initial idea
would be
to use the OpenVR API as Valve released a Linux version of their
SDK
some months ago. Looks like a safe bet as other vendors like
Firefox or
Chromium already include it in their trees as third party.

I agree with the idea to assume use of the OpenVR SDK at the
moment. It
is the only major VR SDK that is available for macOS, Linux and
Windows.

So maybe our platform API should be very similar to the OpenVR API?
I haven't looked at other SDKs like Oculus, but hopefully it isn't
too
different.

You should also keep an eye on OpenXR which is being discussed in
Khronos. These seems like the future standard API for applications to
hook into to support VR (independently of the underlaying VR
runtime). More info there : https://www.khronos.org/openxr

Right I'm aware of that effort. The thing is that using OpenXR does not
imply that you can get rid of native SDKs anyway. From conversations I
had with some other people involved in WebVR efforts it looks like the
main SDKs (like Oculus or Vive's) will be used anyway if available and
that OpenXR would be more like a fallback for the hundreds of devices
that will hit the market soon.

That’s correct that native VR runtimes will still be a requirements but they are going to be under the OpenXR application layer (read Oculus and Steam will most likely make their runtime OpenXR compliant). The benefits of OpenXR for WebKit (or any engine) is that you’ll have a unique backend to talk to a VR runtime (whatever the user has installed).

Please note that OpenXR is two folds, an application interface/API for applications (say in this case WebKit) to talk to a VR runtime and render stuff (as well as getting information from the device) and a Device Layer used by HMDs manufacturers (or hundred devices as you say) so that VR runtimes can talk to any OpenXR compliant devices. This will help for example SteamVR or Oculus Runtime to be compatible with the gazillions of devices flooding the market at some point provided the later are compliant with OpenXR.

But OpenXR is 2018 material so indeed OpenVR is probably a good bet for immediate support. Please note that SteamVR allows you to use Oculus Rift HMD not just HTC Vive so in theory (but I haven’t tried it with OpenVR) you shouldn’t need a dedicated backend for Oculus.


BR


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebVR on WebKit

Sergio Villar Senin
O Xov, 03-08-2017 ás 10:56 -0700, Alexis Menard escribiu:

> Hi,
>
> > On Aug 3, 2017, at 9:19 AM, Sergio Villar Senin <[hidden email]
> > > wrote:
> >
> > O Xov, 03-08-2017 ás 08:44 -0700, Alexis Menard escribiu:
> > > Hi,
> > >
> > > > On Aug 3, 2017, at 7:52 AM, Dean Jackson <[hidden email]>
> > > > wrote:
> > > >
> > > >
> > > >
> > > > > On 2 Aug 2017, at 19:55, Sergio Villar Senin <svillar@igalia.
> > > > > com>
> > > > > wrote:
> > > > >
> > > > >
> > > > > Our main interest is to eventually have some implementation
> > > > > working on
> > > > > WebKitGtk and/or WPE on Linux but obviously there is a lot of
> > > > > cross-
> > > > > platform work that needs to be done as well. Our initial idea
> > > > > would be
> > > > > to use the OpenVR API as Valve released a Linux version of
> > > > > their
> > > > > SDK
> > > > > some months ago. Looks like a safe bet as other vendors like
> > > > > Firefox or
> > > > > Chromium already include it in their trees as third party.
> > > >
> > > > I agree with the idea to assume use of the OpenVR SDK at the
> > > > moment. It
> > > > is the only major VR SDK that is available for macOS, Linux and
> > > > Windows.
> > > >
> > > > So maybe our platform API should be very similar to the OpenVR
> > > > API?
> > > > I haven't looked at other SDKs like Oculus, but hopefully it
> > > > isn't
> > > > too
> > > > different.
> > >
> > > You should also keep an eye on OpenXR which is being discussed in
> > > Khronos. These seems like the future standard API for
> > > applications to
> > > hook into to support VR (independently of the underlaying VR
> > > runtime). More info there : https://www.khronos.org/openxr
> >
> > Right I'm aware of that effort. The thing is that using OpenXR does
> > not
> > imply that you can get rid of native SDKs anyway. From
> > conversations I
> > had with some other people involved in WebVR efforts it looks like
> > the
> > main SDKs (like Oculus or Vive's) will be used anyway if available
> > and
> > that OpenXR would be more like a fallback for the hundreds of
> > devices
> > that will hit the market soon.
>
> That’s correct that native VR runtimes will still be a requirements
> but they are going to be under the OpenXR application layer (read
> Oculus and Steam will most likely make their runtime OpenXR
> compliant). The benefits of OpenXR for WebKit (or any engine) is that
> you’ll have a unique backend to talk to a VR runtime (whatever the
> user has installed).

That's clear, having a unified interface for VR is something that was
never there and one of the reasons why the market has been always that
fragmented.

> Please note that OpenXR is two folds, an application interface/API
> for applications (say in this case WebKit) to talk to a VR runtime
> and render stuff (as well as getting information from the device) and
> a Device Layer used by HMDs manufacturers (or hundred devices as you
> say) so that VR runtimes can talk to any OpenXR compliant devices.
> This will help for example SteamVR or Oculus Runtime to be compatible
> with the gazillions of devices flooding the market at some point
> provided the later are compliant with OpenXR.

Right, let's hope that those two extra layers wouldn't cause any
significant performance issue, something that is still not clear IMO.

> But OpenXR is 2018 material so indeed OpenVR is probably a good bet
> for immediate support. Please note that SteamVR allows you to use
> Oculus Rift HMD not just HTC Vive so in theory (but I haven’t tried
> it with OpenVR) you shouldn’t need a dedicated backend for Oculus.

That supports my point, but that's only for Windows (as it requires
Oculus SDK if I am not wrong), isn't it? In any case, from the WebKit's
POV, OpenVR must not be a requirement, it is just one of the potential
platform libs and we'd have to design some platform API anyway. Should
we base it on OpenVR is something that could be changed in the future
to make it more friendly for other backends (like OpenXR). After all,
all the SDKs share more or less the same concepts.

BR
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Loading...