Sewing Clothes in Blender [Available in >= 2.70]

thanks for the build! =)

when the simulation is finished does it merge the vertices together?

nope! although that would be cool. you need to decide when it is finished and apply the cloth modifier, then you can go in to edit mode and select all loose edges and edge collapse

i think 3dsmax and marvelous designer merge the vertices together. i hope this can be added. the lose edges is a good trick.

we need to model so that the normals are pointing together. if not you get a very sharp crease.

now we only need an advanced parent option for dynamic clothing. you model a detailed cloth like jacket with all the details. and then you model a simple version for dynamic calculations. you parent both objects together so that the detailed model folows the dynamic clothing. i hope someone will add this in the next 2 years.

Thanks thesleepless and demohero ^^

I tried out the sewing patch build today. It worked pretty nicely after experimenting with the sewing force a bit. For anyone playing with it, it seems not to like small dimensions. When I used an avatar and model that had real world dimensions, the simulation with the sewing springs turned on went nuts. However, after I scaled up the avatar and clothing by a factor of 4, everything went fine.

excellent, I’ve had okay results with real world dimensions, but it’s probably a matter of getting the right cloth simulation settings.

I find what works best for me is to set the “Velocity” and “Gravity” to 0, Sewing Force to ~5, run the simulation until the sewing is complete, then turn velocity and gravity up to 1 and continue the simulation

Thanks for that tip. :slight_smile: I’ll try that on the next test. But also, the problem might have been caused related to the pretty thin shoulder straps on the dress.

When the velocity is turned up during sewing the strong forces can cause large ripples through the fabric which can make things a bit crazy =)

van yo add other forces to the clothing modifier like elasticity, and the ability to simulate difierent fabric types like silk or denim?

hey, uhh, thesleepless do you think you could include other features like internal fold lines, simulation of different types of fabric, the inclusion of other coth physics properties, etc?@thesleepless

hmm i’d like to have internal folds, although i’m not sure how to do it.

other types of fabric should be possible by tweaking parameters, but i’m not sure of specifics.

Hi thesleepless,

Thank you for this very useful addition, I hope it’ll go in trunk as soon as possible.

In applying the patch against rev 49500, os x 10.7.4 intel 64 bit, it failed at hunk #2 (at 1245) of source/blender/blenkernel/intern/implicit.c
I edited it manually and it worked fine.

What I noticed playing with it is that it recognize the vertex group as sewings only if it consists of edges, while if you fill the edges with faces it doesn’t work; this is bad because, in creating garments, it can be useful to maintain the double edge loops to mark the seams, instead of removing doubles. I hope my bad English is clear enough.

I like the fact it is very easy to use and well integrated, while it does its job very well, even automatically disabling gravity.
I still have to verify how Sewing Force and Min/Max Shrinking works exactly, but it’s the same for all the clothes settings, you know…

Regards, paolo

After a few of testing, I have problems getting the side stitches to collapse quickly enough.


EDIT: and here you can see the sleeves have already reached the shoulder seams.

and than:



as you can see, it’s all quite OK but the sleeves, because their seams didn’t converged in time, and the mesh shrank on itself before it can collide with the body.

It looks like the seams, in reaching their target (the opposite seam), are faster if they are shorter, while it should be the opposite, so that all seams can collapse simultaneously.
Maybe the Sewing Force should be independent from the stiffness of material, I don’t know, just a thought.

paolo

Update: moving some polygons near the body I managed to get the sleeves to go in place.
The trick is to have the segments of the stitches the more similar in lenght as possible (where it’s possible).

What is really a pity is the very poor usability of the cloth simulator itself.
It could work fine in simulate, but its extreme slowness and irresponsiveness to any command, including to stop animation, make it totally unusable, apart from letting some new user to play with a cube.
Not only it’s not multi-threading,and it uses just half of a core, but it cripples the whole blender.
If it was for me, I’d prefer to suppress it at all, rather than delude people.
Sorry for the ranting.

paolo

can’t wait to see this in Trunk!! :slight_smile:

Hi paolo, thanks for giving it a try,

you can get a better result by setting Velocity down as low as it will go (this will stop the fabric from getting ripples in it before sewing has completed) and turning up the sewing force a bit.

The “sewing force” is the maximum distance that the sewing springs can move in one step, so it applies to all springs equally, it may be that you need to turn it down if things are moving at different speeds.

I don’t find the simulation that slow myself, but it could certainly be improved or even moved to GPU for a large increase in speed.

Good luck!

Hi thesleepless,

I started a new attempting as soon as I read your reply, and yes, with Velocity = 0 it works way more smoothly.
It was my fault, I skipped you advise before about velocity.

Nothing to say, you added a very very useful feature to the simulator, and a very easy and power tool for dressing characters. I know this for having used in near past a similar tool in Cinema4d, which is not better than this for sure, and with the right ‘models’ to cut and sew, just as a taylor does, you can get actual convincing dresses instead of the usual rubber tubes.

From what I can say it doesn’t give any problem, it’s well integrated in the UI and not invasive, I hope it can go in trunk as soon as possible, either in the simulator itself or as an addon.

As for the performance issue, I don’t know if is possible to have cloth simulator working multithreads building blender with OpenMP, every attempting by me failed.
Anyway what really makes me mad is once you start a simulation, doesn’t matter if it uses only 1/8 of available CPU power, it’s even able to totally freeze blender, it doesn’t respond to system events, and you have to force quit to stop it, inacceptable, and totally useless for serious works.

Regards, paolo

glad that helped with the velocity.

hmm, for me it behaves quite smoothly and I am able to do other things in blender while it simulates, i’m not sure why it freezes up for you.

are you using play (ALT+A) or cloth baking when it freezes?
what OS and computer specs?

I’m on quad i7 mac os x 10.7.4,
the very problem to me is that the simulator uses only half core, ~100/800 max, and over a certain number of subdivision and complexity, when the wheel of death starts up, it refuse to stop and goes ahead grinding frames over frames. It’s happening just now and I’m going to force-quit.

paolo

EDIT:
no baking, only ALT+A

Great work, thesleepless! I also hope this makes it into trunk soon!

Like sourvinos, applied the patch to a blender build on os X (10.6.x), and got the same error mentioned above at hunk #2. I also edited the file manually and got it to work.

Maybe I’m doing something the wrong way, but is it possible to have the sewing/stitching/springs work better with the subdivision surface modifier? If I add a sub-surf modifier to a mesh I have set up with springs, the extra geometry will not have springs like the real geometry, and the seams will be messed up. (I hope you understand what I mean…)