www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Jakes on November 06, 2019, 08:12:20 pm

Title: Animation Interpolation Between Sequences
Post by: Jakes on November 06, 2019, 08:12:20 pm
Just as the topic subject says, is it possible to add this in a near future? or is there a way to do it currently?

Regards
Title: Re: Animation Interpolation Between Sequences
Post by: EgonOlsen on November 06, 2019, 08:43:16 pm
Yes, you could ignore the sub-sequences and just interpolate across the whole animation by using http://www.jpct.net/doc/com/threed/jpct/Object3D.html#animate(float) (http://www.jpct.net/doc/com/threed/jpct/Object3D.html#animate(float)). You could interpolate the needed index from the animation's total number of frames and the number of frames in each sub-sequence. However, this works only for adjacent sub-sequences and in most cases, it might look very strange anyway.
Title: Re: Animation Interpolation Between Sequences
Post by: Jakes on November 07, 2019, 03:46:28 pm
Ok, so that kinda solves half the problem, which is only connected sequences will be interpolated, but if I want to interpolate 1 and 2, 1 and 3, 1 and 4, is there a way to override anything so that I can reach that?

Or do I need to do my own vertexcontroller to do so?
If so, is there any examples out there that could help me out?
Is that as fast as using animation? will it work for compiled objects using object.compiled(true)?
Title: Re: Animation Interpolation Between Sequences
Post by: EgonOlsen on November 08, 2019, 01:01:25 pm
You could do that and yes, it should update even when compiled, but it might not the very fast. It might be better to create different animations out of the individual frames and do the blending. You can reuse the frames, so it's not a memory issue.
Title: Re: Animation Interpolation Between Sequences
Post by: Jakes on November 14, 2019, 12:56:13 am
...It might be better to create different animations out of the individual frames and do the blending. You can reuse the frames, so it's not a memory issue.

thanks, will try out that.