-
Notifications
You must be signed in to change notification settings - Fork 300
Camera interpolation. Camera rewrite (1) #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera interpolation. Camera rewrite (1) #1584
Conversation
I’ll keep it in mind. That said, if anyone else wants to review it first, please do, since I don’t know when I’ll be able to do it. |
|
@davidlamhauge Hey David. Great work, I like how you solved the user experience since it's something that makes sense visually. Since animation I also like how you provided a more sensible categorization for the easing levels based in polynomials (e.g sinusoidal, quad, cubic, quartic, quintic, etc) This will certainly become a foundation for future motion tween work for other layers, and a solid base to expand for more easing types in the future if there is need for them (i.e bounce, sine, back a.k.a overshoot, etc) I have a few questions and suggestions to review so I can fully understand how this will work for the end user, but I need to gather my thoughts and make a video because otherwise I might end up writing an essay here 😅 💦 Personally I also want to support speeding up PR's so most of what I will mention could be added in a follow-up enhancement PR. That said, one of the core additions that should be considered right now is having a "no ease" / "hold" option to simulate the exposure hold in the same way Pencil2D does it with other layers, that way we would have a basic set of tools to simulate motion without needing to complicate this PR further. Thank you for your hard work 🙂 |
|
|
|
@davidlamhauge Looking great! I wanted to ask another thing meanwhile. Is it possible right now to select multiple frames and apply the tweens to all of the selected frames? That'd be very useful regardless of the preset used 😄 I'll be testing this branch a little later today so hopefully I can prepare more informed questions and discussions if there is a need to do so. Thanks again! |
|
@Jose-Moreno, It is only possible to change interpolation if one, and only one, keyframe is selected. This makes it possible to make it easy to use, and more informative. |
|
@davidlamhauge One thing I noticed yesterday while inspecting Blender and Animate CC is that the "quad" interpolation is considered the default or "normal", while the sinusoidal interpolation would be the slow one, however after I reviewed some sites to clarify this relationship a bit better I got another surprise. Looking at this site https://sighack.com/post/easing-functions-in-processing#sinusoidal-to-exponential-easing it seems the easing grows from sinusoidal (slowest) up to exponential (fastest); math isn't my strong suit so apologies if this was obvious. I also looked at this site which has a nice example for most of the easing graphs are laid out horizontally and it solidified the idea https://observablehq.com/@jshernandez15/easing-animations. Lastly I managed to review this final site which has all the curves visualized in order which helped me conclude that these 6 functions are naturally treated as a set https://easings.net/ Considering these, if we were to use the easing scale from sinusoidal up to exponential instead of quadratic to quintic it would be something like:
The terms are just a proposal, but at least this would mean that both the sine and exponential categories could be includedas part of the superlative easing scale you have already setup, so hopefully you can also consider this change as well as it would make it more friendly and easy on the eyes🙂 |
I see. I think I understand better. What kept me wondering was that If I'm going to hold a frame forward, I'm supposed to be selecting the first frame and expose it forward; selecting the keyframe immediately after the actual held exposure of the timeline is slightly confusing. Similarly when easing, I expected that the first frame you apply ease to will affect everything inbetween itself and the next frame. But with how I understand your solution and considering your latest description it appears to me that the opposite behavior is happening instead, meaning that the interpolation is affecting not only the current frame but also the one before it, which seems counter intuitive in regards to how time flows in general over the timeline. Maybe this is something that could be reviewed as well in due time. Note that i'm not saying the current apparent solution is incorrect, but rather that it goes against convention and expectation since even working traditionally you know one can't shoot the film backwards (normally) so telling a frame to be held or interpolated by selecting the keyframe after it seems challenging. Other than that I don't find any issue with how informative or descriptive the menus are. It certainly is better to be clear in that regard 👍 |
|
@Jose-Moreno, I don't agree with your opinion, and I would find it very counter intuitive with your approach. |
|
@Jose-Moreno, I like your research on the easing curves, but you don't have to go further than https://doc.qt.io/qt-5/qeasingcurve.html#Type-enum, to see fine illustrations. |
|
I've made some changes, so you can either choose interpolation for one keyframe at a time, or you can select one or more keyframes to interpolate. Updated video below: |
|
After talking to @Jose-Moreno and watching a few tutorials for other software, I've changed the logic, so you always define easing forwards. If you have keyframes on frame 1 and 50, you right click frame 1, to set the easing towards frame 50. It seems to be the prevalent way to do it, even if I still think it is counter-logical |
At some point I would like to have all camera related logic in its own CameraTimelineCell class so that we don't pollute the general timeline cell class with Camera Layer specific code. This requires some work though as the timelinecells class is not built for that kind of setup currently.
and make sure frame is selected before the menu opens.
…ctoring Camera interpolation minor refactoring
|
After reviewing and making a PR with minor refactoring, I think it looks good now. Regarding your comments @davidlamhauge, I don't think working with a camera should be tedious, and if it is, then we should work on making it easier to use (which you are). As for your question about the ability to change interpolation for multiple frames at a time. I still think it's useful and I don't see why you would remove it when it can be convenient. What do you mean when you say "compared to the mess you can do if something goes wrong", what could go wrong? the application crashes? or do you mean to say it causes a destructive behavior to the frames? As far as I understand, the interpolation functionality doesn't manipulate the content, so it shouldn't be a problem to do it on more than one frame? |
|
|
…ctoring Revert usage of string concat for l18 as it won't work...
MrStevns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor changes but I'd like to see them fixed before merging.
I'd say it's good to go when these have been fixed.
|
@J5lx Do you have any other comments regarding this PR, otherwise I plan to merge it after david has fixed the few minor things I had. |
MrStevns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now 👍
|
@candyface Well I had a few requests I spoke with David during our debugging session, but I figured it would be better to add them later as enhancements rather than delay the PR being merged. There are some that are tangential to other PR's but the list is focused around bugs and UX issues I found when using the widget and the interpolation presets, but i'll leave the related list here for completeness:
|
|
Hi @Jose-Moreno . I haven't forgot your long list of wishes for the camera, but that is another PR. This one has still the old camera, and only makes it possible to define interpolations. No handles, paths etc. |
Ah don't worry I wasn't listing those to delay the PR's, though I was interested in having Candyface look into the "integer-only" issue, either way I wanted to leave a hard copy. Unfortunately I did think this was a PR that had both features since the title mentioned Interpolation and camera rewrite and I only noticed afterwards when re-visiting github that this was only the interpolation PR without the widget transform 🤦 Nonetheless I'll be making a new issue for the interpolation requests, another one for the widget requests and a last one for the motion path feature and we'll discuss that afterwards. Here's hoping the camera PR's can get merged soon. Thanks again 👍 |
|
I don't have any comments on the "interger-only" issue currently, as I haven't tried out the camera rewrite 2 PR yet, so I can't comment on the UX issues. I will however look into them when I start reviewing the PR. Without further ado, I will now merge the PR. In the future at some point I too also have a few wishes:
|
|
@candyface This is implemented in the newest push from the camera_transform_camera branch. |




With this feature, you can define the camera interpolation you want, from the previous keyframe to the chosen. You can choose between 21 interpolations.
I've made a short video, and I want to excuse for the lag in the video. My Windoze PC is not very good.
About review: Since @candyface has helped a lot in the development of this feature (Thanks!), it would be easy for him to review it, and that might speed up the review process. On the other hand, it could also be used as an argument, to have somebody else to review it. No matter what, I hope this feature will get to our users as soon as possible.
https://youtu.be/ENeYrQTbs7Q