-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added an smart stretching option to BlendAction #1847
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
Conversation
…on will stretch any action that doesn't have the same length. This will cause stretched actions to end up play slowly so one need to manually speed up action to resolve this. What smart stretching does is that it tries to loop the action when possible before stretching to resolve the slow animation effect.
Drafted it until I test it with some more examples. |
By the way, if you think the term "smart stretch" is not suitable or if you know a better one, please let me know. |
I have a new idea that is simpler and visually looks better than this one. Closing this draft:D |
Is this related to #1303 ? |
Yes. Well, the looping idea generates some visual artifacts while blending from one to another. Artifacts can be greatly reduced by setting the max transition weight to 0.5 or something. In the new idea instead of looping I want to dynamically change the speed. So |
See my new PR here: #1848 |
I made a demo video showing how blending looks with the smart-stretching approach. Not promising |
By default, BlendAction will stretch any action that doesn't have the same length. This will cause stretched actions to end up playing slowly so one needs to manually speed up action to resolve this. What smart stretching does is that it tries to loop the action when possible before stretching to resolve the slow animation effect.
Gives the best result when the max transition weight is set to something lower than 1 (e.g. 0.5)