[X3D-Public] Question about InstantReality and X3DOM OrthoViewpoint.zNear/zFar

Michalis Kamburelis michalis.kambi at gmail.com
Sun Nov 16 11:25:31 PST 2014


I would like to better understand how InstantReality and X3DOM interpret
the OrthoViewpoint.zNear/zFar fields. These fields are extensions, not
present in the X3D standard. I ask here, on x3d-public, as the questions
deal also with difference between InstantReality and X3DOM documentation
(so I don't know on which specific forum to ask), and also since they
may be useful for other X3D browser implementors (I know they will be
useful for me, for instance :).

Possibly there are some errors in docs, so I prefer to ask, instead of
"just trying", to know what is the intended result, by the
InstantReality/X3DOM developers :)

My questions arise from the fact that 1. default definitions between
standard InstantPlayer and X3DOM are different (weird since it's the
same company), and 2. it's not obvious for me how they interact with
other X3D features.

Still, these extensions seem like something I want to implement in
view3dscene and Castle Game Engine too. I was actually googling around
the idea and found InstantReality and X3DOM extensions.

For reference: The documentation for InstantReality is on
http://doc.instantreality.org/documentation/nodetype/OrthoViewpoint/ ,
and for X3DOM it is on
http://doc.x3dom.org/author/Navigation/OrthoViewpoint.html .

Ok, my questions:

1. First of all, what is the default value for zNear and zFar? Because
shows "zNear = -1, zFar = 1" while
http://doc.x3dom.org/author/Navigation/OrthoViewpoint.html shows "zNear
= 1, zFar = 10000" .

2. How exactly does these extensions interact with existing (standard)
X3D features of NavigationInfo:

2.1. What about standard X3D NavigationInfo.visibilityLimit, that is the
standard way to define "zFar" in X3D (regardless of orthographic or
perspective view)? What happens if I define
NavigationInfo.visibilityLimit != 0, and I also use OrthoViewpoint? Does
OrthoViewpoint.zFar take precedence (and so, visibilityLimit is ignored
when OrthoViewpoint is used)? Or does visibilityLimit override
OrthoViewpoint.zFar when visibilityLimit is <> 0?

2.2. What about NavigationInfo.avatarSize[0], that is the collision
distance, and implicitly defines the "zNear" as around "0.5 *

Although the X3D spec doesn't require it, it suggests to calculate near
plane like this, see the last paragraph "It is recommended that the near
clipping plane be set to one-half of the collision radius as specified
in the avatarSize field..." on
. At least view3dscene follows it, placing near plane at 0.6 *
avatarSize[0]. (The reasons for using 0.6 instead of 0.5 are historic...).

The X3D specification was seemingly written with perspective projection
in mind. For orthogonal projection, it is useful to set near plane at
negative distance, which is not sensibly possible using
NavigationInfo.avatarSize[0] . So, we should fix X3D spec, but how?

So, how does NavigationInfo.avatarSize[0] affect near plane in
InstantReality/X3DOM when OrthoViewpoint is used? Does the
OrthoViewpoint.zNear just dictate near plane distance, ignoring the
NavigationInfo.avatarSize[0] value?

Thank you in advance for the answers!

More information about the X3D-Public mailing list