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

Andreas Plesch andreasplesch at gmail.com
Wed Jul 19 10:01:26 PDT 2023


Hi Michalis,

a very interesting use-case. Let's go through it.

On Wed, Jul 19, 2023 at 11:21 AM Michalis Kamburelis
<michalis.kambi at gmail.com> wrote:
>
> In regards to "whether interpolators emit output events when their
> output doesn't change", let me show one use-case when it matters (and
> how we deal with it in CGE/view3dscene):
>
> Imagine you have a model with multiple animations, so multiple
> TimeSensors. Only one of the animations is expected to actually play.
> E.g. it's a creature that can either be in "walking" or "idle"
> (standing still, just breathing) state. Each TimeSensor "drives" a
> number of interpolators.
>
> Like (forgive me a bit of pseudo-code, below is not strict X3D):
>
> """"
> DEF Creature Transform {
>   children [
>     DEF LeftLeg Transform { }
>     DEF RightLeg Transform { }
>    ... rest of the creature body, and probably a more complex
> Transform hierarchy ...
>   ]
> }
>
> DEF Walking TimeSensor { ... }
> DEF LeftLegWalk OrientationInterpolator { ... }
> DEF RightLegWalk OrientationInterpolator { ... }
> ROUTE Walking -> LeftLegWalk # time sensor -> interpolator
> ROUTE LeftLegWalk -> LeftLeg # interpolator -> transformation
> ROUTE Walking -> RightLegWalk # time sensor -> interpolator
> ROUTE RightLegWalk -> RightLeg # interpolator -> transformation
>
> DEF Idle TimeSensor { ... }
> DEF LeftLegIdle OrientationInterpolator { ... }
> DEF RightLegIdle OrientationInterpolator { ... }
> ROUTE Idle -> LeftLegIdle # time sensor -> interpolator
> ROUTE LeftLegIdle -> LeftLeg # interpolator -> transformation
> ROUTE Idle -> RightLegIdle # time sensor -> interpolator
> ROUTE RightLegIdle -> RightLeg # interpolator -> transformation
> """
>
> Now we want to give developer ability to switch between "Walking" and
> "Idle" animation at any moment. What can go wrong?
>
> 1. If you disable time sensor "Walking", and start time sensor "Idle"
> -> it is not guaranteed that LeftLegIdle will emit the output event in
> the next frame. So the left leg could stay "as is", at least for some
> time, at the last transformation from the last "Walking" animation
> moment that was played.

One would think that It should be guaranteed that an interpolator
immediately outputs an initial value but that is not the case as you
say. The critical situation is when the last value was from the first
interval before the driving Timesensor was stopped. So when the
Timesensor is restarted and fraction is therefore in the first
interval, it would not emit an event because the corresponding value
did not change. The workaround would be to author a very short first
interval. Not ideal but perhaps workable and probably preferred over
always emitting events.

> 2. Moreover, what if "Idle" animation didn't specify any
> transformation for legs? Maybe the animator didn't animate legs for
> "Idle", and was fine to leave the "Idle" just show legs in the default
> (T-pose) pose. But it means that if we first start "Walking" and then
> start "Idle", then legs during "Idle" will stay "as is", from the last
> transformation of the last "Walking" moment.

That seems like an inadequate assumption by the animator or author. If
the animation is just for arms it should not affect legs. If it is
supposed to affect legs there needs to be additional information in
form of a static leg animation or scene logic.

> At one point, I did experiment with forcing interpolators to emit
> events *always*, even when output didn't change. This fixed the issue
> AD 1. But it didn't fix the issue AD 2 (unless I added more "dummy"
> interpolators with only one keyValue), and also it was inherently
> unoptimal -- I've been passing around events even when no change was
> actually necessary.

True, but these would not be dummy interpolators and there may be only
one or a few additional events to pass around. In this case a change
is actually necessary, return the legs to the T-pose.

> Our current solution in CGE is to have API to "PlayAnimation"
> (TCastleScene.PlayAnimation method in Pascal) that, when the new
> animation starts, also *resets* all the transformations affected by
> previous animations to their default (at the moment X3D was loaded)
> state. It gets a bit more complicated when we also do cross-fading of
> animations, but the gist is that we know the "default" state of
> anything that is possibly animated, and can always revert to it.
>
> The behavior is documented in more details in
> https://castle-engine.io/x3d_implementation_time_extensions.php#section_detect_affected_fields
> .
>
> Naturally, one or both of above behaviors (AD 1 and AD 2) could also
> be considered "a feature" -- e.g. you can have one TimeSensor that
> animates legs (so that legs walk), and in parallel a different
> TimeSensor animates hands (so that hands can e.g. "wave goodbye" or
> something, independent of what legs are doing). So we also allow you
> to start a time sensor without necessarily resetting everything else,
> using "TTimeSensorNode.Start" method (so you use this instead of
> "TCastleScene.PlayAnimation"). See e.g.
> https://github.com/castle-engine/castle-engine/tree/master/examples/animations/simultaneous_animations_one_scene
> (this is using gfTF underneath, but this glTF is just converted to X3D
> nodes in CGE, with one glTF animation -> one X3D TimeSensor).
>
> There's no obvious conclusion from this for X3D specification -- X3D
> just leaves this decision ("what to do when you start the animation")
> for the author. Maybe author wants to reset some state, maybe not.
> Maybe author wants to cross-fade with previous animation (which we've
> discussed in past threads on this list, basically X3D doesn't make it
> easy to have any animation being cross-faded with any other animation;
> we add code for it in CGE). In CGE, as we needed to have easy method
> "just play animation X (maybe with cross-fading) instead of previous
> animation", but also alternative "play animation X in parallel with
> other animations" we needed to have additional code that adds more
> (optional) logic to time sensors.

I agree with the analysis and that it makes sense to have an easy to
use animation interface. I think issue AD 1 is a good example of why
it may be sometimes necessary to always output events. Automatically
detecting fields affected by a Timesensor via an interpolator and
resetting those interpolators (their last value) may be an option to
avoid that but seems heavy in its own computation cost. Another option
may be to have an SFBoolean "reset" field for an interpolator which
triggers a reset and could be invoked from the scene when a Timesensor
is stopped if an author chooses to do that. A third option may be a
"force" field to force the interpolator to output events for each
input event. A final option may be to always output events only for
the first interval but that seems perhaps too specific to this use
case.

Best, Andreas


> Regards,
> Michalis
>
> śr., 19 lip 2023 o 16:28 Andreas Plesch <andreasplesch at gmail.com> napisał(a):
> >
> > Hi Don,
> >
> > On Tue, Jul 18, 2023 at 11:41 PM Brutzman, Donald (Don) (CIV)
> > <brutzman at nps.edu> wrote:
> > >
> > > 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 agree with the principle. I think the issue here is that the spec.
> > requires more than is typically, perhaps in all cases required. The
> > imposed condition here is stricter in that an output event is required
> > for each input event. At least that is how I would interpret it. I
> > think it could be relaxed to follow what is hinted at in the tooltip.
> > Currently, the tooltip seems to contradict the spec. because it allows
> > something which the spec. prevents.
> >
> > > I think that authors are wise to focus on cause and effect, rather than non-causal events with no effect (cough cough!)
> >
> > Completely agreed. The problem is that there is actually a cause and
> > an effect (the emitting of an event) which an author may want to
> > achieve although we so far did not really identify one.
> >
> > > Dick might have a different POV about this.  In any case, optional nonfunctional activity seems like optional prose...
> >
> > Yes, the prose should be rephrased to use only positive and functional
> > statements but that is a semantic angle.
> >
> > I sense that many browsers here actually take advantage of the tooltip
> > "loophole" and do not quite follow the spec. strictly. This does not
> > seem to be an actual authoring issue because I do not recall this
> > being discussed before.
> >
> > If interpolation modes such as STEP or CUBICSPLINE become part of
> > spec. (in a way they already are due to inclusion of support of glTF)
> > it may be good opportunity to clarify that event output is only
> > required if the value actually changed (but could happen more often).
> >
> > Best regards,
> >
> > Andreas
> >
> > > 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
> >
> >
> >
> > --
> > Andreas Plesch
> > Waltham, MA 02453
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org



--
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list