It’s been 9 to 15 April 2017. Happy Easter and if you’re in Australia, remember: bilbies not bunnies.
It’s just a couple of days until RYGCBMK◯ comes out and I have just a few shots to go. Looking back at some of the earliest shots I made, they jar badly with the overall “round shapes on black” aesthetic I ended up adopting. The hand-drawn shots also jarred a bit. With the extra time afforded me by the Easter break, I’ve started replacing the most out-of-place crappy shots with nicer updated shots. The replacements often retain the original idea but re-execute it in a way that feels like it belongs with the rest of the reel.
But enough about that. Let’s talk about how to do interpolation between two values in Animation Nodes.
Here’s a shot that I did last night.
As the purple rainbow ball moves across the screen, the small ball move towards it and grow larger. The node setup that places the nodes looks like this.
The key to controlling movement and size is in the Animate nodes. I’m feeding the Time input of the Animate Vector node with a Distance value instead. Instead of changing a value according to how much time has gone by, I’m changing it according to how far the “attractor” object is to a position which is pre-calculated for each ball.
If the ball is closer to (before) the calculated position than the “duration” (a minimum influence distance), the Animate node interpolates towards the “Start” input – the rainbow ball’s position, or a larger size. If the distance is greater than (after) the “duration”, the node interpolates all the way to the “End” position – the small ball’s calculated position, or a resting size.
Animate nodes: not just for animating!
That’s all for this week. I’ll post a mini-update on Monday with the details of where you can see the finished reel, but that’s all for now. Back to it!
It’s been 2 to 8 April 2017. I got a new semi-modular synthesiser this week so I lost a couple of evenings to playing with the new toy adding to the RYG-O soundtrack.
For this week’s shots I moved away from procedural meshes and back to working with lots of duplicated objects. I made a spiral galaxy, swarms of weird little swimming eggs, swarms of psychedelic kidneys and swarms of little balls having arguments with one another.
One of the useful discoveries I made this week was figuring out that I could parent objects to other objects as part of Animation Nodes. The node setup for parenting is even pretty simple.
I used parenting to create the galaxy shot. I started with a spiral-making loop I made on Sunday. I created three sets of spiral objects with different colours of spiral and different sizes of blob. I parented each spiral to a different empty and set the empties spinning, then parented those empties to a master empty which moved them across the screen. Initially all three spiral bits were parented to one empty, but everything rotating at the same rate was dull to look at. It helped a lot to experiment with the rotation using empties as a guide instead of having to maths it.
Also this week I found out that constant updating can be switched off. This is useful when working with thousands of duplicated objects at once. The spiral was slowing my computer down pretty badly.
Over to the swimmy eggs now. Each of the eggs swims towards the top of the screen at a randomised rate which is peculiar to that egg. Of course, when certain aquatic animals like jellyfish or octopodes propel themselves through the water, there’s a push forward then a lag as the “water” absorbs its momentum.
To mimic this, I added a couple of sine functions to make things more interesting – one controls the compression and expansion of the eggs’ shape, and the other offsets to the position to make the motion speed up and slow down. The two sine functions are out of phase – they both have a period of 12 frames, but they reach their respective extremes at different points. The actual node structure that makes this possible is a bit hard to follow, but this is the node setup I used to figure out how to tweak it so that it not only fit the swimming action but the beat of the soundtrack.
Here the complexity of the maths and node tree is kept away from where I have to think about it, and that’s how it should be.
The psychedelic kidney swarm was made possible thanks to Omar Ahmad’s excellent write-up on transformation matrices in AN. I’d wanted to get the eggs swimming in different directions, and that meant having them turn to whichever direction they were headed in. I was getting nowhere with that on Thursday night, but finding Omar’s tutorials inspired me to give it another try on Friday night. Even though I couldn’t get the kidneys to change rotation/direction mid-swim, I did manage to get them turned to face the direction that they’re swimming in a straight line.
Here’s a more presentable version of the swimming trick, where timeOffset (can be positive or negative) is added to the Time input of “Animate Vector” to move the kidney from A to B.
Finally a word about materials! I have been using randomised colours a lot in RYG-O and that means using the Object Info node’s Random output a lot. The problem is that Random only outputs a single random number and I need three (hue, saturation and value) to make an entire colour.
To turn a random number into an entire random vector, I follow the Random output with multiply, modulo and add nodes before they hit Combine HSV. Multiply stretches the incoming range by an arbitrary amount to introduce a little bit more randomness. Modulo clamps the output of multiply to a particular upper limit, effectively setting a range from 0 to the modulo amount. Add offsets that output upward and sets a minimum.
For instance, in the following node setup, my random colours will have saturation between 0.6 (add 0.6) and 0.8 (modulo 0.2 + add 0.6), and values between 0.5 (add 0.5) and 0.8 (modulo 0.3 + add 0.5).
The quantiseHue group does a modulo, multiply, round and divide operation to quantise any random number input to 0.0 (red), 0.166 (yellow), 0.333 (green), 0.5 (cyan), 0.667 (blue), 0.833 (magenta) or 1 (red again). That’s how I’m sticking to my assigned colours. 🙂
26 March to 1 April 2017 has been RYGBMCKO’s most productive week yet. In a couple of weeks when this goes up onto YouTube, you will be able to identify this week’s little segments by things getting very circle-based.
And this week I actually have a minute to talk shop and post some node setups and related screenies. Amazing!
Here is one of the variations of node setup which I use for plotting a circle. For input it takes a range of integers (the values don’t matter, just the size of the range), and it can create a set of points with different radiuses at different offsets around the circle and follow different objects. (obSize, hide and elementAngle are all left over from old versions of the group.)
I started using Animation Nodes for procedural geometry as well as animation this week. Up until now I’d been duplicating objects but not actually making them. The geometry workflow isn’t super obvious but the AN documentation is pretty good. Here’s a loop that draws lines (including a random factor) and its output points to a generated object.
Take the circle values and run them through the line drawing loop, add a colourful material, and get colourful space tinsel!
Or how about a little heartrate monitor?
For this I created a sawtooth wave that synchronises to the 12 frame beat.
I duplicated the blobs with slightly lagged inputs to form a trail, put some glow on it and there we go.
Finally, one of four mandala thingies I made on Sunday alone. Here’s the node setup. It looks complicated but it is super repetitious.
There’s three or four objects being fed into the ringmaker loop. The ringmaker arranges stuff in circles around a reference object with a particular radius, making the objects a particular size, etc. The differences and variations come in the size of the circles, how fast they’re moving around the circle and in what direction, and whether either of those things are changing over the course of the shot.
And this is the output.
Today was the original release day, but after the week I had and with the reel as it currently stands I’m glad I gave myself an extra couple of weeks to learn even more.
Speaking of releases, I’m still on track for showing off the all-singing-all-dancing RYGCBMKO-1 reel on Easter Monday. Even though it’s a progress reel, it’s still good fun to watch. 🙂
Things are very different this week for RYGCBMK◯. Ironically it’s going so well that I don’t have much time to write about it.
Between having a much-needed breakthrough with the soundtrack and playing with Animation Nodes for two days straight last weekend, I went from not having much of a clue what I’m doing to kind of knowing what I’m doing. My confidence is way up and the project has gone from being mildly disappointing and grindy to actually kind of fun. Hurray! 🙂
Something else I’m noticing this week – I’m getting so much more bang for buck out of my loops by allowing things like scale, location and other stuff as input parameters. It’s the difference between a time-saving setup and a truly powerful setup that lets me experiment quickly.
The final product feels less like a movie and more like a progress reel – a little underwhelming at first while I’m figuring things out, but then the fun kicks in once I get my bearings.
Now, I wonder if anyone would be interested in getting their hands on the .blend files after this is all done…