The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

NodeBox 3From the old forum

Smoother animation

1 reply Last reply

  1. 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?

    Copy link
  2. 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:

    https://forum.nodebox.net/t/14835501/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

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply