Hi all. I have a series of dogs morphing one into another. Works fine - with the exception of the first dog morphing into the second. There´s a delay and the transition is jumpy - even worse on mobile phone. Any ideas?
Sorry I’m late to the thread, but I wanted to weigh in on this cool shape morph and expand with a few more details/answers.
This is basically the case; the shape morph is computationally expensive to compute. There are actually three options you can choose from to address it:
Use the Direct Anchor Point Match(as @h_classen and @MaxZieb showed) for the Shape Morph Algorithm option. This is akin to a “manual mode” and just lines up each anchor point from one shape to the next and interpolates between them. If there are extra/fewer anchor points they will get added or removed from the end of the shape.
Reduce the number of anchor points/shape complexity. This will just reduce computation time since there’s less to calculate. It sounds like you took this approach.
Pre-calculate the shape morph. The first time the Hype runtime encounters hitting a shape morph algorithm, it does a lot of calculation to determine the best morph. This data will get cached by the runtime so if there are subsequent animations it will be much faster – basically it is doing a direct anchor point match after this calculation. So if a particular morph is taking a while to get going, you could do a technique where on scene load you move the playhead to a point within the animation. This will cause the runtime to do the heavy calculations and cache the data. In your case, having a Go to Time in Timeline action of 0:00.01 and then optionally back to 0:00.00.
Absolutely! There’s probably some different ways to accomplish this that might be quicker than others. It doesn’t necessarily mean that the anchor points need to be super clever in their movements. For example, right now the Best Match algorithm runs a lot of possible iterations and uses ranking to determine which is the best. An intersection could be a factor in the ranking, and that might not be too bad. It would of course require experimentation .
Any future algorithm changes will not affect existing animations; there would be a new algorithm choice in the UI.
This is great! Is it part of an article? I’d love to share on our channels more widely since Shape Morphing is a feature we want to promote usage of .