<div dir="ltr"><div dir="ltr">Thanks, Michalis, for the quick confirmation. Should we use X3D v4.0 to change the undesired behavior ? v4.0 allows for backward incompatiblity.</div><div dir="ltr"><br></div><div>If the issue is not significant enough to break backward compatibility, there should be a sentence explaining the issue: "Control points are provided as homogeneous coordinates, eg. multiplied by their corresponding weights." or something like that.</div><div><br></div><div>I can provide a spec comment if that is helpful, eg. if Michalis did not already provide one.</div><div><br></div><div>Cheers, -Andreas</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 19, 2020 at 9:50 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</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">See the documentation about this issue on Castle Game Engine:<br>
<a href="https://castle-engine.io/x3d_implementation_nurbs.php#section_homogeneous_coordinates" rel="noreferrer" target="_blank">https://castle-engine.io/x3d_implementation_nurbs.php#section_homogeneous_coordinates</a><br>
<br>
As far as I tested, all X3D browsers require points to be<br>
"premultiplied by the given weight". Which is confusing and contrary<br>
to how NURBS are usually expressed (it makes the operation<br>
"intuitively pull the curve toward the control point" harder than it<br>
should be, see my docs above), but that's how it is. View3dscene /<br>
Castle Game Engine follow it.<br>
<br>
I have some simple tests of NURBS in<br>
<a href="https://github.com/castle-engine/demo-models/tree/master/nurbs" rel="noreferrer" target="_blank">https://github.com/castle-engine/demo-models/tree/master/nurbs</a> .<br>
<br>
Regards,<br>
Michalis<br>
<br>
wt., 19 maj 2020 o 15:28 Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> napisał(a):<br>
><br>
> We came across a specification issue for Nurbs. It is unclear if provided control points should be provided<br>
><br>
> A) already weighted, eg. premultiplied by the given weight, or<br>
> B) if the browser, eg. the evaluation of the Nurbs should do the weighting, eg. the multiplication of each control point with the corresponding weight.<br>
><br>
> At first glance, since the weights are provided separately, one would think the control points should be provided unweighted, eg. B). This is also how OpenCascade or Blender specify control points (<a href="https://docs.blender.org/manual/en/latest/modeling/surfaces/structure.html" rel="noreferrer" target="_blank">https://docs.blender.org/manual/en/latest/modeling/surfaces/structure.html</a>).<br>
><br>
> But tests using a torus Nurbs reveal all freeWrl, view3dscene and InstandPlayer expect premultiplied control points (case A). This is surprising but there may be a reason for that consistency. Perhaps a commonly used formula ?<br>
><br>
> The spec. itself is silent on this.<br>
><br>
> A) requires confusing redundancy, since the weight field is still needed for normalizing the weighted sum.<br>
><br>
> I would prefer B).<br>
><br>
> There are no examples which use important weights, for testing. The github issue below has the torus example.<br>
><br>
> If A) is the consensus, the spec. needs to point out that control points are expected to be already weighted.<br>
><br>
> Here is the related discussion:<br>
> <a href="https://github.com/x3dom/x3dom/issues/1059" rel="noreferrer" target="_blank">https://github.com/x3dom/x3dom/issues/1059</a><br>
> <a href="https://github.com/andreasplesch/OCCToX3D/issues/8" rel="noreferrer" target="_blank">https://github.com/andreasplesch/OCCToX3D/issues/8</a><br>
><br>
><br>
>  -Andreas<br>
><br>
> --<br>
> Andreas Plesch<br>
> Waltham, MA 02453<br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>