[x3d-public] OrthoViewpoint fieldOfView - and display size

Andreas Plesch andreasplesch at gmail.com
Tue May 22 12:48:19 PDT 2018


Hi Don,

I can not take any credit for the example, it is all Michalis' .

x3dom does not center the example, as it ignores any translation
component in the fieldOfView resulting from asymmetry in the
parameters around 0,0 .

For symmetric fieldOfView values, which may be more typical, browsers
probably behave more consistently.

I believe the underlying reason for x3dom to just consider width and
height (deltas) is that translation is expected by users to occur in
the position field, and that therefore additional offsets would be
somewhat confusing. Perhaps people started to use (0, 0, width,
height) since the parameters are not really defined in the spec.

Centering is also something which does not occur with the regular
Viewpoint fieldOfView value.

So I would still favor just two parameters (width, height) as
fieldOfView if it were not for keeping backwards compatibility. Once
could also argue that it is easy to just always use symmetric values.

Another example should probably test default values, and another one
position/translation component combos. The NIST Conformance scenes are
really well designed and are good templates.

Let's what viewpoint features are tested, for inspiration.

-Andreas

On Tue, May 22, 2018 at 3:21 PM, Don Brutzman <brutzman at nps.edu> wrote:
> There are also inconsistent display results when testing the baseline
> scene's default view on different X3D browsers.  Some are centered, some are
> not.
>
> We have no scenes in the X3D Examples to test OrthoViewpoint.  That probably
> is a contributor to inconsistency problems.
>
> Wondering if we might add one or more scenes designed for conformance
> testing, to encourage consistency.
>
> The logical location, and design patterns for success, can be found in the
> NIST Conformance Suite examples.  More work but higher potential value.
> Exemplar:
>
>         X3D Example Archives: Conformance Nist, Bindable Nodes, Viewpoint
>
> http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint
>
> Anyone interested in tackling this?
>
> Thanks for sharing your current example Andreas.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN"
> "http://www.web3d.org/specifications/x3d-3.3.dtd">
> <X3D profile='Full' version='3.3'
> xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
> xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
>   <Scene>
>     <OrthoViewpoint fieldOfView='-1 -1 4 4' description='default' />
>     <!--
>     # since Box centers are between (0, 0 - 3, 3), and Box sizes are (2, 2,
> 2),
>     # so below field of view should force the browser to *exactly* align
>     # window borders so they match Boxes borders (in the shorter axis,
>     # usually vertical; in the other axis you will see slightly more)
>     -->
>     <OrthoViewpoint fieldOfView='-1 -2 4 5' description='taller' />
>     <Shape DEF='S'>
>       <Appearance>
>         <Material diffuseColor='1 1 0' />
>       </Appearance>
>       <Box />
>     </Shape>
>     <Transform translation='3 0 0'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='0 3 0'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='3 3 0'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='0 0 -3'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='3 0 -3'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='0 3 -3'>
>       <Shape USE='S' />
>     </Transform>
>     <Transform translation='3 3 -3'>
>       <Shape USE='S' />
>     </Transform>
>   </Scene>
> </X3D>
>
>
>
>
> On 5/20/2018 1:48 PM, Andreas Plesch wrote:
>>
>> On Mon, May 7, 2018 at 2:49 PM, Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>>
>>> On Mon, May 7, 2018 at 1:28 AM, Don Brutzman <brutzman at nps.edu> wrote:
>>>>
>>>> Thanks for multiple helpful postings on this topic.  Offhand I'm not
>>>> remembering special rationale involved.  Good question for CAD experts
>>>> where
>>>> OrthoViewpoint view is more commonly used.
>>>
>>>
>>> ..
>>> Another aspect which I am not quite clear about is navigation from a
>>> Orthoviewpoint, along the viewing direction. Strictly speaking,
>>> orthographic projection would mean no zooming during such navigation.
>>> The zoom is only defined by the fieldOfView. However, the user
>>> expectation would be zooming during such navigation which then leads
>>> to some interaction between location and field of view. I should test
>>> how browsers behave but any insight would be much appreciated.
>>
>>
>> Using as a test for navigation along the viewing direction:
>>
>>
>> https://github.com/castle-engine/demo-models/blob/master/navigation/ortho_viewpoint.x3dv
>>
>> https://raw.githubusercontent.com/andreasplesch/Library/master/Tests/Components/Navigation/ortho_viewpoint.x3d
>>
>> no zooming when navigating along viewing direction:
>>
>> - x_ite
>> - view3dscene
>> - InstantPlayer
>> - freeWRL
>> - octaga
>> - h3dviewer
>>
>> zooming:
>>
>> - x3dom
>>
>> na:
>>
>> - BSContact
>>
>> The majority of browsers applies the orthographic projection such that
>> only the fieldOfView controls the 'zoom' level and the distance of the
>> viewpoint to any object is irrelevant. This is strict and a bit
>> counter-intuitive but probably does not need any clarification in the
>> prose.
>>
>> -Andreas
>
>
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
>



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list