Catmull-rom Spline rotation and switching from Catmull to Cubic
ZombieHDGaming opened this issue ยท 3 comments
Hi.
First things first, thank you for the mod. It is incredible. Second, I was wondering if this was a bug or not, but I have been seeing with some position keyframes, only have had this happen twice, that catmull rom splines are sometimes causing unnecessary counter rotation. (I will hopefully have a video link to this soon)
Also, figured I should add this on, the spline switching between catmull and cubic seems to produce some odd behavior in 1.11.2. As such, here is a pciture showing what I mean:
(Sorry if it isn't here when I post it) This picture is showing my own little testing of Catmull splines, and figured to try and smooth out the counter rotation with cubic.....this did not turn out well. I will also leave a video of this here. Basically, I know nothing is perfect, so I am letting you know to help perfect these errors and fix these unimplemented features :D
I'll probably just use the one video for showing both errors, and 1 if I try and fix the 1 error.
Forge: 13.20.0.2226
ReplayMod Version: 1.11.2-2.0.0 B6
Thanks @CrushedPixel, now I feel kind of stupid for not knowing the 3 frame requirement for the interpolation. I thank you for the insight. Looks like I'll have to learn combat these kinds of situations when making my spline paths lol.
The catmull-rom-splines are working as intended - if they do some counter-rotation, that's how the algorithm works.
Switching between interpolators every keyframe makes no sense, as the Catmull-Rom and Cubic Spline interpolators both need at least 3 keyframes to make a smooth curve - if they alternate every keyframe, they'll just produce a straight line as you can see.
My suggestion is setting all keyframes back to Default interpolation and setting the default interpolation to Catmull-Rom in the Replay Mod Settings and adjust the alpha value which determines the smoothness of the spline (and therefore the counter-rotation at the curves).
A node being CR interpolated while the previous one was a different interpolation doesn't mean that node shouldn't get the previous nodes as input data. Basically, switching to CR at any given point should mean the spline acts as if the whole spline had been CR, from that point.
Otherwise, the spline will always be discontinuous whenever you switch interpolators, which is probably never what you want.
(at least, given the lack of easing functions and in/out settings).