[x3d-public] cubic spline, step interpolation

Andreas Plesch andreasplesch at gmail.com
Tue Jul 31 04:06:16 PDT 2018


As I am looking to add glTF animation support for x3dom, I am considering
convenient ways to do cubic spline and step wise interpolation with x3d
interpolators.
glTF has three modes of interpolation: linear, cubic spline, step.

Linear corresponds to the linear interpolation of the regular x3d
interpolators.

Step produces jumps at key times, and can be represented with x3d
interpolators also, by repeating keys. However, implementation could be
optimized for a special step mode.

Cubic spline almost corresponds to the x3d spline interpolators but not
exactly. With glTF, the velocity derived tangent can be different towards
and away from a key frame, while in x3d there is only a single velocity.
Also, in glTF, the tangents are requied and part of a 3 tuple for each
frame. This makes computing the cubic spline interpolation straightforward
and performant.

So it turns out to be most convenient and efficient to forgo the x3d spline
interpolators and instead add a mode SFString init only field to the
regular interpolators with a 'linear' default. I currently have it not
exposed declaratively and for use with glTF only but why not expose it.

Such a mode field allows for optimization of step and cubic spline
interpolation over regular, and NURBS interpolators, and allows for full
glTF animation support.

Other browsers may have similar goals but likely differing strategies which
would be great to hear about.

Any feedback or comment much welcome,

Andreas

-- AP on the road
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180731/8a171bf3/attachment.html>


More information about the x3d-public mailing list