Let's continue to fast track our learning process. I am really itchy to get to the more advanced stuffs, but there are so many things to be explored.
Last time, we know that we can position an object whether it is via: - Direct Vector assignment - Node Object Transform Output - Copying other object transformation - Node Matrix In and Out - Mesh Vertex Positions
TRANSFORMING MULTIPLE OBJECTS
Dealing with multiple objects is more fun, so I will get to the loop in this article. But let's keep it basic shall we?
Let say we have 5 Cube objects. Our intuition says to use "Create Object List" node. We then plug this list into Object Transform Output node.
We are plugging transparent slot into solid slot. Transparent slot means we have list of multiple objects. AN created Get List Element node automatically. When I first use AN, this makes me a bit confused and sad.
However after a little bit digging, I found that we actually need to use Loop Input node.
Loop Input node is a clever hard working node that does this: FOR EVERY "ITEM IN THE LIST" DO "SOMETHING".
Let's have a look how we can use this loop thingy node. Create "Loop Input" node.
It's called "My Loop" by default. You can have many of this node within one node-tree. You can rename it to something more unique and useful later on.
For now, we will do something simple. To make this to work, we need to have either of this: (+) New Iterator (-) New Parameter (+) New Generator Output
Let's add "Object List" as New Iterator. "Object" will appear as a new output.
Where do we plug in the Input, you might wonder? We use "Invoke Subprogram" and select "My Loop" (the loop input name). You could also just quickly load "My Loop" under Subprograms.
Now, we have these two.
Don't get intimidated, let's think of this as a special input and output node.
INPUT: List of Objects
OUTPUT Iteration of Object
Let's create the setup.
Ok when you plug thing like above, you notice all the Cubes go to position 0,0,0 >>> just like we specify under Object Transform. We are getting somewhere.
What if we want to specify 5 positions in 3D space for those 5 cubes? Well, we need to add New Iterator: Vector List.
This is for 5 Cubes at 5 specific positions. A bit tedious but you need to know this before we go to a little bit more advanced.
X NUMBER OF CUBES AT Y RANDOM POSITIONS
If we were to script this, we would probably make program like this: 1. Create X number of cubes. 2. For total of X cubes, place them at random positions.
We will certainly use "Random Vector" node that will give random vector value.
For X total number of Cubes, we will use the new "Object Instancer" node because this node will actually generate objects with specified number quite easily.
The rest of our worry.... "Loop Input" will handle it.
"Random Vector" does NOT actually generate "list" of random vector by default. It will spit only 1 vector value at a time. What I mean is: only if we input an iterative number, Random Vector will then generate list of random vector through the loop.
NOTE: The output of Random Vector is NOT transparent slot. Unlike node that actually generate list of value such as "Float Range".
Plugging in "Index" into "Seed" will actually trigger the node to produce list of Vector values that we can use right away. I am using "Debug Loop" node to be able to see the result.
The rest is pretty easy right? :)
RANDOM SCALING MANY OBJECTS
Continuing from above, if we plug Vector from Value (vector value created from one value input), into the "Scale" of "Object Transform Output".... we will get all objects to be the same scale size.
I wanted to use Float Range that will give random float values within certain range. But as soon as I plug the Float Range into Vector from Value, it creates this "Get List Element" node.
This ALWAYS happens when we are plugging transparent slot value into solid color slot.
We could do the same method: plugging the Index output of "Loop Input" into the "Index" of Get List Element and so as the random cube being generated, the scale will grow from first to the last.
OR, we could actually plug in Float Range node into "Invoke Subprogram" so it will loop without needing to use Index.
To complete this random object placement, I add "Integer Input" node to control both Instances number and the amount of Float Range.
Let see if you can also random rotate these guys? I am sure you can.
POSITION OBJECTS IN LINE
Now, AN node apparently has some quick few nodes dealing with Mesh already. A bit like Sverchok. So it can generate Grid and Line.
Since we know we can use the Vertex Positions of "Mesh" to place objects, we can use what we have learned to create something like below.
Spinning Tower of Suzanne.
Before we are moving to animation, maybe in next articles, I hope you can started to understand the idea of LOOPING / ITERATION.
It's not an easy concept to understand, but you will get it.
It is a long story in itself, but the whole 39 episodes are a great work experience for me, having to work with some talented amazing animators, lighters, vfx artists and developers, taking care of the layout assets until it is ready to be lit.
For The New Adventures of Figaro Pho animations, LUMA TOONS is using Maya for modeling, animation, lighting, pipeline, layouts, vfx, Arnold for rendering and Nuke for compositing.
Is Blender being used at work? Unfortunately not. Pity. Maybe one of the devs are using it, but I don't have access to it. Most of the pipeline are built on Maya, Houdini, Mari, ZBrush, Nuke, and lots of Python scripts.
All in all, I really think Blender Foundation really should be looking into making Animated TV Series like Figaro Pho. While FIGARO PHO is truly "Australian made" (a work of International artists and local born Australian) that one can be proud of.... any works made in BLENDER is even something that everyones can be proud of even more. It's the result of collaboration.
So, Figaro Pho is around 7-8 minutes length per episode, not too long, solid story, fun characters, well directed, with soundtrack, etc.
Blender is certainly more than capable of creating such awesome works, and I know some artists out there are already doing it. Moreover, Blender is such an open collaborative tool, it can be used anywhere.
Working in the industry is nice, you get paid regularly, you meet some nice people, you work as a team, you produce works that you can be proud of, you drink coffee/beer a lot, you do celebrate good times... But I think, apart from that, as individual, you also need to stay and stick and a place where you can continue to learn and study new skills. You do not always get this opportunity or motivation out there. Your attitude and self drive is really important.
I highly recommend you to watch all the NEW 39 episodes of Figaro Pho. There are also some older episodes of Figaro Pho done at different place and time, a bit darker, quality is not as great as latest Figaro but still worth watching. You probably can find on YouTube.
This season 2 of Figaro Pho also has some great VFX, animation and lighting works, it is a good case study for CG artist and storytellers. Maybe you can see it on Netflix soon. At the moment it is only showing on Australian ABC3 TV, can watch it on iView app.
That's my little thought on the whole thing. Now let's get back to the topic...
*ANIMATION NODES (AN) IS ... AN AMAZING TOOL
Just the other day, I stumbled into Jacques Lucke's ANIMATION NODES Showreel 2015 on Vimeo (now the video is also on YouTube --- better for sharing and streaming, as you can watch yourself above). I was hooked.
AN was first launched in September 2014 (first post at Blender Artist), I am really curious of when actually he started writing this AN add-on for Blender. A quick search you will find that the creator of AN is a young brilliant artist, 18 years old from Germany (!).
TIP: Download the add-on as ZIP. In Mac, sometimes Safari automatically uncompressed the zip into normal folder, you just re-compress it and then install the add-on from Blender Preferences.
SVERCHOK x AN?
While Sverchok was born with procedural modeling in mind (I think that's what Nikita envisioned), AN seems to focus more on procedural animation. They both are similar, but with differences. One is so curious what will happen if all Sverchok developers and AN developers put on stage and battle each other, it would be so eye-opening.
Actually both add-ons can "talk" to each other already. Like Zeffi said, "Scripted Node" can help you with this. They both have Script Node too.
You could really make some bunch of points or some procedural MESH construct and let AN takes over the MESH data and do something with it. It's weird how they two works together.
I don't know if anyone can answer this, but in Houdini, I believe we can assign custom attribute to a Point / Vertex, and then that custom attribute gets carried around different node-network. Maybe such thing can happen.
Conceptually speaking, I remember Sverchok developers talked that Sverchok is like the Russian Matryoshka dolls, nested lists and Python. It is beautiful and bad-ass way of thinking data in Python and how Pythonic Sverchok is.
AN probably has its own way of thinking, which we will explore and found out. Maybe "LOOP" and "ITERATION" is key in Animation Nodes.
As soon as you understand that concept, you can make "subprogram". It sounds a bit scary, but it will take you far to advance level from the basics. You can quickly create your own node that iterates or repeats a certain function that process input and output.
Sverchok actually does this too, but the emphasis is different. Not as obvious.
Later on, if I have time to write about this loop and iteration in depth, maybe we will figure out more things together. Because eventually the aim of using tool like Animation Nodes is being able to ANIMATE many objects at once whether using f-curve, or using your own generated values.
In that past, one might have tried to do this using Python scripting and Blender's Drivers. Or perhaps using Particles and Instancing. Then one also tried to use Sverchok, remember that time when we drive Objects using Vertices of Mesh? Yep, you can somewhat do that using this ANIMATION NODES and quite elegant way too... like you always dream of.
So you can tell Blender to do this using this AN: - Hey I have 5 spheres and I want to wiggle them all in random ways - I want to scatter and scale the faces of this polygon mesh at random frames. - Can you drive these objects and automatically animate them to follow this music - Paint objects based on proximity with another object - Open up and animate these hundreds of doors or flaps at slightly offset time - Use "eyedropper" tool, get object in the scene, create clones that follows
If you ask me which one you should learn, Sverchok or AN, you probably should try both and see which one clicks with your brain.
Sverchok handles the mesh components more deeply, while Animation Nodes (AN) will make objects in motions rather quickly and easily.
They both can get complex and create amazing procedural works, but do not worry because if you know what you are trying to achieve, you will get it, someone out there will provide the answer.
While learning this node-based system, you also want to get serious with Python scripting. It is (not) too much to ask, but really by doing so, it will help you a lot to grasp many of the basic concepts such as Data Types, Data Conversions, etc. You will be dealing with values, numbers, float, boolean, integer, strings, matrix, vectors, rotation, list... all those alien stuffs.
If you don't know, there is also tool out there called Processing, now already Processing version 3 that also can help you with learning the concept of programming: https://processing.org
The advantage of nodes is of course you can see 3D objects moving around when you are playing with nodes. It is more interactive and everything is neatly contained as a node that you can noodle together. So much fun:
Ok, I am still figuring out this AN nodes, but potentially I can see this thing go bigger. It already capables of driving and animating thousands of objects procedurally. You can create a complex setup so quickly under few minutes.
MY NODE LEARNING METHOD
Normally when I am looking at yet another new node based environment, I would start by looking at the available examples and video tutorials. Any documentations will help.
Luckily there are quite a few tutorials and demos already from Jacques himself. Lots of silent videos, just the way I like (it makes the user works harder and think about what happening!).
Remember that Node-Based workflow is a visual thing, so normally you can see how things work if you get the BLEND file.
Of course the node-tree WILL get super complex at some point, when it does stuck, you are looking at the wrong examples. You need to understand and start building basic simple node tree first.
STRAIGHT JUMP INTO IT Create a new node tree and Shift+A to check the available nodes. There are 170+ nodes already (Jacques said 179 animation nodes).
Ctrl+A allows you to quick search node by letters or words. Useful when you are more familiar with the nodes and remember it by name or if you want to guess the node name.
At this point, I think the node does not come with help or decription (?). There might be already documentations written only for every single node, one just need to find it. Some nodes are self explanatory, if you have some coding/programming background.
Object Replicator (OLD) is now Object Instancer:
Watch Out: Mind you that this Add-On keeps getting updated from time to time, and some node network might change. This is the nature of the beast.
EXAMPLES AND TEMPLATES
In latest AN add-on, which I installed yesterday, it comes with lots of useful "Templates". I actually missed this until I watched one of videos. Anyway, I should point this out:
KNOW HOW TO DEBUG (AND ASK)
I have only tested this AN add-on for a day. However, I found that it does fail sometimes, need refreshing or re-invoked in order for the setup to work.
There are some "debug" nodes in AN that you can use to see the data. This is very helpful.
Eat your Apple...
I will definitely get stuck and need to ask the developers, or ask other artists. Blender Artist forum, especially the AN thread is a good place to ask. It is so easy to lose track sometimes.
DO WRITE YOUR OWN NOTES Blogging is good, especially if you are learning something. Very likely you will help yourself to keep in track of what you are learning, and helping others at the same time.
Really, lots of ideas come out of the blue when writing. Sometimes I still write and draw using pen and paper too. It is strange how our brain works, that.
I recommend you to do this, go to local public library, immerse yourself amongst strangers, get a good computer, download Blender, and start doodling there. Show off what computer and Blender can do in public.
TEST, MAKE MISTAKE, AND DO IT AGAIN UNTIL IT WORKS (REPETITION) Just like writing programs, you learn by writing it. Not so much of memorizing how to write the program, but to understand the concept of what is going on, spot a problem, solve the problem. You will soon find out that there is not one way to accomplish one thing, but many ways.
Collect bit and pieces of simple good node networks, and combine them to do something complex. Every little bit you make can be useful for others.
WHAT IS NEXT Of course, the only "issue" is to find time and aim to learn and re-learn all this. The tools that Blender has provided, and this kind of awesome node-based add-on, is seriously under utilized sometimes.
Hopefully I could dedicate my time in the next few months to study this AN, sharing some findings, and make some use of it. I am a year behind of following the ANIMATION NODES thread. There are already some others Artist Developers with big interest with AN development, already sharing lots of cool stuffs.