tag:support.nodebox.net,2012-11-01:/discussions/nodebox-2-3/5831-smoother-animationNodeBox: Discussion 2020-01-02T12:57:45Ztag:support.nodebox.net,2012-11-01:Comment/410573262016-10-29T03:17:09Z2016-10-29T03:17:09ZSmoother animation<div><p>Hi Zyl,</p>
<p>If you're still stuck on this, you might want to read through a
(long) discussion Frederik and I had about this last year:</p>
<p><a href="http://support.nodebox.net/discussions/show-your-work/86-morph">http://support.nodebox.net/discussions/show-your-work/86-morph</a></p>
<p>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.</p>
<p>(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.)</p>
<p>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.</p>
<p>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.</p>
<p>Good luck!</p>
<p>John</p></div>john