Hi everyone!
I am studying the subnet node right now. Here i have some questions about it. Hope you guys can give me a hand. Thank you!
After the subnet being created, how can i add other nodes into it or move the inside nodes out at different levels? I mean that the functions of the subnet willnot be affected by doing this way.
Another question is that how to dismiss the subnet and relieve the inside nodes? And i am not sure whether the subnet can be dismissed or the inside nodes can be relieved.
The last question is: If the Digital Assets have been created, can i take the above steps?
Questions about Subnet Node in Houdini
16485 15 5- Williamkailun
- Member
- 7 posts
- Joined: 1月 2007
- Offline
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
After the subnet being created, how can i add other nodes into it or move the inside nodes out at different levels? I mean that the functions of the subnet willnot be affected by doing this way.
To add operators inside the subnet, you dive in to it. Select and hit enter or i for in, RMB Menu >Edit Subnet or use the path at the top of the network pane and hit the -> with the subnet node selected.
To dive up a level out of the subnet, just hit the u key or again use the path navigator.
Another question is that how to dismiss the subnet and relieve the inside nodes? And i am not sure whether the subnet can be dismissed or the inside nodes can be relieved.
There is a menu option right on the subnet node. RMB menu > Extract Contents.
If the Digital Assets have been created, can i take the above steps?
Yes, you need to unlock the Asset first. Again MMB menu > Allow Editing Of Contents followed with the RMB menu > Extract Contents.
There's at least one school like the old school!
- Chirimoya
- Member
- 30 posts
- Joined: 1月 2015
- Offline
I have the same question that I will try to put in my own words.
How can I move an existing object from root level to an existing subnetwork while maintaining dependencies (expressions on parameters for example).
My first idea was to cut and paste the node from root level to subnetwork level, but this will break expressions.
The other idea was to extract the subnet content, then do a new subnetwork, but this is problematic as well for the same reasons and more.
In code, I wanted to parent and objet from root level to an object in subnetwork level. I used this line of code, but it fails since both object are not at the same level I think..
oChild.setInput(0, oParent)
Any Ideas on how to do this?
How can I move an existing object from root level to an existing subnetwork while maintaining dependencies (expressions on parameters for example).
My first idea was to cut and paste the node from root level to subnetwork level, but this will break expressions.
The other idea was to extract the subnet content, then do a new subnetwork, but this is problematic as well for the same reasons and more.
In code, I wanted to parent and objet from root level to an object in subnetwork level. I used this line of code, but it fails since both object are not at the same level I think..
oChild.setInput(0, oParent)
Any Ideas on how to do this?
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
If it is the object level reference you want, you can use a Fetch Object to fetch the actual position in space of another object anywhere in the scene.
What makes the Fetch Object interesting is that it can be free of any constraints itself as it will fetch the target object position from anywhere.
Is that in the right direction?
What makes the Fetch Object interesting is that it can be free of any constraints itself as it will fetch the target object position from anywhere.
Is that in the right direction?
There's at least one school like the old school!
- Chirimoya
- Member
- 30 posts
- Joined: 1月 2015
- Offline
Hi Jeff,
Thanks for your answer.
What I was looking for is a way to move my hierarchies from networks to subnetworks and vice versa without destroying and recreating nodes and relations between them. I'm not sure it is possible.
The Fetch node is not exactly what I was looking for, but I think it will help me in other parts of my learning process Thanks again, I will have a deeper look into this node
Thanks for your answer.
What I was looking for is a way to move my hierarchies from networks to subnetworks and vice versa without destroying and recreating nodes and relations between them. I'm not sure it is possible.
The Fetch node is not exactly what I was looking for, but I think it will help me in other parts of my learning process Thanks again, I will have a deeper look into this node
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
Chirimoya
Hi Jeff,
Thanks for your answer.
What I was looking for is a way to move my hierarchies from networks to subnetworks and vice versa without destroying and recreating nodes and relations between them. I'm not sure it is possible.
The Fetch node is not exactly what I was looking for, but I think it will help me in other parts of my learning process Thanks again, I will have a deeper look into this node
Your post implies your have another departments asset maybe ?. Your approach should be to suck out the geometry and transforms you need into your “ container ” . Taking your approach if your supplied asset changes which they do countess times in production you would back yourself into a corner and be left rebuilding everything again and again , which would be futile.
rob
Gone fishing
- Chirimoya
- Member
- 30 posts
- Joined: 1月 2015
- Offline
Hi Rob,
In fact, I'm not using another's department's asset. I'm just trying to learn rigging in Houdini.
Changing hierarchies is something that happens a lot when developing a rig. I've made myself a button to speed up the workflow of parenting objects.
Basically, my button does this:
for oObj in oColl:
oObj.setInput(0, oParent)
But it gives me errors when trying to parent to an object that is not in the same network.
I've looked into the code of the shelf tool to parent objects, but the behaviour is not what I'm after as it will create a “fetch” node and parent the child to this node if parent and child are not in the same network to begin with. I understand why sometimes we would want this, but right now I just want to move my hierarchies for organisation purposes.
Anyhow, I think I will have to use one of the workarounds that I have talked about earlier in the thread.
Also, in the simple biped rig provided in Houdini, there is a note saying to avoid asset nesting as it can slow down the rig. I'm not sure if this refers to using sub-networks, but I suppose it is good practice to avoid them. However they seem useful for organisational purposes..
In fact, I'm not using another's department's asset. I'm just trying to learn rigging in Houdini.
Changing hierarchies is something that happens a lot when developing a rig. I've made myself a button to speed up the workflow of parenting objects.
Basically, my button does this:
for oObj in oColl:
oObj.setInput(0, oParent)
But it gives me errors when trying to parent to an object that is not in the same network.
I've looked into the code of the shelf tool to parent objects, but the behaviour is not what I'm after as it will create a “fetch” node and parent the child to this node if parent and child are not in the same network to begin with. I understand why sometimes we would want this, but right now I just want to move my hierarchies for organisation purposes.
Anyhow, I think I will have to use one of the workarounds that I have talked about earlier in the thread.
Also, in the simple biped rig provided in Houdini, there is a note saying to avoid asset nesting as it can slow down the rig. I'm not sure if this refers to using sub-networks, but I suppose it is good practice to avoid them. However they seem useful for organisational purposes..
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
Also, in the simple biped rig provided in Houdini, there is a note saying to avoid asset nesting as it can slow down the rig. I'm not sure if this refers to using sub-networks, but I suppose it is good practice to avoid them. However they seem useful for organisational purposes..
This refers to using actual HDAs (HoudiniDigitalAssets) inside your rig. Feel free to use subnets at will to organize your rigging pieces. I do.
Just be sure that when you create your final rig HDA to directly promote parameters to the top and not nest your channel references multiple times. This will cause cascading evaluation of contained nodes.
The current issue is that if you have nested channel references where you first push channel references to your internal subnet nodes (or HDAs), and then reference those parameters on the internal subnets to the top subnet (whether it's just a subnet or an actual HDA, same thing) and you change the top level parameter driving the subnet, all the nodes inside that subnet will evaluate.
In other words, if you have the following two cascading parameter references:
parm > /obj/my_char/limb_subnet/limb_ty = ch(“./my_child_object/ty”)
parm > /obj/my_char/limb_ty = ch(“./my_limb_subnet/limb_ty”)
Modifying the top parm “limb_ty” will cause all nodes inside /obj/my_char/limb_subnet subnet node to evaluate due to the way parameter references are updated.
Just do direct ch() parameter references from base node to the top at this point in time.
Phew. Hope that's understandable…
There's at least one school like the old school!
- Chirimoya
- Member
- 30 posts
- Joined: 1月 2015
- Offline
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
What I was looking for is a way to move my hierarchies from networks to subnetworks and vice versa without destroying and recreating nodes and relations between them. I'm not sure it is possible.
So you have a rig bit that contains a few Objects parented together and you want to make a duplicate node network but put them in a subnet, while keeping all the references?
This should work…
Try the following:
- grab your nodes and ctrl-C copy them.
- press the “Create Subnet From Selected…” button from the network pane top icon bar to put the nodes in a subnet.
- still in the root starting directory, paste the original nodes back ctrl-V
Now you have a subnet with your rig nodes, with all channel references and dependencies intact along with the original nodes that you started with.
Is that kinda what you are looking for?
As an aside, when you take any nodes and either subnet them or turn them in to an asset, Houdini will resolve all dependencies and in the case of HDA's make all the absolute channel references relative to the parent subnet container. This makes it easy to collapse nodes with multiple dependencies in to a subnet folder and continue working.
Additionally the subnet node container has a few options as to determine which contained node to use as the output child transform.
There's at least one school like the old school!
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
- Chirimoya
- Member
- 30 posts
- Joined: 1月 2015
- Offline
Hi Jeff,
What you are describing is not exactly what I'm trying to do. I'm looking for a way to move nodes from a network to another existing network.
For instance, in the attached image. How would you move “Sphere” and its children in subnet1 in order to parent it to another node in subnet1, while keeping the expressions and relations “from” and “to” them.
I hope my question is clear…
I guess that what I want is maybe a little bit in contradiction with the concept of relative references… In fact, I would like the relative references to update themselves while parenting to other networks so existing relations do not breakup. Does that make sense?
What you are describing is not exactly what I'm trying to do. I'm looking for a way to move nodes from a network to another existing network.
For instance, in the attached image. How would you move “Sphere” and its children in subnet1 in order to parent it to another node in subnet1, while keeping the expressions and relations “from” and “to” them.
I hope my question is clear…
I guess that what I want is maybe a little bit in contradiction with the concept of relative references… In fact, I would like the relative references to update themselves while parenting to other networks so existing relations do not breakup. Does that make sense?
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
Clear as mud and I was skirting the issue.
And wouldn't it be wonderful if you could just drag-n-drop those two objects inside that subnet and the references are kept…
Please submit the RFE for Drag-and-Drop of nodes in and out of subnets and update all their references. Include your image and your description above.
The workaround is kinda ugly but does work effectively. Arguably much faster than manually reforming all the dependencies:
- Extract Contents of the subnet.
- Select the exploded nodes and the additional nodes.
- Create a new subnet on the new selection.
Done.
All the references are kept which I would argue would also be the case if we were to support the drag-n-drop of object nodes in and out of subnets.
One approach to not getting in to this case is to do what I do: Create your subnet wrappers first, dive in and do your work in there. As best you can of course. That way you are a couple steps away from creating an HDA at any time which I defer as late as possible in the design of an asset.
And wouldn't it be wonderful if you could just drag-n-drop those two objects inside that subnet and the references are kept…
Please submit the RFE for Drag-and-Drop of nodes in and out of subnets and update all their references. Include your image and your description above.
The workaround is kinda ugly but does work effectively. Arguably much faster than manually reforming all the dependencies:
- Extract Contents of the subnet.
- Select the exploded nodes and the additional nodes.
- Create a new subnet on the new selection.
Done.
All the references are kept which I would argue would also be the case if we were to support the drag-n-drop of object nodes in and out of subnets.
One approach to not getting in to this case is to do what I do: Create your subnet wrappers first, dive in and do your work in there. As best you can of course. That way you are a couple steps away from creating an HDA at any time which I defer as late as possible in the design of an asset.
There's at least one school like the old school!
- Control_Vertex
- Member
- 162 posts
- Joined: 5月 2015
- Offline
For future references,
I found a command that works:
hou.moveNodesTo(nodes, destination_node) -> tuple of Nodes
https://www.sidefx.com/docs/houdini14.0/hom/hou/moveNodesTo [sidefx.com]
Some programming has to be done if we want the descendants to follow the nodes being moved and to restore the selection as it was before calling the command (specially if it contained nodes being moved because the command destroys the original nodes being moved and also forces a selection on the new moved nodes).
Also good to know is the fact that the moved nodes might move in space since the “Keep position when parenting” preference does not seem to be considered…
Cheers
I found a command that works:
hou.moveNodesTo(nodes, destination_node) -> tuple of Nodes
https://www.sidefx.com/docs/houdini14.0/hom/hou/moveNodesTo [sidefx.com]
Some programming has to be done if we want the descendants to follow the nodes being moved and to restore the selection as it was before calling the command (specially if it contained nodes being moved because the command destroys the original nodes being moved and also forces a selection on the new moved nodes).
Also good to know is the fact that the moved nodes might move in space since the “Keep position when parenting” preference does not seem to be considered…
Cheers
- MarcoMeeuwse
- Member
- 5 posts
- Joined: 9月 2015
- Offline
Hi all,
So regarding the subnets. When creating a subnet or small intern tool, would you copy that subnet and drag and drop it in somewhere else in the network where it is useful? or would you reference/instance it. Like you would create a function in code. Creating a function in code would cause the whole thing to run faster if used a lot. Would that be the same and efficient for referencing a subnet.
I created and referenced some subnets and by looking a cooking time it seems slower. So I'm questioning if I did something wrong.
In addition, is there a way when adding parameters and adjusting those on a node, that the referenced copies adept to the changes from the node to reference.
Hope that's written in common language.
Thanks in advance
M
So regarding the subnets. When creating a subnet or small intern tool, would you copy that subnet and drag and drop it in somewhere else in the network where it is useful? or would you reference/instance it. Like you would create a function in code. Creating a function in code would cause the whole thing to run faster if used a lot. Would that be the same and efficient for referencing a subnet.
I created and referenced some subnets and by looking a cooking time it seems slower. So I'm questioning if I did something wrong.
In addition, is there a way when adding parameters and adjusting those on a node, that the referenced copies adept to the changes from the node to reference.
Hope that's written in common language.
Thanks in advance
M
- AnimGraphLab
- Member
- 66 posts
- Joined: 5月 2019
- Offline
MarcoMeeuwse, you can create a custom shelf and add (drag and drop subnet/hda/Geometry node) your tools there: Pixel Fondue: Houdini | Create Custom Shelf Tools [www.youtube.com] 🙂
Edited by AnimGraphLab - 2023年7月1日 12:25:53
Generalist. Transforming still images to 3D animation 🔮
Socials: https://linktr.ee/AnimGraphLab [linktr.ee]
Socials: https://linktr.ee/AnimGraphLab [linktr.ee]
-
- Quick Links