Home Creators Posts Import Register Favorites Logout

Content

A rarely-mentioned but powerful (and fun) feature of Houdini is its workflow for designing and simulating clothing. Let's check it out!

Concept

When designing clothes for 3D characters there are two main steps. First, you lay out two-dimensional objects exactly corresponding to the individual components of a real world item of clothing. Next, you connect the edges of those pieces into virtual seams and simulate attraction between them. This collapses the pieces into a single article of clothing around a mannequin.

When looking at this on a low-level, technical level, the most difficult part is creating persistent seams that are easily selectable. While it looks like connecting seams is an edge-to-edge operation, in fact Houdini is operating on points within each edge. It would be a major headache if you tried to create seams yourself using point selection groups. All seams need to have the same number of points (you couldn't successfully connect an edge with 10 points to one with only 9), selecting points manually is frustrating, and furthermore, any changes to the original geometry could change the point numbers and invalidate the selection. Fortunately, Houdini provides tools to automate this process.

Workflow

(This assumes intermediate to advanced knowledge of Houdini. I'll be glossing over interface topics and other basics.)

First, we'll bring in a reference image with a t-shirt pattern. A crucial step in designing 3D garments is to use real clothing patterns. Clothes do not fit together like you expect and any small mistakes will lead to bunching, stretching and bad fit that is hard to troubleshoot.

I downloaded a basic pattern from the internet. (Hats off to the genius who figured out 500 years ago or something that sleeves need to have that big curve in order to fit correctly!) Open up Houdini's Display Options (shortcut: D), click the Background tab and add the image to the default Front camera. Change the Offset, Scale and appearance as needed.

Next up, we'll use the Curve Bezier tool to create one curve for each edge in the pattern. It's very important to make only one curve as this is what allows us to later select individual edges. Resample each curve to give us more resolution to work with. I set each one to 10 segments. Merge all the curves together to see the outline taking shape.

Use a Fuse node to connect the corners.

After fusing, the corners might have moved around a bit, so you can manually edit them to get them back into the right position. Plus, you can nudge points around as needed to get closer to the outline of the reference image.

Now we can Mirror the pattern. Adjust the mirror position accordingly so the two halves are almost touching. Then, fuse the four middle points and edit as needed.

Next, we'll add the secret sauce for this whole process, the Planar Patch from Curves node. This will create a polygon mesh that retains our pattern outline. We'll want to output Seam Groups and (optionally) Interior Points. The seam groups are critical for when we later connect seams during the simulation process. This feature lets us change the original curves as much as we want and always retain the correct seam groups, thus ensuring the final simulation never breaks as a result of upstream changes.

I use a Group Rename to make the groups more easily identifiable.

Next, I split off the node tree into another branch for the back of the shirt. It matches the front almost entirely, just with a higher neckline. I adjusted those points to match the reference pattern.

I renamed the groups again (appending _b for back), otherwise the front and back groups would conflict with each other when merging the geometry. You can use the Display group and attribute list feature in the Houdini viewport to check the status of all your seam groups. Mouse over the names in the list to highlight the points. If something is off you can go upstream to correct it.

Add a Transform node to both the front and back and set them up to be separated a bit in 3D space. Add a Reverse node to the back to orient the polygons correctly, if needed.

Merge the front and back:

Now we can create the sleeves. Follow the same procedure as above, creating curve outlines, mirroring, making a planar patch, renaming groups, etc.

In this case I also added a Bend deformer to get the sleeve into a better position for adapting to the mannequin. If I left it flat the bottom edges would fuse too soon, before dropping under the mannequin's arm. With the bend I got the edges below the arm to start so they connect properly.

For the mannequin, I'm using the built-in Houdini "Paul" test geometry since it has a neutral arm position. The other one, "Luis," is in a t-pose, which is good, but that scrunches the shoulders of the shirt a bit. For this simple setup the lower arm position works better. You can enable the purple Template icon on the Paul node to see it while you use transform nodes to get the four shirt pieces into position.

Next, add a Vellum Configure Cloth and a Vellum Drape. Configure Cloth can be left at the default settings. In the Vellum Drape, check Weld Additional Seams, then create seam pairs using the group names we set earlier. For example, I match mid_l with mid_l_b, etc. Houdini draws connecting lines showing the seams.

In some cases the point orders are backwards and the lines twist:

In that case, just click the Reverse checkbox on that seam to fix the problem:

(Note that if you have the mannequin connected to the vellum collider input then the lines showing seam connections are hidden. Simply disconnect the collider while working, then put it back when all the seams are correct.)

We're ready to go!

Make sure we've got the collider input connected, then click the play button. The four shirt components will connect at the seams and gravity will pull the entire shirt down around the mannequin.

The above GIF is the result of probably 20 minutes of tweaking settings and repositioning objects. You'll need to try again and again until it all fits together correctly. I even used the new Houdini 20.5 Sculpt tool to smoosh the mannequin around a bit since it doesn't seem to be totally symmetrical and that was causing some clipping.

Conclusion

In this tutorial we covered the fundamentals needed to design and drape 3D clothing in Houdini. It's a powerful workflow, but also a highly technical one that requires careful planning.

Once you're happy with your results, you should run a Vellum Post Process to remove overlaps and smooth out jagged edges. You could then cache the geometry to disk and use it as a base for further sculpting or in a new vellum cloth sim to attach to a animated character, for example. You would probably want to run an Attribute Delete on the cached geometry to remove the old vellum attributes and start fresh. Enjoy!

Files

Comments

No comments found for this post.