Jump to content
4n7

Position bends after previous bend unfolding box

Recommended Posts

Is there a way to position a bend modifier on a piece of geo that is also being bent so it is relative to that piece?

I'm trying to make a procedural folding box but stuck on this overlapping part

I position the first bend to be at the end of the first segment extrusion, the second bend at the end of the second segment extrusion

If I change the bend amount of the first section the second part stays in it's original position. I can't see in the bend parameters anywhere to set this?

 

I've tried searching for guides on this but most seem to be unfolding polygon objects, I'm not sure if this approach will work for this

I'm using 18.5.351

Thanks in advance

1.png

2.png

fold_out_01.hipnc

Share this post


Link to post
Share on other sites

Heyo, took a quick look and I think I've made it work.
The main reason this is happening is that your original solution, creating a reference to the box's length and the extradition height to get the capture origin, does not take into account the angle and position change that changing the bend amount introduces and so the bend freaks out. However, for this to work you'll need to proceduralize all the three main parameters of the bend (I say main, they are the parameters that I mainly use at least), the "Capture Origin", the "Capture Direction" and the "Up Vector".

The Capture Origin, as the name implies, is there the bend modifier places its origin form which it will try to modify your geometry. To get this procedurally I simply took your "extrudeFront_tray_width_top" polygon and averaged the position of all of the points. This way, even if the bend angle changes, you'll still have this one polygon since it's created procedurally and ends up in that group procedurally thanks to your setup. 

Next is the Capture Direction. I like to think of this as a "forward" axis, in this case, forward relative to the direction the "extrudeFront_tray_width_top" polygon is facing. For this, I simply used the facet node to generate normals for the points of the "extrudeFront_tray_width_top" polygon and once again average them to get the direction.

Finally the Up vector, I don't know how familiar you are with Houdini and math in general, but depending on that this might be the trickiest one to calculate. Essentially what the Up vector does is it helps the Capture director orient itself in relative space, meaning relative to the geometry, not to world space. The reason we need to proceduralize this is that the Capture Direction and the Up Direction can never be the same, if they are then you run the risk of getting a vector flip (my own term, no idea if there is a better name for it), in your setup it manifests itself as the second bend suddenly going from bending inwards to bending outwards when the first bend nears 90 degrees.
Now the way you fix this and create a procedural Up vector is to take a cross product of the Capture Direction vector another vector (in this case I just used 0,0,1. However you might want to look into proceduralizing that or else you'll have to change that in the future if you want to rotate the box). A cro ss product basically takes two vectors and finds a third vector that is 90 degrees off from both of the vectors you gave it. See this for more in-depth info on the topic. 

Hope it helps, and if my explanations were kind of strange, which I bet they were, I hope someone can come along and explain it better.
If you have further questions just tag me and I'll hopefully see it and I'll jump back in here and try to answer the question to the best of my ability.

(Note, I opened this with Houdini 18.0.460 so there might be some version-specific changes to nodes, sorry about that. If you want you should be able to copy in the nodes I added into your original scene or recreate the changes in your own hip for better practice.)

fold_out_01_mnb.hipnc

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks ever so much for you clear and concise answer, yes this is exactly what I was after. I'll have a re-read of this post and go through the nodes you've added.

I'd seen Fianna's bend video and couldn't work out how the multiple bends were configured on the pipe, I thought it was possible to keep a start position and orientation, but couldn't figure which control was doing this.

I'd realised the position wasn't working but wasn't sure how to fix it, I'd started to blast all but the last face, collapse that into a point but still had no idea how to reference that to the bend.

I'm still getting my head around Houdini when I can

Thank again, much appreciated

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×