Connect The Yarns – With the PBD Solver

comments 34
Free Tutorials

This time Manuel is talking about a straightforward way of dynamically connecting simulated yarns. Although, this can be achieved with the wire solver this tutorial uses the PBD solver (grains) in Houdini to simulate the yarns, as it’s easier to work with and gives nice results, quickly. Especially as collisions between yarns are not important here.

The setup is mainly realised using VEX in different Wrangle nodes. Follow the tutorial to get a hang on using VEX in the SOP and in the DOP context. Instead of using a SOP solver Manuel uses geometry wrangles in DOPs to generate geometry on the fly.

Download the scene file

Liked it? Take a second to support Manuel on Patreon!
Become a patron at Patreon!

34 Comments

  1. Hey guys,
    thanks again for a beautiful tutorial! Would you be able to share the kind of knowledge-path that led/inspired you to such technique ?
    For example do you have any particular PDB solver resources that helped you gain the necessary knowledge ?
    The Houdini help is frankly quite terrible (not very clear and misses to explain the connections of a node and others etc) imho…

    Cheers !
    T

      • awesome resources! was there also anything houdini-related that helped you understand how the solver/forces/constraints work (in the Houdini nodes) ?

        • Unfortunately there is very little resources about the inner workings of DOPs. One good video I remember is the fluid masterclass by Jeff Lait. You can find it on vimeo on the SESi go procedural channel. This explains quite a bit about DOPs. Same holds true for the grains masterclass by Jeff.

  2. Michele Spaliviero

    Hi Manuel,

    thanks for the tutorial, it looks amazing as always, unfortunately I’m stuck at the beginning and can’t find a way out!
    In the first point wrangle (add_yarns), I wrote the code exactly like you, and yet, it looks like the “opinput1_P” doesn’t work, because instead of adding the other 50 points, it uses the origin point.
    Any ideas on how to fix this?

    btw, I’m using H!5, not H16.

    Michele

    • Hi Michele, this sounds strange. Please try the standard technique to retrieve the P value of the points from the second geo stream and tell me if this works. Instead of opinput1_P use vector tarpos = point(1, “P”, @ptnum);

      Best Manuel

      • Michele Spaliviero

        Hi Manuel,
        thanks for the quick answer, I tried it but it still doesn’t work,it tells me there’s a syntax error, I wrote the first string this way:

        int npnt = addpoint(0, vector tarpos = point(1, “P”, @ptnum));

        I’m still very new on Houdini and I’m not that familiar with VEX so maybe I made just a dumb mistake

        • Hi Michele,

          you got this wrong 🙂

          try

          vector tarpos = point(1, “P”, @ptnum);
          addpoint(0, tarpos);

          Best Manuel

    • I just had this same issue and it went away for me when I toggled the wrangle from points to primitives and back to points. It might have something to do with hooking a wrangle up after you have the code in place. Not sure though.

      • Michele Spaliviero

        I tried it, doesn’t work for me, thanks anyway.

  3. Hi Manuel,

    thanks a lot for this tutorial, works like a charm. I was wondering about one thing.

    I thought about creating a second group, let’s name it “x”, next to the expression group, which would contain only a couple of points in the middle of the whole yarn construct. Only the points in this group “x” should connect with each other. So I was wondering, how exactly would I tell my addconnections wrangler to use only these points? I tried a few things, but didn’t get it to work. I guess I am missing something. Do you have an idea maybe?

    Thanks a lot

    Anna

    • The easiest thing that comes to my mind is to just specify the group in the Parameter field of the geometry wrangle, such that it only runs over these points. Another possibility is to add another check to the large if statement. Something like group_x == 1;

  4. arturo valle

    great exercise! thanks! is it posible to break the connections at certain distance?

    • Sure thing! You can check the current length of the constraints in the second geometry wrangle and delete them with removeprim() once they get shorter than a certain threshold.

  5. Im trying to increase the number of wires over time (= animate the force count in the scatter) but that breaks the simulation…
    Any ideas how to do this ?

  6. Pingback: Houdini - Connecting Yarns using the PBD Solver Tutorial

  7. Pingback: Houdini – Connecting Yarns using the PBD Solver Tutorial – UNSORTED

  8. Danicka Oglesby

    Hello, and thanks for the great tutorial!

    I’m wanting to increase the distance of the initial point groups over time – like a “stretching” web – but keep the simulation intact. The POP source creates the simulation at the first frame, so moving the starting points doesn’t work correctly.

    Any thoughts on how to achieve this? Thank you!

    • Danicka Oglesby

      I answered my own question. I put in another geometry VOP into the POP network that animated the points along the z-axis.

    • You want to move them in DOPs, maybe with another wrangle, not in SOPs

  9. kunal tiwari

    thank you guys you are rock
    plz tell me how to a create realistic feather without python

  10. thanks a lot for this awesome tutorial, it´s SUPER fun!

    I did run into a a little problem. I get way to many connections, and they seem to connect to specefik points. Do you have any idea as to where I went wrong?

    All the best

    • Hi Reno,

      hard to tell without seeing what you did. Why don’t you dissect the scenefile I provide and see where your implementation differs.

      cheers mnu

  11. Very useful tutorial guys, many thanks!

    Would it be possible to implement the same technique with moving anchor points (the ones with 0 mass)? If so, would you have any pointers to achieve this?

    Thanks again!

    • This is possible for sure. You just have to move the points with mass 0 insdide of the DOP network. One way to achieve this is to create a geometry wrangle and update the points positions in every frame from their SOP counterparts.

      • Will give it a try Manuel. Thank you for your reply, and thanks again for all your great tutorials!

      • I tried with this code:

        if(@group_ends == 1){ //only points in “ends”

        vector newP = point(“op:/obj/yarns_PBD/OUT_TO_SIM”, “P”, @ptnum);
        @P = newP;
        }

        But some points in the left end suddenly move to the right side. I don’t know what is going wrong. :/

  12. Hello Manuel,
    Thank you for this amazing tutorial, and the Entagma site,
    I’ve figured out everything in this tutorial, but I don’t know how to change the yarns into polygons and split them in half- kind of like a pair scissors cutting rubber bands.
    Sorry I’m abit rusty with Houdini… is it possible if you could give me some tips?

    Cheers

  13. Camy Kamani

    Hello Manuel,
    Great Tutorial, Thanks for uploading and sharing.
    There is one thing I would like have a little help from you.

    Is it possible to break these yarns as well??
    The interconnections are working best for me but I need these yarns to break as well, depending on strength also when they stretch beyond a certain value they should break.

    Could you please help me with it, as am in learning stage of Houdini.

    Thank you for inspiring me with your awesome tutorials

  14. thanks again for a great tutorial,the vex is intimidating for me,but i managed to make it work

Leave a Reply to Jakob Cancel reply