Smoother animation
Hello
What is the most effective way to achieve smooth animations and transitions between shapes?
For example I have a polygon with animated number of pages, now it's pretty easy to get a variety of forms, but how to achieve blending from one shape to another?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by john on 29 Oct, 2016 03:17 AM
Hi Zyl,
If you're still stuck on this, you might want to read through a (long) discussion Frederik and I had about this last year:
http://support.nodebox.net/discussions/show-your-work/86-morph
If you scroll to the end you will find some sample networks that use a special Python morph function that Frederick kindly provided. I just updated the networks. You may be able to use this technique to achieve the smooth shape transitions you are looking for.
(If you use Frederik's node, you must include his morph.py file in the same folder as your network and add a reference to it using File/Code Libraries dialog. For more information see "Writing your own Nodes" on the Documentation page.)
The basic trick is to sample points along the outside of your source and target shapes using resample nodes. Make sure you produce the same number of points on both. Then just feed in both point lists along with a time value from 0 to 100 to gradually morph from one shape to the other. You can attach a frame node to generate time values and then save the result as an MP4 file.
This technique works better on some shapes than others, but by adjusting the resample points you can usually get a smooth animation. If you are still having trouble, post a network with the beginning and end shapes you want and I might be able to help.
Good luck!
John
Zyl closed this discussion on 02 Jan, 2020 12:56 PM.
Zyl re-opened this discussion on 02 Jan, 2020 12:57 PM