Animation Nodes - A Thread For All

I have been playing with animation nodes and thought it would be a good idea to share my work for criticism and comment. then I had a better idea - why don’t we ALL share some work here so we can all learn from others. So the idea is to post a blend file for all to learn from, or to amend so its better - that way we all progress quicker with this exciting method of animation.

Anyway lets see if this works or not :yes:

Here is a picture of the Blender window:

and here is the zipped blend file: (1010 KB) (its very big when not zipped due to the baked sound…:spin:)

and here is the video:

You can simply insert your own sound to replace the baked one I put in there, the original sound file is not included in the blend file. The file uses “baked sound” and “frame number” to drive objects in loops and materials. The blend file was made from one cube, one sphere, two curves, one curve profile and the background mesh (just extruded from one plane) - Oh yes - and one empty.

So some comments on my method, can you make it better/more efficient? Some other contributions by you all would be gratefully appreciated. :smiley:

Cheers, Clock.

PS. I am going to see if I can build my train rig from the Magnum Opus using animation nodes - just to see if it can be done! I really like the expression node as a tool for complex formulae, to replace drivers. :stuck_out_tongue:

I have no idea what you’re talking about, but if it can be used for trains it has to be good. :smiley:

Hi @Gumboots:


It’s an Addon for Blender 2.78 onwards - very good and capable. Download it from Github, enable it in User Prefs. and enjoy…

Cheers, Clock. :smiley:

@clockmender was taking a look and the scene might be missing something? I have Animation Nodes2 installed, just a pointer as to what is supposed to be hooked up here would be great - thanks for sharing!

I am not on version 2 yet… I will take a look when I get home at the weeekend.

Cheers, Clock.

OK, that was a f***-belch-*** long weekend as my new role model “Rick” would say - one of my granddaughters thinks Rick (of Rick & Morty fame) was inspired by me… :eyebrowlift:

So here are the bits that were different in AN 2.0:

Not too much has changed, but the Sound Bake Node and the methods of getting the sound out did! I will mod the file, if anyone is interested, which most of you are not, when I get some time.

Cheers, Clock. :stuck_out_tongue:

PS. I now have a new s*** fast Mac (15" screen, I7 CPU, 16Gb RAM, 1Tb disk, bath blah blah), but some “dark matter” power system would not go astray :eek:

In this project I have used “Conditional Statement Expression Nodes” to randomly select cubes from the cube matrix. These cubes then expand and in doing so, will attract cubes near to them within a specified search radius. These cubes will then rise in Z and move towards the chosen cube proportional to their distance from the cube.

Here’s a picture:

and here is the video:

and another picture of an Expression Node:

The movement of the cubes is activated by a running sinusoidal wave generator from the frame number and “Cycle Length” of the animation, so if one cube selection and movement of it’s cubes is set to happen over 20 frames, a full sinusoidal wave is calculated over the same time period. There are several inputs used to control the animation, like speed, offset, gravitation attraction, etc. The random cube selector is also driven by the frame number and this generates a different random number, based upon the number of cubes in the matrix, every so many frames as dictated by the “Cycle Length”.

A “Conditional Statement” in the Expression Node, like (x < rx) returns either 1 (true) or 0 (false) I then use these to multiply the computed answer for the rest of the expression, obviously (to me anyway) if you multiply any number by 0 you get 0, so no action is taken. Where there are several conditions that must all be met, I multiply all the conditional statements together, so if any one is 0 then they all are failed. Hope all this drivel makes sense! :wink:

I am not sure if this is the most efficient way to do things, but it easily runs in real time on my shiny new Mac! :yes:

It seems that wishing others to contribute to this thread was a forlorn hope, so this will be the last project from me if nobody else is interested in adding to the thread - I will just let the tread die quietly :frowning:

Anyway - here is the blend file - minus the sound, have a play - change some of the settings and see how it looks:

anim-test_5.blend (952 KB)

Any questions, just ask. If you can make it better, or more efficient, feel free to do this and post back your amendments.

Cheers, Clock. :stuck_out_tongue:


BTW the project consists of one cube, one lamp and one camera, no keyframes, no armatures and a few animation nodes… :wink:

You will need Blender 2.79 and Animation Nodes 2 to to run the project…

OK, so my final try with this:

Two sets of empties representing the melody (MIDI Track 1) and the chords played (MIDI Track 2) have F-curves derived from the MIDI file using the old 2.49 script - I really hope we can have an animation node that does this…

Then I made the keys for the top manual - in a random order so they do not tie up with the order of the “notes played” empties (the controls). I then have a script that tells the node tree which key mesh corresponds to which control (I wrote that myself, but it is pretty easy to do) I then have a node tree that does all the rest of the animation.

To get the second manual, I simply copied all the first keys so they have .001 on the end of their name and my method still works for any number of copies, as it ties the controls by track to their keys. I am going to experiment with techniques to play guitar, saxophone, violin, drums, other such instruments based upon the same principle of controls and see where I get to. :eek:

This animation runs at 30fps on my Mac, so real time not problems. If you want to know how I did this, let me know and I will tell… :yes:

I may render this to video, not sure yet, I may wait until we have the required MIDI node, which I am prepared to specify and help with, if someone else could do a little coding as well, I am not an expert in Python. :eyebrowlift:

Cheers, Clockski.

PS. Just got back from Russia - I have never been so amazed by a country and people compared to all the b******t I was told about Russia in my youth. :yes: