[x3d-public] OrthoViewpoint fieldOfView - and display size

Andreas Plesch andreasplesch at gmail.com
Sat May 26 11:46:01 PDT 2018


On Sat, May 26, 2018 at 1:39 PM, Andreas Plesch <andreasplesch at gmail.com> wrote:
> Hi Don,
>
> On Fri, May 25, 2018 at 8:30 PM, Don Brutzman <brutzman at nps.edu> wrote:
>> Succinct response to good analysis:  it seems like we can achieve:
>>
>> a. a singular consistent 1-tuple definition for fieldOfView field in
>> Viewpoint, GeoViewpoint (and likely X3DViewpointNode).
>
> No change may be needed.
>
>> b. a separate additional definition for OrthoViewpoint functionality that
>> maximizes consistency with existing fields (i.e. unchanged view direction)
>> and maps well to OpenGL/HTML5/SVG.
>>
>> The Mozilla functions are certainly interesting.  For maximum
>> interoperability of scene content, we should be looking most closely at:
>>
>> c. best consistency forOpenGL/HTML5/SVG specifications themselves, and
>
> The MDN pages link to the SVG spec.:
> https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
> https://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute
> There are helpful figures and a lot of prose.
>
>> d. best ability to X3D authors to control viewing area, either using native
>> X3D or hybrid HTML5/X3D.
>
> I can see that it is useful to query the pixel dimensions of the
> viewport from inside a X3D scene. But to allow a X3D scene to control
> and modify the x3d browser window or element size, or fullscreen mode,
> is a more sensitive matter since it shifts control away from the user.
> For example, web browser now require a 'user gesture' before allowing
> a web page (app) to go fullscreen or display on another screen like a
> headset for VR.
>
> For x_ite and x3dom it is already possible/straightforward via hybrid
> HTML5/X3D to query and modify the size of the 3d canvas element which
> is used as a X3D rendering surface.
>
>> Plus perhaps one more thing:  looking ahead with X3D v4.1 in mind, look at
>> how
>>
>> e. draft WebVR specification addresses aspect ration and screen pixel
>> dimensions.
>
> Ok. Let's take a look. My guess is that WebXR only tries to make all
> necessary information available to an webgl author and then keeps the
> responsibility to render in a satisfactory manner on multiple devices
> on the author/app.

WebXR allows and regulates access to a VR/XR device from a web page. A
web page can request access to a VR device and establish a session.

https://immersive-web.github.io/webxr/#xrsession-interface

The session has the rendering layer:

https://immersive-web.github.io/webxr/#xrwebgllayer-interface

It includes relevant size information. But the spec.seems too
incomplete to distill something here, at least for me.

My overall impression is that WebXR is mostly concerned about
providing expected rendering resolution width x height to ensure good
performance. The only but strong recommendation is to use a device
specific and api provided projection matrix. It likely takes into
account the device aspect ratio and would be a perspective projection,
and never(?) orthographic. There is also a viewport compatible with
webgl (and perhaps OpenGL) viewports.

Andreas

> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list