[x3d-public] STEP interpolation, was Blender > Exporting rig transforms to HAnim?

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Tue Jul 18 20:41:11 PDT 2023


Good question, thanks Andreas.

In general, the specification defines what is required and avoids posing other conditions in order to minimize performance impacts.  So I think the tooltip is OK, and a browser could defend either sending or not sending 'false' events that have no effect.

I think that authors are wise to focus on cause and effect, rather than non-causal events with no effect (cough cough!)

Dick might have a different POV about this.  In any case, optional nonfunctional activity seems like optional prose...

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 https://faculty.nps.edu/brutzman

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas Plesch
Sent: Tuesday, July 18, 2023 11:20 AM
To: Joseph D Williams <joedwil at earthlink.net>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] STEP interpolation, was Blender > Exporting rig transforms to HAnim?

I also cannot think of a situation where an additional event without changes is definitely needed, and I would prefer not to change any behaviours.

The spec. seems to require sending an event every time:

'The set_fraction inputOnly field receives an SFFloat event and causes the interpolator node function to evaluate, resulting in a value_changed output event of the specified type with the same timestamp as the set_fraction event.'

However, the tool-tips warn:
Hint: X3D players might not send unchanging intermediate values, thus avoiding excessive superfluous events that have no effect.

Should this language become part of the spec. ? "Browsers may choose not to generate output events for unchanging intermediate values."

-Andreas

On Tue, Jul 18, 2023 at 2:28 AM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> Two ways to code this:
>
>
>
>     <BooleanSequencer DEF='Background3Sequencer'
>
> key='0 0.09 0.11 0.22 0.43 0.55 0.63 0.73 0.85 0.86 1'
>
> keyValue='true true true false false false false false false false 
> true'/>
>
>
>
>     <BooleanSequencer DEF='Background1Sequencer'
>
> key='0 0.22 1'
>
> keyValue='true false true'/>
>
>
>
> Both would produce the same number of value_changed events.
>
>
>
> There is only an event out with a new timestamp if the new value has 
> changed compared to the last value.
>
>
>
> I don’t think I need a new out event at each keytime. Only if the 
> value_changed is actually changed. I might code the first version 
> thinking that I would get an event at each keytime, regardless. I try 
> to think of some situation where I definitely want an event at each 
> keytime, regardless if out has changed or not. If I need that, I 
> shouldn’t need to depend on this or any interpolator node
>
>
>
> Thanks and Best,
>
> Joe
>
>
>
>
>
>
>
> From: Andreas Plesch
> Sent: Monday, July 17, 2023 7:32 PM
> To: Joseph D Williams
> Cc: Michalis Kamburelis; X3D Graphics public mailing list
> Subject: Re: STEP interpolation, was Blender > Exporting rig transforms to HAnim?
>
>
>
> The way STEP works currently is the same as regular LINEAR
>
> interpolation. There is only an event out with a new timestamp if the
>
> new value has changed compared to the last value. So with STEP there
>
> are only a few events per cycle. Would that work for you?
>
>
>
> In the case of two subsequent, identical keyValues, there is no event
>
> when the second interval is entered. So an alternative may be to emit
>
> an event in this case even if the value did not change. It may be
>
> helpful in some cases and should not affect too much existing
>
> behaviours.
>
>
>
> Andreas
>
>
>
> On Mon, Jul 17, 2023 at 9:59 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> >
>
> > I like this and interesting how this works relative to another type of step node, the BooleanSequencer. For any initial  state, I expect that the keyvalue will be set at the keytime, remain in that readable state until the next keytime, when the next keyvalue will out.
>
> >
>
> > As expected, the keyvalue has the same time stamp as the keytime event in.
>
> >
>
> >
>
> >
>
> > <X3D profile='Immersive' version='3.3' 
> > xmlns:xsd='https://nam10.safelinks.protection.outlook.com/?url=http%
> > 3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C01%7Cbrutzm
> > an%40nps.edu%7C86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740ea91
> > 99f7578963378e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZsb3d8
> > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7
> > C2000%7C%7C%7C&sdata=YOOlcHEgtrx1%2Fj1YgFXzgZ0Kwo8WSaf5hxVVfkUqx%2Fg
> > %3D&reserved=0' 
> > xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x
> > 3d-3.3.xsd'>
>
> >
>
> >   <head>
>
> >
>
> >     <meta content='background4.x3d' name='title'/>
>
> >
>
> >   </head>
>
> >
>
> >   <Scene>
>
> >
>
> >     <WorldInfo title='background5.x3d'/>
>
> >
>
> >     <Viewpoint DEF='EntryView1' description='Hello character' 
> > position='0 2 10'/>
>
> >
>
> >
>
> >
>
> >     <Background DEF='Background1' skyColor='0 0 0'/>
>
> >
>
> >     <Background DEF='Background2'
>
> >
>
> >       groundAngle='1.57' groundColor='0.3 0.6 0   0.7 1 0.5'
>
> >
>
> >       skyColor='0 0.71 0.88'/>
>
> >
>
> >     <Background DEF='Background3'
>
> >
>
> >       groundAngle='1.57' groundColor='0.9 0.39  0.6 0.2 1 0.5'
>
> >
>
> >       skyColor='0.82 0.82 0.82'/>
>
> >
>
> >     <Background DEF='Background4' skyColor='0.6 0.6 0.6'/>
>
> >
>
> >
>
> >
>
> >     <!-- Animation controls -->
>
> >
>
> >     <TimeSensor DEF='Clock10Seconds' cycleInterval='10' 
> > loop='true'/>
>
> >
>
> >
>
> >
>
> >     <BooleanSequencer DEF='Background1Sequencer'
>
> >
>
> > key='0 0.11 1'
>
> >
>
> > keyValue='true false true'/>
>
> >
>
> >     <BooleanSequencer DEF='Background2Sequencer'
>
> >
>
> > key='0 0.11 0.55 1'
>
> >
>
> > keyValue='false true false false'/>
>
> >
>
> >     <BooleanSequencer DEF='Background3Sequencer'
>
> >
>
> > key='0 0.55 0.85 1'
>
> >
>
> > keyValue='false true false false'/>
>
> >
>
> >     <BooleanSequencer DEF='Background4Sequencer'
>
> >
>
> > key='0 0.85 1'
>
> >
>
> > keyValue='false true false'/>
>
> >
>
> >
>
> >
>
> > <ROUTE fromField='value_changed' fromNode='Background1Sequencer'
>
> >
>
> >  toField='set_bind' toNode='Background1'/>
>
> >
>
> > <ROUTE fromField='value_changed' fromNode='Background2Sequencer'
>
> >
>
> >  toField='set_bind' toNode='Background2'/>
>
> >
>
> > <ROUTE fromField='value_changed' fromNode='Background3Sequencer'
>
> >
>
> >  toField='set_bind' toNode='Background3'/>
>
> >
>
> > <ROUTE fromField='value_changed' fromNode='Background4Sequencer'
>
> >
>
> >  toField='set_bind' toNode='Background4'/>
>
> >
>
> >
>
> >
>
> > <ROUTE fromField='fraction_changed' fromNode='Clock10Seconds'
>
> >
>
> >  toField='set_fraction' toNode='Background1Sequencer'/>
>
> >
>
> > <ROUTE fromField='fraction_changed' fromNode='Clock10Seconds'
>
> >
>
> >  toField='set_fraction' toNode='Background2Sequencer'/>
>
> >
>
> > <ROUTE fromField='fraction_changed' fromNode='Clock10Seconds'
>
> >
>
> >  toField='set_fraction' toNode='Background3Sequencer'/>
>
> >
>
> > <ROUTE fromField='fraction_changed' fromNode='Clock10Seconds'
>
> >
>
> >  toField='set_fraction' toNode='Background4Sequencer'/>
>
> >
>
> >
>
> >
>
> >   </Scene>
>
> >
>
> > </X3D>
>
> >
>
> >
>
> >
>
> > Thanks and Preserve the Cascade.
>
> >
>
> > Joe
>
> >
>
> >
>
> >
>
> > From: Andreas Plesch
>
> > Sent: Monday, July 17, 2023 8:59 AM
>
> > To: Michalis Kamburelis
>
> > Cc: X3D Graphics public mailing list; Joseph D Williams
>
> > Subject: Re: STEP interpolation, was Blender > Exporting rig transforms to HAnim?
>
> >
>
> >
>
> >
>
> > Hi Michalis,
>
> >
>
> >
>
> >
>
> > On Mon, Jul 17, 2023 at 9:23 AM Michalis Kamburelis
>
> >
>
> > <michalis.kambi at gmail.com> wrote:
>
> >
>
> > >
>
> >
>
> > > > For STEP, I am using the lower value of the interval:
>
> >
>
> > > ...
>
> >
>
> > > > This corresponds to typical x3d interval use, and you may have done the same ?.
>
> >
>
> > >
>
> >
>
> > > Yes, that is indeed what Castle Game Engine / view3dscene is doing too.
>
> >
>
> > >
>
> >
>
> > > If input is between key[n] and key[n+1], then the output of STEP is keyValue[n].
>
> >
>
> >
>
> >
>
> > Super. There are also the edge cases:
>
> >
>
> >
>
> >
>
> > key[exactly at n] => keyValue[n]
>
> >
>
> > key[< nMin] => keyValue[nMin]
>
> >
>
> > key[> nMax] => keyValue[nMax]
>
> >
>
> >
>
> >
>
> > Just to confirm.
>
> >
>
> >
>
> >
>
> > > I started converting your testcase (
>
> >
>
> > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > github.com%2Fandreasplesch%2Fx3dom%2Fblob%2Fstep_interpolator%2Fte
> > > st%2Fregression-suite%2Ftest%2Fcases%2Finterpolators%2Finterpolato
> > > rs.html&data=05%7C01%7Cbrutzman%40nps.edu%7C86a9891fa37c4f2efe2e08
> > > db87bbc998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6382530134
> > > 76543406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM
> > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=OYRC45Lt%2
> > > BIMnj9C40KFsL8hle8AJx86kQamhSbMMbHk%3D&reserved=0
>
> >
>
> > > ) into standalone X3D file. I noticed a few things special to 
> > > X3DOM I
>
> >
>
> > > think (aside from lowercase node / field names, which I understand 
> > > is
>
> >
>
> > > just necessary for HTML5 integration):
>
> >
>
> > >
>
> >
>
> > > - "alphaMode" and "alphaCutoff" specified at "PhysicalMaterial", 
> > > while
>
> >
>
> > > in X3D 4 they are on "Appearance"
>
> >
>
> >
>
> >
>
> > Yes, for historical reasons, because they only apply to PhysicalMaterial.
>
> >
>
> > Appearance has alphaClipThreshold for regular Material in x3dom. 
> > There
>
> >
>
> > was some reason why it was not not reused for PhysicalMaterial 
> > perhaps
>
> >
>
> > due to shader uniforms or subtle usage differences.
>
> >
>
> >
>
> >
>
> > > - "PhysicalMaterial.unlit" boolean, while in X3D 4 we have 
> > > separate
>
> >
>
> > > node "UnlitMaterial" instead
>
> >
>
> > >
>
> >
>
> > > - baseColorFactor -> it is baseColor in X3D 4
>
> >
>
> > >
>
> >
>
> > > - metallicfactor, roughnessfactor -> just metallic, roughness in 
> > > X3D 4
>
> >
>
> >
>
> >
>
> > Will be easy to rename.
>
> >
>
> >
>
> >
>
> > > - diffusefactor, specularfactor, glossinessfactor on 
> > > PhysicalMaterial
>
> >
>
> > > -> in X3D 4 we follow te glTF standard "metallic-roughness" 
> > > -> workflow,
>
> >
>
> > > so there's no no specular / glossinness.
>
> >
>
> >
>
> >
>
> > There used to be specular/glossiness for glTF1. We would probably 
> > just
>
> >
>
> > keep it as there is also an extension.
>
> >
>
> >
>
> >
>
> > > In the end, it was a bit easier to take glTF from
>
> >
>
> > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > github.com%2FKhronosGroup%2FglTF-Sample-Models%2Ftree%2Fmaster%2F2
> > > .0%2FInterpolationTest%2FglTF&data=05%7C01%7Cbrutzman%40nps.edu%7C
> > > 86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740ea9199f7578963378
> > > e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4
> > > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%
> > > 7C%7C&sdata=HbWkQG7tAOC5ttI1v6HyzoqOiAjHVUYwQyGbqrwxw0I%3D&reserve
> > > d=0
>
> >
>
> > > and open it in view3dscene, or convert to X3D from view3dscene. 
> > > But I
>
> >
>
> > > know this is not objective test, sure it was easier this way for 
> > > me to
>
> >
>
> > > just open in CGE/view3dscene :)
>
> >
>
> >
>
> >
>
> > Of course.
>
> >
>
> > x3dom has a different DEF naming convention prefixing with 'glTF_' 
> > and
>
> >
>
> > using the node.name when available but I do not think it is 
> > necessary
>
> >
>
> > to align.
>
> >
>
> > I noticed the $ character in the DEF names but see
>
> >
>
> > https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions:
>
> >
>
> > 'Most restrictive and most interoperable guidance regarding choice 
> > of
>
> >
>
> > characters in names: can start with letter or underscore character,
>
> >
>
> > but not a number or a colon. Can then include letters, numbers,
>
> >
>
> > hyphen, underscore, or period characters. This interoperability is
>
> >
>
> > important so that files can be converted equivalently between
>
> >
>
> > encodings without validation problems.'
>
> >
>
> >
>
> >
>
> > Shapes do not get named
>
> >
>
> >
>
> >
>
> > > Quickly scanning view3dscene output, the one 
> > > CGE/view3dscene-specific
>
> >
>
> > > thing there is "ImageTexture.flipVertically" (we plan to add
>
> >
>
> > > alternative to it, using texture transform for max conformance), 
> > > the
>
> >
>
> > > rest looks standard X3D 4.
>
> >
>
> >
>
> >
>
> > x3dom has boolean flipY which I believe corresponds to an OpenGl flag.
>
> >
>
> > I also noticed the boolean 
> > OrientationInterpolator.keyValueQuaternions
>
> >
>
> > . x3dom converts all rotations from axis-angle to Quaternions during
>
> >
>
> > parsing, so this would save a little bit time there but not during 
> > the
>
> >
>
> > animation. I would assume Euler angles would be a more common format
>
> >
>
> > to accept from modeling software but that might be one step too far.
>
> >
>
> >
>
> >
>
> > Thank you for the nice list which will make it more manageable to work through.
>
> >
>
> >
>
> >
>
> > I found another animation example here:
>
> >
>
> > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> > thub.com%2Fmrdoob%2Fthree.js%2Fpull%2F12907&data=05%7C01%7Cbrutzman%
> > 40nps.edu%7C86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740ea9199f
> > 7578963378e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZsb3d8eyJ
> > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C20
> > 00%7C%7C%7C&sdata=eIRDrLKfpd8LsGunaQFRA3j7MhJaBBnGnBr4W1%2BqR8o%3D&r
> > eserved=0
>
> >
>
> > and uploaded it here:
>
> >
>
> > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> > thub.com%2Fandreasplesch%2FLibrary%2Fblob%2Fgh-pages%2FExamples%2Fgl
> > tf2%2Finterpolation%2FInterpolationComparison.gltf&data=05%7C01%7Cbr
> > utzman%40nps.edu%7C86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740
> > ea9199f7578963378e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZs
> > b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> > 3D%7C2000%7C%7C%7C&sdata=9Tp3UBc8sBP2j0FTH%2Ba8UpygMc%2FhMZIL%2B2Gmr
> > Bq2oIY%3D&reserved=0
>
> >
>
> >
>
> >
>
> > Regards, Andreas
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > >
>
> >
>
> > > Regards,
>
> >
>
> > > Michalis
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > pon., 17 lip 2023 o 07:16 Andreas Plesch <andreasplesch at gmail.com> napisał(a):
>
> >
>
> > > >
>
> >
>
> > > > Hi Michalis,
>
> >
>
> > > >
>
> >
>
> > > > I am putting finishing touches on STEP and CUBICSPLINE interpolation modes.
>
> >
>
> > > >
>
> >
>
> > > > For STEP, I am using the lower value of the interval:
>
> >
>
> > > >
>
> >
>
> > > > key='0 1 2'
>
> >
>
> > > > keyValue='10 11 12'
>
> >
>
> > > >
>
> >
>
> > > > value at key= 0.6 : 10
>
> >
>
> > > > value at key= -0.1 : 10
>
> >
>
> > > > value at key= 2 : 12
>
> >
>
> > > > value at key= 2.1 : 12
>
> >
>
> > > >
>
> >
>
> > > > This corresponds to typical x3d interval use, and you may have done the same ?.
>
> >
>
> > > >
>
> >
>
> > > > I also added CUBICSPLINE to all interpolators except for
>
> >
>
> > > > ColorInterpolator (could be added but seems strange). Doing that 
> > > > I
>
> >
>
> > > > found that for CoordinateInterpolator and NormalInterpolator the
>
> >
>
> > > > layout of keyValues with in and out tangents was most natural 
> > > > this
>
> >
>
> > > > way:
>
> >
>
> > > >
>
> >
>
> > > > keyValue='FrameData1, FrameData2..FrameDataN'
>
> >
>
> > > >
>
> >
>
> > > > where FrameData is the data for a key frame and looks like:
>
> >
>
> > > >
>
> >
>
> > > > [inTangent1, inTangent2 .. inTangentM],
>
> >
>
> > > > [value1, value2 .. valueM],
>
> >
>
> > > > [outTangent1, outTangent2 .. outTangentM]
>
> >
>
> > > >
>
> >
>
> > > > where all entries are Vec3f.
>
> >
>
> > > >
>
> >
>
> > > > The total number of scalar values in keyValue is thus N * 3 * M * 3.
>
> >
>
> > > >
>
> >
>
> > > > I could not test CUBICSPLINE for Coordinate or 
> > > > NormalInterpolator yet
>
> >
>
> > > > since I do not have a test example. Does any scene come to mind ?
>
> >
>
> > > >
>
> >
>
> > > > Perhaps I can augment the Dolphin example with some arbitrary 
> > > > tangents
>
> >
>
> > > > for testing.
>
> >
>
> > > >
>
> >
>
> > > > I also converted the glTF Interpolation Test example to X3D:
>
> >
>
> > > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%
> > > > 2Fgithub.com%2Fandreasplesch%2Fx3dom%2Fblob%2Fstep_interpolator%
> > > > 2Ftest%2Fregression-suite%2Ftest%2Fcases%2Finterpolators%2Finter
> > > > polators.html&data=05%7C01%7Cbrutzman%40nps.edu%7C86a9891fa37c4f
> > > > 2efe2e08db87bbc998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C
> > > > 638253013476543406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> > > > CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sd
> > > > ata=OYRC45Lt%2BIMnj9C40KFsL8hle8AJx86kQamhSbMMbHk%3D&reserved=0
>
> >
>
> > > >
>
> >
>
> > > > It may be useful for testing Position and OrientationInterpolator without glTF.
>
> >
>
> > > >
>
> >
>
> > > > Andreas
>
> >
>
> > > >
>
> >
>
> > > > On Tue, Jun 27, 2023 at 10:34 AM Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> >
>
> > > > >
>
> >
>
> > > > > Hi Michalis,
>
> >
>
> > > > >
>
> >
>
> > > > > Ok, let me work on adding a STEP interpolation mode to interpolators.
>
> >
>
> > > > > Do you want to raise a spec. improvement suggestion ?
>
> >
>
> > > > >
>
> >
>
> > > > > As  a side note, STEP mode is also related to x3d sequencers. 
> > > > > A
>
> >
>
> > > > > ScalarInterpolator in STEP mode would be equivalent to a 
> > > > > hypothetical
>
> >
>
> > > > > ScalarSequencer, except for the next and previous fields. Hm, 
> > > > > perhaps
>
> >
>
> > > > > it makes sense to add next and previous fields to 
> > > > > interpolators which
>
> >
>
> > > > > would step through intervals.
>
> >
>
> > > > >
>
> >
>
> > > > > The CUBICSPLINE algorithm for glTF is fairly well documented 
> > > > > as far as
>
> >
>
> > > > > I remember. Feel free of course to look up the implementation 
> > > > > in
>
> >
>
> > > > > x3dom.
>
> >
>
> > > > >
>
> >
>
> > > > > It is worth noting that the existing SplineInterpolator nodes 
> > > > > only
>
> >
>
> > > > > allow for one (central) tangent per key and key value, whereas 
> > > > > the
>
> >
>
> > > > > common cubic spline algorithm allows for two tangents (in, and 
> > > > > out)
>
> >
>
> > > > > per key and key value. Those mathematically inclined may be 
> > > > > able to
>
> >
>
> > > > > show that the x3d algorithm for spline interpolations is 
> > > > > equivalent to
>
> >
>
> > > > > the cubic spline algorithm with identical in and out tangents.
>
> >
>
> > > > >
>
> >
>
> > > > > x3dom just mirrors glTF in that inTangent, value, outTangent 
> > > > > occur in
>
> >
>
> > > > > triplets in the MF keyValue field. An alternative interface 
> > > > > would
>
> >
>
> > > > > introduce keyInTangent and keyOutTangent fields which then 
> > > > > would
>
> >
>
> > > > > require sensible default values. Not sure.
>
> >
>
> > > > >
>
> >
>
> > > > > Some thoughts, Andreas
>
> >
>
> > > > >
>
> >
>
> > > > > PS:
>
> >
>
> > > > > A StringSequencer would be useful as a mechanism to store and 
> > > > > select
>
> >
>
> > > > > alternative string values for display in Text nodes. I think 
> > > > > the
>
> >
>
> > > > > current strategy is to use an IntegerSequencer to select from 
> > > > > Shapes
>
> >
>
> > > > > in a Switch. A MFStringSequencer would be more concise and convenient.
>
> >
>
> > > > > Hm, similarly there could be a StringTrigger event utility.
>
> >
>
> > > > >
>
> >
>
> > > > >
>
> >
>
> > > > > On Tue, Jun 27, 2023 at 8:18 AM Michalis Kamburelis
>
> >
>
> > > > > <michalis.kambi at gmail.com> wrote:
>
> >
>
> > > > > >
>
> >
>
> > > > > > Indeed glTF has additional interpolation options, and I 
> > > > > > think it would
>
> >
>
> > > > > > make sense to add them to X3D.
>
> >
>
> > > > > >
>
> >
>
> > > > > > Looks like X3DOM and view3dscene/Castle Game Engine go in 
> > > > > > this
>
> >
>
> > > > > > direction already :)
>
> >
>
> > > > > >
>
> >
>
> > > > > > 1. X3DOM has SFString "interpolation" field, default 
> > > > > > "LINEAR", see
>
> >
>
> > > > > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc.x3dom.org%2Fauthor%2FInterpolation%2FX3DInterpolatorNode.html&data=05%7C01%7Cbrutzman%40nps.edu%7C86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=ptBY8zZRxqgrP8rriik4Ki1yPwCogYNJlNnUVcukTGM%3D&reserved=0 .
>
> >
>
> > > > > > Andreas above explained how it supports "CUBICSPLINE" option.
>
> >
>
> > > > > >
>
> >
>
> > > > > > 2. view3dscene / Castle Game Engine allow to use "STEP" 
> > > > > > interpolation
>
> >
>
> > > > > > explicitly.
>
> >
>
> > > > > >
>
> >
>
> > > > > >     For this, we add such field:
>
> >
>
> > > > > >
>
> >
>
> > > > > >     SFString [in,out]   interpolation  "LINEAR" # range: ["LINEAR"|"STEP"]
>
> >
>
> > > > > >
>
> >
>
> > > > > >     .. to all X3DInterpolatorNode descendants (so, all 
> > > > > > interpolator
>
> >
>
> > > > > > nodes). This seems exactly like X3DOM, we just added "STEP", 
> > > > > > where
>
> >
>
> > > > > > X3DOM added "CUBICSPLINE". In the end we should probably 
> > > > > > have all
>
> >
>
> > > > > > ["LINEAR"|"STEP"|"CUBICSPLINE"].
>
> >
>
> > > > > >
>
> >
>
> > > > > > 3. Note that even without this field, with default linear
>
> >
>
> > > > > > interpolation, it was possible to have effectively step 
> > > > > > interpolation,
>
> >
>
> > > > > > as Andreas mentions. You can just duplicate keys in the 
> > > > > > middle, like
>
> >
>
> > > > > >
>
> >
>
> > > > > >     key [0 0.33 0.33 0.66 0.66]
>
> >
>
> > > > > >     keyValue [10 10 20 20 30 30]
>
> >
>
> > > > > >     # interpolation "LINEAR"
>
> >
>
> > > > > >
>
> >
>
> > > > > >     This is valid with X3D ("""keys shall be monotonically
>
> >
>
> > > > > > non-decreasing""" according to spec).
>
> >
>
> > > > > >
>
> >
>
> > > > > >     It is equivalent to
>
> >
>
> > > > > >
>
> >
>
> > > > > >     key [0 0.33 0.66]
>
> >
>
> > > > > >     keyValue [10 20 30]
>
> >
>
> > > > > >     interpolation "STEP"
>
> >
>
> > > > > >
>
> >
>
> > > > > >     Using explicit "STEP" is slightly better, as you need 
> > > > > > 50% less
>
> >
>
> > > > > > memory to store it, less computation (no need to do lerp or 
> > > > > > detect
>
> >
>
> > > > > > this special case to optimize), and seems just simpler for 
> > > > > > authors --
>
> >
>
> > > > > > it specifies intention explicitly, which makes sense, also 
> > > > > > if one
>
> >
>
> > > > > > hopes a round-trip e.g. import to Blender and export to Blender.
>
> >
>
> > > > > >
>
> >
>
> > > > > >     Having such additional interpolation options seems 
> > > > > > common, glTF
>
> >
>
> > > > > > and Blender too have them (
>
> >
>
> > > > > > https://nam10.safelinks.protection.outlook.com/?url=https%3A
> > > > > > %2F%2Fdocs.blender.org%2Fmanual%2Fen%2Flatest%2Feditors%2Fgr
> > > > > > aph_editor%2Ffcurves%2Fproperties.html%23editors-graph-fcurv
> > > > > > es-settings-interpolation&data=05%7C01%7Cbrutzman%40nps.edu%
> > > > > > 7C86a9891fa37c4f2efe2e08db87bbc998%7C6d936231a51740ea9199f75
> > > > > > 78963378e%7C0%7C0%7C638253013476543406%7CUnknown%7CTWFpbGZsb
> > > > > > 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
> > > > > > CI6Mn0%3D%7C2000%7C%7C%7C&sdata=uZtnT%2BSNwhIlmFtd4w5sRThCk%
> > > > > > 2FiFrnKvtYZ%2FJjgFp18%3D&reserved=0
>
> >
>
> > > > > > ).
>
> >
>
> > > > > >
>
> >
>
> > > > > > 4. Note that view3dscene / Castle Game Engine do not support
>
> >
>
> > > > > > "CUBICSPLINE" interpolation yet, but we plan to.
>
> >
>
> > > > > >
>
> >
>
> > > > > >     For now we support curve interpolation by adding extra
>
> >
>
> > > > > > intermediate keys to the linear interpolation -- so, we have
>
> >
>
> > > > > > needlessly more keys / key values. But this is only a 
> > > > > > temporary
>
> >
>
> > > > > > solution, we want to support "CUBICSPLINE" properly, like X3DOM.
>
> >
>
> > > > > >
>
> >
>
> > > > > > Regards,
>
> >
>
> > > > > > Michalis
>
> >
>
> > > > > >
>
> >
>
> > > > > > niedz., 25 cze 2023 o 05:33 Andreas Plesch <andreasplesch at gmail.com> napisał(a):
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > > Date: Sat, 24 Jun 2023 10:11:03 -0700
>
> >
>
> > > > > > > > From: Joseph D Williams <joedwil at earthlink.net>
>
> >
>
> > > > > > > > To: Michalis Kamburelis <michalis.kambi at gmail.com>
>
> >
>
> > > > > > > > Cc: GPU Group <gpugroup at gmail.com>,  X3D Graphics public 
> > > > > > > > mailing list
>
> >
>
> > > > > > > >         <x3d-public at web3d.org>
>
> >
>
> > > > > > > > Subject: Re: [x3d-public] Blender > Exporting rig transforms to HAnim?
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > > 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.
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > In order to support glTF x3dom added a CUBICSPLINE with 
> > > > > > > tangents
>
> >
>
> > > > > > > option to interpolators, in the same form as glTF, eg. 
> > > > > > > three values
>
> >
>
> > > > > > > (in tangent, value, out tangent) per key. Parallel to glTF 
> > > > > > > x3dom
>
> >
>
> > > > > > > interpolators have a "interpolation" SFString field which 
> > > > > > > can have
>
> >
>
> > > > > > > "LINEAR" and "CUBICSPLINE" values. I suspect due to glTF 
> > > > > > > support other
>
> >
>
> > > > > > > viewers also already do something like that and could 
> > > > > > > expose such a
>
> >
>
> > > > > > > mode to regular X3D.
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > A STEP option is already elegantly solved by X3D with 
> > > > > > > duplicate keys
>
> >
>
> > > > > > > with different values in series. That allows mixing step 
> > > > > > > wise and
>
> >
>
> > > > > > > linear interpolation in one animation. x3dom just 
> > > > > > > translates glTF STEP
>
> >
>
> > > > > > > to that format which is very straightforward. A dedicated 
> > > > > > > STEP option
>
> >
>
> > > > > > > would be 50% more efficient in storage but I am not sure 
> > > > > > > if this is
>
> >
>
> > > > > > > enough of a benefit to justify duplication of existing functionality.
>
> >
>
> > > > > > > It may not or it may as x3dom already does it internally 
> > > > > > > for glTF. It
>
> >
>
> > > > > > > would be possible to add to x3d as well but perhaps not necessary.
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > Andreas
>
> >
>
> > > > > > >
>
> >
>
> > > > > > > _______________________________________________
>
> >
>
> > > > > > > x3d-public mailing list
>
> >
>
> > > > > > > x3d-public at web3d.org
>
> >
>
> > > > > > > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> >
>
> > > > >
>
> >
>
> > > > >
>
> >
>
> > > > >
>
> >
>
> > > > > --
>
> >
>
> > > > > Andreas Plesch
>
> >
>
> > > > > Waltham, MA 02453
>
> >
>
> > > >
>
> >
>
> > > >
>
> >
>
> > > >
>
> >
>
> > > > --
>
> >
>
> > > > Andreas Plesch
>
> >
>
> > > > Waltham, MA 02453
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > --
>
> >
>
> > Andreas Plesch
>
> >
>
> > Waltham, MA 02453
>
> >
>
> >
>
>
>
>
>
>
>
> --
>
> Andreas Plesch
>
> Waltham, MA 02453
>
>



--
Andreas Plesch
Waltham, MA 02453

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230719/12501631/attachment-0001.p7s>


More information about the x3d-public mailing list