I'm new to NodeBox. I don't understand how I can animate the lines I've drawn.
Could someone help me?
|?||Show this help|
|ESC||Blurs the current field|
|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 21 Mar, 2016 10:25 PM
Welcome to the NodeBox community. I hope you will enjoy NodeBox as much as we do and post often to the forum.
Animation in NodeBox is done by adding a frame node and then letting that node control the output.
All frame does is output a sequence of integers starting with 1 (1,2,3...) which correspond to each frame of your animation. By using each frame number to slightly alter what is drawn by the rendered node you can gradually move or resize or rotate or recolor various elements to form a smooth animation of however many frames you want.
To illustrate this I am attaching a NodeBox network similar to yours along with a screenshot and the animation it produces. The animation starts with a single line which clones and scoots over to form 20 lines; this takes 30 frames. The animation pauses for 20 frames then over the final 50 frames each line gradually rotates to a random orientation. Let me walk you through it.
At the top is the frame node. It feeds into two convert range nodes, one for the frames 1-30, the other for frames 50-100. The first of these generates a series of coordinates (x slowly increases, y is unchanged) which feed into the translate port of the copy node. This causes the 20 lines to gradually separate.
The second convert range node kicks in at frame 50, gradually producing a fraction from 0 to 1. I multiply this by a a set of 20 random angles (varying from -79 to +79), one for each line, and feed that into the rendered rotate node. The effect is to slowly move from the starting angle (0) to the random ending angle.
You can play with this by scrubbing (dragging) the frame indicator in the lower left corner or just hitting the Play button. To adjust your animation you can set the frame indicator to a certain point and then fiddle with the Target End of the range converters or the number of lines in the copy node or the range of angles in the random node or the seed of the random node until you get the effect you want. You can change Source Start and Source End in the range converters to make one section of your animation run faster and another run slower.
When you're happy, choose "Export Movie..." from the file menu and define how many frames you want to generate. You can determine the dimensions of the movie by changing the height and width of the document under the "Document Properties..." menu (I set my example to 500 x 500).
That's all there is to it. The only cleverness required is to figure out how to transform the frame number into whatever values you need to alter the drawing.
Hope that helps!