<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:32197199;
        mso-list-type:hybrid;
        mso-list-template-ids:-654041304 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1
        {mso-list-id:2124182653;
        mso-list-type:hybrid;
        mso-list-template-ids:1482205242 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo2'>Hm, perhaps<o:p></o:p></li></ul><p class=MsoNormal>it makes sense to add next and previous fields to interpolators which<o:p></o:p></p><p class=MsoNormal>would step through intervals.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sure, repeat this sequence three times, then proceed. </p><p class=MsoNormal>Already do that with keys generated by script. </p><p class=MsoNormal>Thanks,</p><p class=MsoNormal>Joe. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Tuesday, June 27, 2023 7:32 AM<br><b>To: </b><a href="mailto:michalis.kambi@gmail.com">Michalis Kamburelis</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:joedwil@earthlink.net">Joseph D Williams</a><br><b>Subject: </b>Re: [x3d-public] Blender > Exporting rig transforms to HAnim?</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi Michalis,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Ok, let me work on adding a STEP interpolation mode to interpolators.</p><p class=MsoNormal>Do you want to raise a spec. improvement suggestion ?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>As  a side note, STEP mode is also related to x3d sequencers. A</p><p class=MsoNormal>ScalarInterpolator in STEP mode would be equivalent to a hypothetical</p><p class=MsoNormal>ScalarSequencer, except for the next and previous fields. Hm, perhaps</p><p class=MsoNormal>it makes sense to add next and previous fields to interpolators which</p><p class=MsoNormal>would step through intervals.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The CUBICSPLINE algorithm for glTF is fairly well documented as far as</p><p class=MsoNormal>I remember. Feel free of course to look up the implementation in</p><p class=MsoNormal>x3dom.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>It is worth noting that the existing SplineInterpolator nodes only</p><p class=MsoNormal>allow for one (central) tangent per key and key value, whereas the</p><p class=MsoNormal>common cubic spline algorithm allows for two tangents (in, and out)</p><p class=MsoNormal>per key and key value. Those mathematically inclined may be able to</p><p class=MsoNormal>show that the x3d algorithm for spline interpolations is equivalent to</p><p class=MsoNormal>the cubic spline algorithm with identical in and out tangents.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>x3dom just mirrors glTF in that inTangent, value, outTangent occur in</p><p class=MsoNormal>triplets in the MF keyValue field. An alternative interface would</p><p class=MsoNormal>introduce keyInTangent and keyOutTangent fields which then would</p><p class=MsoNormal>require sensible default values. Not sure.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Some thoughts, Andreas</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>PS:</p><p class=MsoNormal>A StringSequencer would be useful as a mechanism to store and select</p><p class=MsoNormal>alternative string values for display in Text nodes. I think the</p><p class=MsoNormal>current strategy is to use an IntegerSequencer to select from Shapes</p><p class=MsoNormal>in a Switch. A MFStringSequencer would be more concise and convenient.</p><p class=MsoNormal>Hm, similarly there could be a StringTrigger event utility.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On Tue, Jun 27, 2023 at 8:18 AM Michalis Kamburelis</p><p class=MsoNormal><michalis.kambi@gmail.com> wrote:</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Indeed glTF has additional interpolation options, and I think it would</p><p class=MsoNormal>> make sense to add them to X3D.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Looks like X3DOM and view3dscene/Castle Game Engine go in this</p><p class=MsoNormal>> direction already :)</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> 1. X3DOM has SFString "interpolation" field, default "LINEAR", see</p><p class=MsoNormal>> https://doc.x3dom.org/author/Interpolation/X3DInterpolatorNode.html .</p><p class=MsoNormal>> Andreas above explained how it supports "CUBICSPLINE" option.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> 2. view3dscene / Castle Game Engine allow to use "STEP" interpolation</p><p class=MsoNormal>> explicitly.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     For this, we add such field:</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     SFString [in,out]   interpolation  "LINEAR" # range: ["LINEAR"|"STEP"]</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     .. to all X3DInterpolatorNode descendants (so, all interpolator</p><p class=MsoNormal>> nodes). This seems exactly like X3DOM, we just added "STEP", where</p><p class=MsoNormal>> X3DOM added "CUBICSPLINE". In the end we should probably have all</p><p class=MsoNormal>> ["LINEAR"|"STEP"|"CUBICSPLINE"].</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> 3. Note that even without this field, with default linear</p><p class=MsoNormal>> interpolation, it was possible to have effectively step interpolation,</p><p class=MsoNormal>> as Andreas mentions. You can just duplicate keys in the middle, like</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     key [0 0.33 0.33 0.66 0.66]</p><p class=MsoNormal>>     keyValue [10 10 20 20 30 30]</p><p class=MsoNormal>>     # interpolation "LINEAR"</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     This is valid with X3D ("""keys shall be monotonically</p><p class=MsoNormal>> non-decreasing""" according to spec).</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     It is equivalent to</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     key [0 0.33 0.66]</p><p class=MsoNormal>>     keyValue [10 20 30]</p><p class=MsoNormal>>     interpolation "STEP"</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     Using explicit "STEP" is slightly better, as you need 50% less</p><p class=MsoNormal>> memory to store it, less computation (no need to do lerp or detect</p><p class=MsoNormal>> this special case to optimize), and seems just simpler for authors --</p><p class=MsoNormal>> it specifies intention explicitly, which makes sense, also if one</p><p class=MsoNormal>> hopes a round-trip e.g. import to Blender and export to Blender.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     Having such additional interpolation options seems common, glTF</p><p class=MsoNormal>> and Blender too have them (</p><p class=MsoNormal>> https://docs.blender.org/manual/en/latest/editors/graph_editor/fcurves/properties.html#editors-graph-fcurves-settings-interpolation</p><p class=MsoNormal>> ).</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> 4. Note that view3dscene / Castle Game Engine do not support</p><p class=MsoNormal>> "CUBICSPLINE" interpolation yet, but we plan to.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>>     For now we support curve interpolation by adding extra</p><p class=MsoNormal>> intermediate keys to the linear interpolation -- so, we have</p><p class=MsoNormal>> needlessly more keys / key values. But this is only a temporary</p><p class=MsoNormal>> solution, we want to support "CUBICSPLINE" properly, like X3DOM.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Regards,</p><p class=MsoNormal>> Michalis</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> niedz., 25 cze 2023 o 05:33 Andreas Plesch <andreasplesch@gmail.com> napisał(a):</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > > Date: Sat, 24 Jun 2023 10:11:03 -0700</p><p class=MsoNormal>> > > From: Joseph D Williams <joedwil@earthlink.net></p><p class=MsoNormal>> > > To: Michalis Kamburelis <michalis.kambi@gmail.com></p><p class=MsoNormal>> > > Cc: GPU Group <gpugroup@gmail.com>,  X3D Graphics public mailing list</p><p class=MsoNormal>> > >         <x3d-public@web3d.org></p><p class=MsoNormal>> > > Subject: Re: [x3d-public] Blender > Exporting rig transforms to HAnim?</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > > Which shows that yes, you have a list of the key times that just have to be ascending. Default is  linear interpolation between keyvalues. Now new to me, I like the STEP option where value not interpolated but stays the same until next keyvalue change. For that effect, gltf makes it easier. I want that STEP option in x3d! And then there is also the cubic spline with specified tangents. Me want that one too.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > In order to support glTF x3dom added a CUBICSPLINE with tangents</p><p class=MsoNormal>> > option to interpolators, in the same form as glTF, eg. three values</p><p class=MsoNormal>> > (in tangent, value, out tangent) per key. Parallel to glTF x3dom</p><p class=MsoNormal>> > interpolators have a "interpolation" SFString field which can have</p><p class=MsoNormal>> > "LINEAR" and "CUBICSPLINE" values. I suspect due to glTF support other</p><p class=MsoNormal>> > viewers also already do something like that and could expose such a</p><p class=MsoNormal>> > mode to regular X3D.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > A STEP option is already elegantly solved by X3D with duplicate keys</p><p class=MsoNormal>> > with different values in series. That allows mixing step wise and</p><p class=MsoNormal>> > linear interpolation in one animation. x3dom just translates glTF STEP</p><p class=MsoNormal>> > to that format which is very straightforward. A dedicated STEP option</p><p class=MsoNormal>> > would be 50% more efficient in storage but I am not sure if this is</p><p class=MsoNormal>> > enough of a benefit to justify duplication of existing functionality.</p><p class=MsoNormal>> > It may not or it may as x3dom already does it internally for glTF. It</p><p class=MsoNormal>> > would be possible to add to x3d as well but perhaps not necessary.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > Andreas</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > _______________________________________________</p><p class=MsoNormal>> > x3d-public mailing list</p><p class=MsoNormal>> > x3d-public@web3d.org</p><p class=MsoNormal>> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-- </p><p class=MsoNormal>Andreas Plesch</p><p class=MsoNormal>Waltham, MA 02453</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>