NULL at the end of a network

   2809   10   2
User Avatar
Member
630 posts
Joined: April 2014
Offline
Why is a NULL used at the end of a network, does it tell the network not to evaluate any further; or you can stop evaluating once the network has been evaluated ?
Houdini is Life Cereal, once you had a bowl you can't stop.
User Avatar
Member
39 posts
Joined: July 2013
Offline
It's just a cleaner way to end a network. Instead of “genericsnode2255759” you could label it something like “OUT_amazingFX”, the capitals at the start of the label mean it would appear at the top of a list view. Makes it much easier to reference in other nodes.
User Avatar
Member
630 posts
Joined: April 2014
Offline
Thanks Sean
Houdini is Life Cereal, once you had a bowl you can't stop.
User Avatar
Member
1744 posts
Joined: Oct. 2010
Offline
do note however, that from houdini 14 on, you can use explicit output SOP nodes, which are MUCH better than nulls for this. The reason why is because, what is set as the visible node in a sop network, may not be what you want to output (i.e. if you are debugging and forget to set your visible flag to the output node, you could explode…)

I actually also use nulls in my network inputs to be able to visualize those better too (i.e. I do not like the first node in a sob subnetwork to immediately modify the input, I want to be able to see what the input is from inside). I name these IN_something and color them yellow

Last, nulls are also useful as “hook” nodes. Basically if you have a part of your network that is interesting for some reason (i.e. you reference its bounding box, or try to get an attribute from it), it is a good habit to branch off a null node so that you know that in the middle of your network, there is some interesting data you reference. I color these green, and name them null_someUsefulName

hope this helps!
-G
User Avatar
Member
630 posts
Joined: April 2014
Offline
(i.e. if you are debugging and forget to set your visible flag to the output node, you could explode…)

Gary I don't understand what you mean ?

I actually also use nulls in my network inputs to be able to visualize those better too (i.e. I do not like the first node in a sob subnetwork to immediately modify the input, I want to be able to see what the input is from inside). I name these IN_something and color them yellow

I wouldn't mind if you could explain your method ?
Houdini is Life Cereal, once you had a bowl you can't stop.
User Avatar
Member
1744 posts
Joined: Oct. 2010
Offline
>>Gary I don't understand what you mean ?

Before output SOPs, if you were going over nodes on a subnet (say for debugging an error) then change something, exit the network but forget to set your display flag on the last node of that subnet, you would cook subsequent nodes outside of that subnet with the node you left visible as the actual output node, which may cause unexpected results (for example, if you leave a really hi res version of your mesh, then exit, and have a ton of geometry operations after, you will be cooknig for a while). Output nodes make it so that this cannot happen. if you set an output node inside of a subnet, it does not matter which node is the display node in that subnet, as the output will be driven by the output node (plus it also allows for multiple outputs)

>>I wouldn't mind if you could explain your method ?

if you create a subnet in any sop network, notice how inside, the first items on the subnet are small boxes symbolizing the inputs of your subnet node. If you add, say, a clip SOP right after your first input box, there is no way for you to see what that plug is passing through into your subnet without either disabling your clip node, or exiting the subnet. Adding that null node in between the clip node and the small input box is a way to have a representation of your input geometry accessible in your subnet as is
-G
User Avatar
Member
630 posts
Joined: April 2014
Offline
Before output SOPs, if you were going over nodes on a subnet (say for debugging an error) then change something, exit the network but forget to set your display flag on the last node of that subnet, you would cook subsequent nodes outside of that subnet with the node you left visible as the actual output node, which may cause unexpected results (for example, if you leave a really hi res version of your mesh, then exit, and have a ton of geometry operations after, you will be cooknig for a while).

If I understand you correctly Gary, you are saying if I don't set the last node in a subnet as a display flag I would cook the nodes outside of the subnet, unless I use a output SOP within the subnet then and only then would the network stops calculating once it reaches the output SOP ?

if you create a subnet in any sop network, notice how inside, the first items on the subnet are small boxes symbolizing the inputs of your subnet node. If you add, say, a clip SOP right after your first input box, there is no way for you to see what that plug is passing through into your subnet without either disabling your clip node, or exiting the subnet. Adding that null node in between the clip node and the small input box is a way to have a representation of your input geometry accessible in your subnet as is

I didn't know you could do representation within a subnet, I still don't understand how does adding a null between the little subnet boxes and a clip node add representation ? As well you mention without the null within the subnet, there is no way for one to see what plug is passing though your subnet, how can I see this in practice ?

Houdini is Life Cereal, once you had a bowl you can't stop.
User Avatar
Member
1744 posts
Joined: Oct. 2010
Offline
If I understand you correctly Gary, you are saying if I don't set the last node in a subnet as a display flag I would cook the nodes outside of the subnet, unless I use a output SOP within the subnet then and only then would the network stops calculating once it reaches the output SOP ?

Not quite. What I am saying is that the output SOP is the explicit output node of a subnet, and not having one, houdini will default to whichever node has the blue flag on as the actual output (which could have unintended results). In short, you should always use an output SOP

I didn't know you could do representation within a subnet, I still don't understand how does adding a null between the little subnet boxes and a clip node add representation ? As well you mention without the null within the subnet, there is no way for one to see what plug is passing though your subnet, how can I see this in practice ?

By representation, I mean the ability to see the mesh of a particular subnet input from the inside, before it has been modified by a mesh inside the subnet. Try building a scene similar to the one I explained:

in a new houdini scene, add a geometry OBJ node
dive inside (you should have the default cube)
add a subnetwork SOP, and wire the output of the default file sop to the first input of the subnet
dive inside the subnet
add a clip sop and wire the first input box to the first input of the clip sop
notice how, although you can see your modified cube, you cannot see the unmodified version without exiting the subnet
now add a null node in between the input box and the clip
notice how now you can visualize the first input mesh of the subnet without having to exit the subnet
-G
User Avatar
Member
630 posts
Joined: April 2014
Offline
By representation, I mean the ability to see the mesh of a particular subnet input from the inside, before it has been modified by a mesh inside the subnet. Try building a scene similar to the one I explained:

in a new houdini scene, add a geometry OBJ node
dive inside (you should have the default cube)
add a subnetwork SOP, and wire the output of the default file sop to the first input of the subnet
dive inside the subnet
add a clip sop and wire the first input box to the first input of the clip sop
notice how, although you can see your modified cube, you cannot see the unmodified version without exiting the subnet
now add a null node in between the input box and the clip
notice how now you can visualize the first input mesh of the subnet without having to exit the subnet

Oh This is why nulls are used.

If I understand you correctly Gary, you are saying if I don't set the last node in a subnet as a display flag I would cook the nodes outside of the subnet, unless I use a output SOP within the subnet then and only then would the network stops calculating once it reaches the output SOP ?

Not quite. What I am saying is that the output SOP is the explicit output node of a subnet, and not having one, houdini will default to whichever node has the blue flag on as the actual output (which could have unintended results). In short, you should always use an output SOP

Use an output SOP whether within a subnet node or not, correct ?

Houdini is Life Cereal, once you had a bowl you can't stop.
User Avatar
Member
1744 posts
Joined: Oct. 2010
Offline
Use an output SOP whether within a subnet node or not, correct ?

Correct. IT is just a good practice to do so.
-G
User Avatar
Member
630 posts
Joined: April 2014
Offline
Thanks for the help gray, it was more informative and helpful
Houdini is Life Cereal, once you had a bowl you can't stop.
  • Quick Links