This week there I have made my own version of the bend node (sop). I had the idea for it some time now, but never made it. So the node will automatically bend any geometry is gets as input. Since I'm doing a lot of modelling in Houdini at work this could be very useful. The issue I have with the default bend node in Houdini is all the setup work you will need to do.
I'm also started preparing for the Everything Procedural Conference. Super proud to be a speaker at the event. The talk will be about how Houdini is used in an indie studio.
Quick bend
The node will automatically find the size of the object you plug in there and bend it. To make this yourself, I started with the started bend node. At the beginning I was going in there and start adding lines of VEX. But later I found that it was better to use expressions in the started bend node.
This is a gif of the result, Alien panel is from Substance Source. Next week there we be a polish pass on it.
Bounding boxes
The first thing to do here is getting the bounding boxes of the object you want to bend. In VEX you would type
getbbox_min(0); //VEX
You will need this if you decide to adjust the wrangle of the bend node.
You can also just do it with expressions and the line can be used in a variety of nodes/sops.
bbox(0,D_XMIN) //expression
This will return the smallest point on the X-axis. Based of course on what the axis you type you will get different results. Similar versions of these are XMAX and XSIZE. Like I just mentioned you can use this in other nodes as well, for example use it in the duplicate node, where you automatically detected the offset to copy the next model.
Export handler
Something that was interesting is making custom handlers. This is very useful if you are making HDA’s and have interactions with the viewport. For the quick bend there is a handler that controls a direction of bending. The easy way of creating these handles is by right clicking on an already existing handler and click export. This video shows how to do it. The more manual way is by going in the parameter interface and go to the handler tab. Here you have the option the create a variety of handlers. You will also need to assign parameters to the handlers, so the handler knows what data to read and write.
https://www.youtube.com/watch?v=J8hwiYkBnQc
Get point attributes
As last a small line of code that came handy was the point expression. With this you can get the value of an attribute. If you make your own attributes and you want to access this in a transform sop, you will not type @MyAttribute. This makes sense because attributes are information that is stored on points, prim,.. So by doing a @MyAttribute in a transform sop, the sop doesn’t know what point to look at as each point in the model can have a different @MyAttribute value. Attributes are not variables that you call everywhere. By using the “point” we can access the attribute of a specific point number.
point(0,0,"example",0) //fill this in the scale of the transform sop
Thank you so much for taking a look and a read at the blog!
Hopefully see you next time.
If you have any thoughts or feedback feel free to share it.















