3 ms·
no, no, no, no, no, no.... Look at the heart to star morphing. How can you call it a "very cool effect"?! It's so damn ugly. It existed back in the day of Macr
by Etherlord87 2y ago
no, no, no, no, no, no....
Look at the heart to star morphing. How can you call it a "very cool effect"?! It's so damn ugly. It existed back in the day of Macromedia Flash 4 (maybe earlier), called shape tweening. Except there, you could use tween hints to control the transition.
Try this instead: look at the pairs of nearest points, take a heap sort of like 4 best matching pairs of points, and from those points traverse the curves, resampling the paths with less resolution. Now instead of interpolating positions, interpolate angles. This way the curves will naturally deform, instead of line segments passing through each-other.
- vg_head 2y agoAlways open to suggestions! I don't claim this to be any kind of novel method, or even a "good method". It's just an explanation of one way to do it, which is (IMO) relatively easy to understand, and implement. When researching about this, I didn’t find a lot of writing. Macromedia definitely had this a long time ago, but I don't think you can look up how it was implemented. Not to my knowledge, at least. Do you have an example of the algorithm you describe? Or a more detailed explanation? I don't quite get how it would work from what you've described.
- tadfisher 2y agohttps://git.savannah.gnu.org/cgit/gnash.git/tree/libcore/swf/ShapeRecord.cpp#n132 https://git.savannah.gnu.org/cgit/gnash.git/tree/libcore/swf...
- vg_head 2y agoI haven't looked too in depth into it, but it looks closer to what I described? It doesn’t look like the method the other commenter was describing. Also, keep in mind that I did not mean to implement something better than what Flash did. It's merely an extension to the kind of morphing the browsers already offer.
- shove 2y agoO the hours I set ablaze in supplication to the shape-tween-hinting gods (for all the good it did)
- vg_head 2y agoI am too young to have lived through that era, but it seems to me like tweening hints were all integrated in the editing UI? That is of course much more useful. But the scope of my post was not at all to do something better than Flash, or to integrate a full editor. It's just an explanation for one way to achieve it, leveraging what SMIL already offers.
- shove 2y agoYeah, they were in the editor and buggy as hell and you ran an increasing risk of crashing the tool the more of them you used. Also IIRC, they were indexed by letter of the alphabet and everything became impossible > 26.
- cal85 2y agoIt’s possible to recommend another approach without being rude.