<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Michalis, very helpful.  Have added this to Mantis 1310.<br>
<br>
* Mantis 1310: near, far clipping planes indirectly specified by NavigationInfo, consider addition to X3DViewpointNode<br>
   <a href="https://www.web3d.org/member-only/mantis/view.php?id=1310" rel="noreferrer" target="_blank">https://www.web3d.org/member-only/mantis/view.php?id=1310</a><br>
<br>
So far so good, however: practice has shown an important use case that is difficult to handle: shifting between local views and faraway (e.g. terrain-oriented) views.<br>
<br>
... so we might consider the ability to override these values in a Viewpoint, since they are typically needed when shifting between such views.<br>
<br>
Suggested specification addition:<br>
<br>
23.3.1 X3DViewpointNode<br>
<a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/navigation.html#X3DViewpointNode" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/navigation.html#X3DViewpointNode</a><br>
<br>
Viewpoint : X3DViewpointNode {<br>
  SFFloat    [in,out] nearClippingPlane -1     -1 or [0,infinity)<br>
  SFFloat    [in,out]  farClippingPlane -1     -1 or [0,infinity)<br>
}<br>
<br>
"If specified and non-negative, the values specified for nearClippingPlane and farClippingPlane define the near and far clipping plane distances when the X3DViewpointNode is bound.  Otherwise these values are defined by the bound NavigationInfo node, including when the X3DViewpointNode is unbound."<br>
<br>
Hopefully this strikes a good balance... X3D3 defaults are maintained, and X3D4 authors have more straightforward options.<br>
<br></blockquote><div><br></div><div>Sure, I can see the use-case. <br></div><div><br></div><div>However, 2 notes:</div><div><br></div><div>1. Clarify what happens when one value is -1, the other is not. E.g.  nearClippingPlane is 10, farClippingPlane is -1.</div><div><br></div><div>    The intention is (I guess) that X3DViewpointNode then determines nearClippingPlane, but NavigationInfo still determines the far clipping plane (if NavigationInfo.visibilityLimit is non-zero, otherwise browser calculates it). So maybe add a prose that says it, like this:</div><div><br></div><div>    """It is allowed that only one of these values is non-negative (e.g. nearClippingPlane is 10, farClippingPlane is -1). In this case the non-negative value from X3DViewportNode shall be used for one clipping plane, while the other clipping plane is still determined using bound NavigationInfo."""<br></div><br><div>2. The ranges "[0,infinity)" do not reflect the actual requirements perfectly. Although you cannot make them perfect with this design (you need some special value to indicate "let this be determined by NavigationInfo"), and because X3DViewpointNode is an ancestor for both Viewpoint and OrthoViewpoint and their math has different requirements.</div><div><br></div><div>    So, possibly no change is necessary. But I just wanted to mention the actual  limits:<br></div><div><br></div><div>    - For perspective viewpoints, both nearClippingPlane and farClippingPlane must be > 0, never equal to zero. So the range would be "-1 or (0,infinity)" .</div><div><br></div><div>    - For orthographic viewpoints, actually any values (including zero and negative) are possible and make sense. CGE allows it (<a href="https://castle-engine.io/apidoc-unstable/html/CastleCameras.TCastleCamera.html#ProjectionNear">https://castle-engine.io/apidoc-unstable/html/CastleCameras.TCastleCamera.html#ProjectionNear</a> ). That said, I guess the specification can limit them to be >= 0 for simplicity, otherwise you would have a problem with how to indicate "leave as default".</div><div><br></div><div>Regards,</div><div>Michalis<br></div></div></div>