[x3d-public] Blender > Exporting rig transforms to HAnim?

Joseph D Williams joedwil at earthlink.net
Tue Jun 27 13:16:27 PDT 2023


Thank you again. Great features. 
Seems like I have not actually looked at the  spec for many moons.
Joe

From: Andreas Plesch
Sent: Tuesday, June 27, 2023 12:42 PM
To: Joseph D Williams
Cc: John Carlson; X3D Graphics public mailing list
Subject: Re: [x3d-public] Blender > Exporting rig transforms to HAnim?

As Michalis mentioned

https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/interpolators.html#Linearinterpolation

says

'The keys shall be monotonically non-decreasing, otherwise the results
are undefined.'

and later addresses the step case:

'The third conditional value of f(t) allows the defining of multiple
values for a single key, ( i.e., limits from both the left and right
at a discontinuity in f(t)). The first specified value is used as the
limit of f(t) from the left, and the last specified value is used as
the limit of f(t) from the right. The value of f(t) at a multiply
defined key is indeterminate, but should be one of the associated
limit values.'

It is sufficiently well defined. Would it need to change ? A possible
improvement may be that f( of exactly t ) in that case is always the
last of the multiple values (because the half closed intervals include
first key but not the following key) but there was probably a reason
to leave it indeterminate which in practice is not a problem.

Andreas



On Tue, Jun 27, 2023 at 2:45 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> You can just duplicate keys in the middle, like
>
>
>
> Then the rule must change. Now the rule is key times must be ascending?
>
>
>
> >>>     SFString [in,out]   interpolation  "LINEAR" # range: ["LINEAR"|"STEP"]
>
>
>
> Adding mode or style or type would be ok.
>
>
>
> How does this play with the ease in/out actions?
>
>
>
> Thanks for looking at this.
>
> Joe
>
>
>
>
>
> From: Andreas Plesch
> Sent: Tuesday, June 27, 2023 8:12 AM
> To: John Carlson
> Cc: X3D Graphics public mailing list
> Subject: Re: [x3d-public] Blender > Exporting rig transforms to HAnim?
>
>
>
> Theoretically, it should be possible to translate a cubic spline type
>
> interpolation to a special case of a NURBS description of a curve.
>
> Practically, it is unlikely that this is advantageous both for users
>
> who want a smooth animation or for implementations since NURBS
>
> requires pretty heavy machinery due its generalized approach while
>
> cubic spline interpolation can be computed in a few lines. Animation
>
> users will find it difficult to generate a NURBS description using
>
> available animation tools, and will welcome not having to rely on a
>
> x3d NURBS component. Functionally, cubic spline would apply to any
>
> interpolator while there are only position, orientation and surface
>
> nurbs interpolators.
>
>
>
> -Andreas
>
>
>
> On Tue, Jun 27, 2023 at 10:27 AM John Carlson <yottzumm at gmail.com> wrote:
>
> >
>
> > I had a thought that this might be handled by NURBS?
>
> >
>
> > John
>
> >
>
> > On Tue, Jun 27, 2023 at 7:19 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://doc.x3dom.org/author/Interpolation/X3DInterpolatorNode.html .
>
> >> 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://docs.blender.org/manual/en/latest/editors/graph_editor/fcurves/properties.html#editors-graph-fcurves-settings-interpolation
>
> >> ).
>
> >>
>
> >> 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
>
> >>
>
> >> _______________________________________________
>
> >> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230627/bf54c938/attachment.html>


More information about the x3d-public mailing list