PBD: Dynamic Weave

comments 10
Free Tutorials

Today it’s about dynamically generating a piece of woven fabric. Manuel explains how to write a VEX wrangle in the DOP context to generate connecting yarns in every frame.

This setup is quite simple but nice-looking. Not only do you learn how to recreate the effect, but the tutorial gives you some insight on how to use geometry wrangles in DOPs.

Download Project File

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


  1. As always great tutorial,

    one question….. If I wanted to use this on any type of geometry what would be the easiest way to scatter points along x and y-axis? for example a 3D letter.

    Happy Christmas!

  2. Hey, amazing tutorial!

    One thing I’m trying to figure out is: the width of the line is too big when rendering it. How can I change it? Thanks in advance.

  3. Justin K

    Question if you dont mind?

    Im a bit perplexed by what you are doing with “restlength” here.
    I looked up restlength and it is used by the grain solver to maintain poly line distances through the solve.

    Why is it that
    1) the polylines size ‘shrinks’ to match the restlength on the following frame rather than the frame that you did your calculations on to generate the line in the first place?

    As of now Im thinking its simply because the restlength is just used for the following frames, NOT the current frame —- is this accurate?


    • Hey Justin,
      I believe that is correct, because the geometry wrangle which creates the line is being merged into the right (in the dop network) of the main forces. That is to say when the line gets created its at the exact location of the 2 points and has a reslength “shrunk a little” so that in the next frame of the solve it will create a little tug and pull itself shorter.

  4. Manuel, I’m curious if you have thought of a way to control “rate of growth” in this scenario? What I am thinking is assigning each seed an int attribute called “rate” 1,2 3 etc. and if a higher value it could actually look ahead to the next 2 or 3 primitives per frame creating links of 3. what do you think?

  5. Manuel, these tutorials are amazing! I’ve been messing with the PDB approach but I’ve been hitting a wall around running a PBD sim using the grain pop solver with an animated mesh.

    I’m trying to establish a number of points that stick to the geometry and have the rest of the points simulated with constraints to those static points – ex. alembic mesh of walking person, strands simulating as they walk, with strand ends stuck to the animating geometry.

    I’ve tried mass of zero on the sticking points and updating position directly or giving them mass and using weight/stiffness/targetP but the points I try to move always seem to move randomly/out of control. Have you messed around with this at all?

  6. Super cool! How would I go about exporting this animation as alembic to render in another program? Does anything need to be converted to a mesh or something?

  7. From 3:00 to 5:00, instead of making a wrangle then sort “by attribute”, you can just use sort “by Z”.

  8. Olivia Skegg

    Hi There!
    I understand that this tutorial shows the ‘threads’ of the material as wire/ stringy attributes. Is there a way I can then merge all the threads to a surface/mesh to then represent a square of fabric rather than just the threads?
    This was awesome to watch!

Leave a Reply