The battle of the IF node / Houdini

Houdini is now on version 15.5. The tutorials I am going through are from version 12, maxing out at version 13. This isn’t a problem until he tells you to do something and you literally can’t. Well you can, but you don’t know how and the knowledge you have so far isn’t enough. So what do you do? You hit up Google! But, that’s where I have hit a dead end.

Today I was following a tutorial which is part of the Next Steps module called Hoses and Pipes. The Pipes section was awesome and everything was going really well. Then we started the Hoses section. Right off the bat he starts talking about VOPSOPS, which after a little Google search, I learnt have now been tossed and Houdini now is using Attribute VOPS instead. So I added one of those and we were off. Dropped down my compare node, a subtract node, another compare node, plugged that into a OR node. Things were going well! Then I was told to add an IF node. My IF node looked nothing like the IF node in Houdini 12. I decided not to panic, I plugged my condition into the if_begin node, plugged my ptnum into the first var input and that’s where it ended for me. The tutorial goes on by diving down into the IF node and adding a Add Point To Group node and that was something I couldn’t do in 15. There wasn’t even an Add Point To Group node so I went back to Google.

After searching for basic usage of the IF node, to scrolling through images, to reading the Houdini help on IF nodes I was still stuck. So I just started plugging things in. I literally just plugged and played for about an hour and a half, until I hit the jackpot! And this is what I want to share today!

I plugged my or node output into the condition of the if node and plugged in the ptnum of the geometryvopglobal1 into the var1 of the if. That much I was certain about. I then had to add a Set Attribute node and plug the var1 of the if node into the i1 (point or primitive number) input of the Set Attribute node. On the Set Attribute node I had to set the Attribute Class to Point Group and change the Attribute from Cd to the name of the group I wanted. In this case, end_pts. After all this, I had a group created called end_pts but no points were in the group. Eventually I middle mouse clicked the value input of the Set Attribute node and chose Constant. I set the value of that Constant to 1 and BAM! I had a group created with my 2 little points inside.

I hope that makes sense, and I hope if anyone is stuck with IF nodes in Houdini this can help you.

Like what you read? Give Lawrence Jaeger a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.