Anyways, let's continue with our AN animation topics.
This article is particularly "boring" but I need to write about it because it is actually important. If you think you know about all these and you rather skip, you should not!
F-CURVE & INTERPOLATION
I have written about this in the past, but I like to explore this in AN context.Let's assume that every object in Blender has the default of 9 attributes we can keyframe. Supposed we MANUALLY keyframe using hotkey I and choose LocRotScale.
When I talk F-Curves, it means a Curve that represent animation like you see in Graph Editor for a single or multiple channels.
BELOW: I am selecting one channel / attribute, the Loc X of Cube. Curve represented in red, it has 2 keyframes.
Interpolation is smaller components that mades F-Curves, it's the "in between" curve. You can pick one preset interpolations and assign it to a keyframe.
BELOW: all the interpolation options you can have for keyframe.
We could observer the FCurve created for this one object like below:
First, use "FCurves from Object" node.
NODE: FCurve Info
Using "FCurve Info" node, we can get a bit of details of FCurve related with this object.From keyframed default Cube:
- Data Path will give you output like: location, rotation, scale.
- Array Index will let you know if the data comes as 1, or 3 (vector), or more (?).
Don't be surprised when we see "Get List Element" node suddenly pops out. Because we are very likely dealing with multiple items / list of FCurves.
What even more interesting is when we add Custom Attribute, maybe called "prop" and we can see this also using the setup above.
Watch the output in the "Debug" node. It is described as ["prop"]. Or whatever you name this ["customAttribute"].
NODE: FCurve Keyframes
This is a very straight forward node, it will spit out Keyframes FRAMES (position in time) and VALUES. Very handy and you will use it some point.
NODE: Evaluate Curve
One more node can be useful for us to "evaluate" or to spit out VALUE, based on position in TIME (Frame). The "Frame" option can either be "Absolute" or "Offset". You use Absolute if you want to specify the exact frame and want to find out what value at that frame. Use Offset if you want to take consideration the TICK in the timeline.CONCEPTUALLY SPEAKING...
In node based system, you are basically generating, modifying, sampling, mapping values. And everything you see and control are Driver and Driven attributes.
DATA PATH & ATTRIBUTE VALUE
There are nodes that deal directly with value of attributes in that X point in time.For the input field, you type in: location, rotation_euler (!), scale, or ["prop"], or ["whatever"] custom name. Hover any attribute in Blender property panel if you are unsure about the exact attribute name.
NODE: Interpolation From FCurve
We can apparently turn an FCurve into interpolation and the range become 0-1, like below:
There is also "Mix Interpolation" node that comes in handy if you like to mix 2 kind of interpolations. The possibilities are endless, but if you are like me, I found this overwhelming at the moment.
In fact for most animation purpose, probably you rather worry about Action and NLA style block animation that you can mix and match and offset. I will have to consult AN developers and see if this is something they have in mind to make.
I did saw this video from ElinterCambiador YouTube channel that uses AN to offset NLA:
https://www.youtube.com/watch?v=0uP0cRJhoBg
Observing Wiggle Animation + Set Keyframe >> Baking
Wiggle Animation is the most basic but rather cool procedural animation we can do really easily using AN Wiggle node, because it just works when we plug Time into Evolution and the value changes overtime to drive any atttribute.Wiggling or any other procedural animation, we will soon want to "bake" it as FCurve. And for that we use "Set Keyframe" node.
It is a stand alone node that just do the job, if you provide it with the right "attribute name". Below, you see I am telling it to keyframe "location" attribute, but all 3 values of location. I know it because of the -1 in the value. You can assign 0, 1, or 2, to keyframe individual attributes
There are also some Boolean type options that you can use to further control this "Set Keyframes" node let say, perhaps you want to keyframe between frame 50 - 100 only:
IMPORTANT POINTS SO FAR...
There are 2 types of animations:
1) Manual Keyframe Animation
2) Procedural Animation (auto generated) via expressions, premade node, etc >> AN nodes will help you to do this.
AN nodes animation will override the existing animation. It works like Drivers.
AN nodes animation can be baked into f-curve.
Values + Time >> Keyframes >> Interpolations >> F-Curve >> Action >> Animation
When it comes to AN or any kind of node based animation, we will often deals with components of things. And things can feel complex very quickly, especially when dealing with lots of objects.
A good way of thinking, I think is to break things down to a single task for one object, then we can expand from there.
BELOW: Baked Sine Wave motion using Expression node. I like seeing the animation being baked with the playback running.
COMING SOON....
What I would like to cover next might more on:
- AN Useful Snippets (!)
- How AN can be used to generate mesh like Sverchok
- AN Group Loop
- AN PyNode
- AN node creation
- More on animating Text, because Text is interesting case
AN Animation Nodes is really powerful, even I still know so little, but lots of potential here.
Like a Sverchok.... |
Post a Comment