4
$\begingroup$

I am new to the animation nodes addon. What exactly is node tree execution?

It seems to be necessary for the updating of the 3D view, which is strange because when using Cycles nodes, everything updates automatically. The tooltip says "Execute all main networks in the tree" - what is a "main network"?

By default "Auto Execution" is checked and set to "Always", which eats up my CPU. When is it not enough to use the tree/frame/property changed options?

enter image description here

$\endgroup$

2 Answers 2

9
$\begingroup$

Execution:

When you build a node tree in the Animation Nodes addon (AN), you are basicly creating a python script in a visual form.

Now you have to control when this script will be executed. If "Auto Execution" is turned off the script you "developed" only executes when you click on the Execute Node Tree button.

Many of the buttons you see in Blender have python scripts attached to them which execute when you click on them. It is the same here, only that you didn't had to write any python code. It is generated from your node setup by the addon.

Networks:

A network within animation nodes of a group of nodes that belong together. You can have multiple node trees. In cycles each node tree can have only one material, but in AN you are allowed to have multiple networks within a single node tree. Nodes that belong to the same network have the same color (well, there are exceptions but they are not important here).

There are two different types of networks:

  1. Main Networks, which they have a neutral gray color by default
  2. Subprograms, which have a random color by default (this color can be changed in the Color panel when one node of this network is selected)

Beside that there are some subcategories of the Subprogram Network type: Loops, Groups, Scripts.

Subprograms cannot be executed on their own, they need to be called from somewhere else. You normally call them with the "Invoke Subprogram" node.

Main networks on the other hand can be executed on their own. This makes them the entry point of the node tree execution.

Auto Execution:

In some cases you may want to have total control about the exact moments your node tree is executed, but most of the time (when you do animation or something similiar) you want that the scene updates automatically when you change the node tree. This is where Auto Execution comes into play.

When Always is checked the script continuously executes (around 20-60 times per second (can also be changed with the Min Time Difference slider)). This gives you a good real time experience in the viewport but as soon as your node tree becomes more complex this permanent execution can slow down your scene drastically.

If this is the case you should uncheck Always and think about when you want that your script executes. If you do animation you want to check Frame Changed most of the time so that the animation playback works. If Tree Changed is checked your script will automatically executes when you make/remove nodes/links. And if Property Changed is checked the script runs when the you change a property of a node.

Which configuration of settings you choose here is totally up to you.

$\endgroup$
0
$\begingroup$

The "execute node tree" button is like actually running/applying your nodes to the object. If you have it update every frame of your computer, is has to try to calculate everything you told the computer to do for that object constantly, which eats up all your resources. If you have it update only when you change something, it is not constantly trying to load the changes, and only does when you change something. If you only have it load when you click the "execute node tree" button, it won't eat up your cpu unless you tell it to.

The best example I can think of is the "rendered" view-port mode in Blender. Every time you move the screen or change something, it starts re-rendering. This can be annoying for working, because the computer gets taxed every time you try to do something. If you have it so that the node tree is constantly updating, that is like playing the animation. Every frame, it starts rendering again, and it is almost impossible to get work done (unless you have a good computer). If you make it so it only executes when you push the button, that is like leaving "rendered" view-port mode, then pressing render when you're ready for a test render. So all these options can be good, just depending on what you're doing. (just like viewport rendering can come in handy, but you don't always want it on).

I hope this helps clear things up.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .