[x3d-public] cubic spline, step interpolation

Leonard Daly Leonard.Daly at realism.com
Tue Jul 31 11:51:05 PDT 2018


I haven't had a chance to read and digest your post yet. You might wish 
to take a look at the TWEEN JavaScript library. It does linear 
interpolation, but has a large number of easings for the way-points. 
XSeen uses this library for all animations. Docs are at 

Leonard Daly

> 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
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

*Leonard Daly*
3D Systems & Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180731/07a7a8c1/attachment-0001.html>

More information about the x3d-public mailing list