Connect The Yarns – With the PBD Solver

comments 24
Tutorials
Featured Video Play Icon

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

Share on FacebookTweet about this on TwitterPin on PinterestEmail this to someoneShare on LinkedInShare on Google+

24 Comments

  1. Tony says

    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

      • Tony says

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

        • Manuel says

          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 says

    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

    • Manuel says

      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 says

        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

        • Manuel says

          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 says

        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

    • Manuel says

      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 says

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

    • Manuel says

      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. Jakob says

    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 says

    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 says

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

    • Manuel says

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

  9. kunal tiwari says

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

Leave a Reply

Your email address will not be published. Required fields are marked *