PDA

View Full Version : Cloth for Clothing - How novel!


dinocarl
03-17-2003, 06:18 PM
I posted this over at the official list, but I wanted to share here, too.

Over the weekend I developed a new (I believe) technique for making clothing for a character using AM's cloth implementation. I made everything in 8.5, but this technique should work just fine in 10, though I will check that for certain later this evening.

First, here's an 850 K Quicktime animation I made with the new cloth technique:
http://www.dinocarl.com/epistemology/tute/cloth.html
There is a moment of 'fall-through' towards the beginning of the animation, but I left it in to show that I was actually using AM cloth. The cloth also moves in a thoroughly unrealistic manner inasmuch as it looks like it is made of jello, but these are settings that can be tweaked, and it seemed important to exaggerate the influence of the cloth's springs and masses.

Here's the nitty gritty:

The times I have experimented using cloth for clothing never worked out properly because the cloth tended to fall through other objects in the scene. This was because I was trying to rely too heavily on collison detection. Most of my models do not have dense meshes so fall-through was more or less inevitable. The better way to handle it is through AM's springs. If you make a simple model, like a vase figure, and only select the bottom two or three cross-sections for the cloth wizard, you'll see that cloth works pretty well here. The cloth will look like a very flowy skirt, but it will stay constrained to the top half of the model, following it whereever it goes. This sounds perhaps obvious and simple but this is where the real strength of cloth comes in. Cloth has accessible to it a constraint nowhere else available in the program - the Mass to CP Constraint. When you make a partial selection of a model to which you want to attach a cloth wizard, all the CPs that are adjacent to the selection will also get masses assigned to them. However these will not bounce around because they are constrained to CPs that are not being influenced by cloth. So the answer for clothing is to create a suspension group just outside the cloth group.

To do this, select the group that you want as cloth; in my example it's Thom's sweater. Then extrude the group, scale everything so that all the new CPs are well out of the way of the original group (you 10.x users might want to take advantage of Marcel Bricman's puZh plug-in, as it will make this a step easier), and hit delete. This will result in dangling CPs from every CP on your mesh. These dangling CPs should then be constrained to your character's anatomy through bones. They are the supension group that will prevent your cloth group from falling away from your character, and reacting to the changes in their position.

The main advantage of this system is that it lets you control the cloth by means of bone movement. The cloth is always strongly suspended by a group of CPs that are going to be following bones. It also means that it doesn't really matter all that much how and where you decide to model your clothing. Since it will be controlled ultiamtely by bones, you can model it over your character and assign the CPs to the the same bones that are controlling the character's geometry, or in a separate modeling window with its own bones that later get constrained to your character.

That's it. Go animate your character in an action or choreography, and then select the group you want to use as clothing, make a cloth Wizard, tweak some settings, and run a simulation; in other words, the usual. You've got yourself some cloth for clothing! : )

That said, there are some things to know about cloth in general and about this technique that are fairly critical.
1) Animate slowly. The most frequent reason for cloth falling through objects is because the motion is too fast. Notice the difference in the rate of Thom's arm movement in the beginning and in the end of the animation, and how at the end the cloth doesn't fall through his arm. When the motion is too fast, it makes the springs snap too much, and slowing it down will result in less inertia on the masses. Slow animation also helps in preventing the mesh getting stuck inside meshes The slow movement can later be rendered fast by rendering every other frame.
2) Get your normals right. Have the cloth face your object and your object face the cloth. This is also important for preventing stuck masses.
3) I 've found that it is best to have some parts of the actual clothing not have a suspension group and simply be controlled by bone movement, like the cuffs of sleeves, the waistband, and the collar.
4) Keep your masses and collision radii small. Lowering and raising damping will make the group bouncier.
5) Turn off gravity in the action and reintroduce it as you need it. The default setting is likely going to be too strong.

Well, that's pretty much it. I think I'll make an illustrated tutorial in a few days. In the meantime, I hope this message and the downloadable project are helpful!

Carl

gra4mac
03-17-2003, 08:55 PM
Thanks for this Carl. I have tried using cloth sim with not much luck. I will give your technique a try. The biggect problem I had was with moving the character around, ie walking, and the cloth stayed behind.

Cheers, Graham

dinocarl
03-17-2003, 10:26 PM
Hey Graham,

I had the same woes, and this technique should definitely take care of that. By binding the suspension group to the character, your clothing should not get left behind.

I'm rendering a different sequence at the moment, which I'll post in a little bit. The example demonstrates an additional ability of the technique: Having the character push around parts of the clothing.

Carl

dinocarl
03-17-2003, 11:03 PM
Now that there is a bone based control structure guiding the cloth, you can have the character interact with the clothing more. That is to say, you have the character grab some of the CPs that suspend the mesh, or bones that control the suspension group. and push them around so that it creates the effect of moving around the clothing.

In my simple example, Thom pushes his sleeve back. It took only a very short while to create this. There are certainly a few oddities about the example, but a litle more tweaking would certainly take care of it.

All that I did was add some bones as children of the arm and forearm that control specific cross-sections of the model. I did it fast and dirty, where I simply translated the bone backeard as Thom's other arm moves. But depending on what kind of bone control system you install to control the suspension mesh, you can do some really elaborate animations with this. In the end, it makes a lot of sense to just hand animate the suspension's control bones, but this is not the only way.

http://www.dinocarl.com/epistemology/tute/cloth02.html

Carl

gra4mac
03-17-2003, 11:38 PM
This is looking very interesting Carl. Are you using preroll and shrinking the arm diameter for the cloth to settle before the action?

Cheers, Graham

dinocarl
03-18-2003, 02:06 AM
There is kind of a preroll thing. In the first animation I posted, you see the whole animation from the default position on. In the second, I started from the default position and moved it into the desired position, but only began rendering after I got the model into a desired position. I did this so that collision detection wouldn't muck anything up. In principle, you should be able to start animating from any position, but to be conservative, I still used preroll. The key difference between this kind of preroll and the kind that you see in the Diana Project is that there you need to wait for the masses to get their bearings to start noticing where CPs are. Here, you try to minimize any reliance on collision detection, and depend instead on the strength of the springs that are leading to the suspension group. It's an experiment worth doing, though.

See if I can't get anything made to test it out.

Carl

dinocarl
03-18-2003, 02:08 AM
Just to clarify, I did not use any scaling preroll, just waited a few frames to start animating.

zandoria
03-18-2003, 06:46 PM
Think of how easy it is with your technique to add "jiggle" to a fleshy area!

I've used a cloth simulation for jiggle before, but without the suspension points, it can get a little too dynamic. Your technique is perfect for my swinosaurus! I can't wait to try it out!:beer:

dinocarl
03-18-2003, 08:05 PM
I was thinking the same thing, William. I remember seeing your animation a while ago of the swinosaur where you added the jiggle through cloth. I attempted this technique because i was curious how, in examples like yours, the cloth manages to stick to its model and bones, and without the tedious method of creating the spring systems and bone cosntraints by hand.

I was going to try this technique out on a raptor Imade recently. I'd be especially curious about that because the raptor has pretty extensive Smartskinning and I don't know how the cloth sim will react to that.

Keep us posted about your progress!

Carl

zandoria
03-18-2003, 08:23 PM
In the example that I made, I had just used some dynamic groups where the points that I wanted to have some soft body dynamics were added to the "jiggle group".
I had to use a very high stiffness on the fold springs to keep the shape from deforming too much-- but if I had used your suspension points, I would have had a better effect.

I think that it is very poetic that the technique for great dinosaur jiggle was invented by "dino" carl!

I think I may use this on the neck wattle of my "terrordactyl" too
:applause:

koon69
03-19-2003, 05:21 AM
When I try to load the prj and edit the action to see how it works - AM crashes. V10i and 10.54 Alpha. Any idea why?

dinocarl
03-19-2003, 04:10 PM
I don't know why it might be crashing. I have not loaded the Project into 10 yet, so I don't know what might be going on. Try saving out the model and action into their own files, start a new project, and load those two files. I've found that there are some dramatic performance improvements this way, and it may be related.

dinocarl
03-19-2003, 04:17 PM
William,

I used this technique to create a little wattle on the back of an arm. Again, a little weird, but not bad for 20 minutes worth of work, I think.

http://www.dinocarl.com/epistemology/tute/cloth03.html

I've found that there are some easy ways to trip up the system, but tha,t at the same time, these things have easy solutions. The biggest problem I had was that masses and springs were not being consistently created on the suspension group. This was an error on my part. The reason is that when you create the group that you want to have cloth on, you have to make sure that all the splines leading away from the CPS have been added to the group. Otherwise, the Cloth Wizard won't create Masses and Springs leading to the next adjacent CP. In an effort to streamline my process, I would create my cloth group and then extrude to make the suspension group, but not worry about the original group anymore. In fact, after the new suspension group has been extruded out, the CPs of the cloth group have to be selected again so that they realize that there are new CPs connected to them.

Hope this helps!

Carl

zandoria
03-19-2003, 04:28 PM
It looks promising, however the arm wattle seems to move through a position that should be occupied by the bone.

That might be corrected with a higher stiffness or a smaller jiggle-group.

I was using cloth wizard in 10.5 alpha last night and when ever I reopened the project I had multiple "Spring system1" entries in the PWS. I crashed when trying to render to file, and never figured out what was going on... I wasn't using your new system, just a loincloth on a character that was walking. the simulation ran fine and I could play it back scrubbing the timeline, but I crashed anytime I tried to render to file. This was a model made in 8.5, so I'm not sure what particular thing about it was causing the crash. Only after I deleted the simulation and the springs (and hair) would it render...

dinocarl
03-19-2003, 05:34 PM
You're absolutely right, William, I exaggerated the motion so that it is detectable. I totally agree with your comments. I think that small groups will probably work best in making convincing secondary movement. The groups might even bas as small as 1 or 2 CPs at a time. Also, there is no restriction on how many suspension points may be emanating from a group. They don't alter the geometry so you can have 2, 3, or however many suspension CPs coming out of a given CP to stiffen it.

The first few times I ran simulations for this latest aniamtion, I found that I was able to get nice motion out of the system, a motion that looked more like muschle than fat. The problem was that it was simply too subtle. So I jacked up the values to make the motion more noticeable.

As for the crashing, I just don't know. I've been sticking to 8.5. Have you tried saving your 8.5 model in a 10.5 format, and then going through your process? Might be a file format thing...

Carl

alfiebabes
03-19-2003, 06:21 PM
nice...!

Cloth, springs and dynamics always killed my old Mac but I'll try your technique.

Surprising how many of us have gone back to version 8.5! I'm almost mischievous enough to request that AM develop this software a bit further - like Softimage have done with Softimage3D (too many people still use it)

Just to ask also, did you find any great preference to building the clothing as your first movie shows great movement and jiggle. The later experiments have too much inter-penetration for my liking. (Maybe you chose to use more CPs or more elaborate clothing?)

koon69
03-19-2003, 07:59 PM
I tried like you asked. I saved out each file using v10i. No problem saving out the materials and the 2 models. But when I tried to save out the action it crashed. Maybe since this was done in 8.5 10 dont like it? Anyone got this to work under v10?

dinocarl
03-19-2003, 08:03 PM
Alf,

Both Sweater models are exactly the same. When I first made the test. I included the model right on top of Thom, as it is in the available project. In the second, I removed it from Thom and put it into a separate model, where I then gave it the same bone structure as Thom, and then constrained the appropriate bones to their matching ones in Thom.

The interpenetration that is heavier in the second example can, I believe, be handled by adding in a bone structure into the sweater where there is one bone per cross section. After running an initial simulation, you could slide around the cross section controllers to avoid heavy interpenetration of the cloth. Your next simulation should be better. In that example, I only added three such bones on the right arm. To make it better, I should have added one to the elbow, and perhaps started moving them along before they got to the part of the animation where they needed to move.

I also think that a denser mesh might be more advantageous as it would create a greater number of small springs, which should be stronger and stiffer than long ones. They might help prevent heavy interpenetration because the added forces will keep everything in better relative positions. I'm not sure that this is actually so, just a hunch.

Just so that you're aware, I have had numerous crashes on both the Mac and the PC while creating these projects. But this is another advantage of the system - the springs and cloth get added last to supplement the existing movement. The sweater moves around with Thom just fine by itself, so even without the cloth sim, I'd have a workable animation. With this system, since you're not relying on collision detection, you can always animate and decide at the very end to add this for secondary movement. In a system that relies on collision detection, the clothing would get left behind in your initial animations no matter what; you have to plan to use cloth sim and more or less work in an exclusively linear fashion. Here, use it if you want, don't if you don't, or make your decision at the last minute. I haven't lost anything vital because of a crash during this process. I also haven't had a crash during a cloth sim, but I also haven't been animating beyond 180 frames.

I'm eager to try this stuff out on 10 and 10.5, and I'll report back once I have.

Carl

dinocarl
03-19-2003, 08:19 PM
koon69,

The model has most of what you need. Let's try to fix your problem by means of it:

Open up the new 10.5 version model, and create a new action. There, activate the Everything_IK pose and animate Thom doing stuff. After that, go into Muscle mode, and select the clothing group and add a cloth wizard. Run a simulation.

I'm thinking that maybe the cloth sim aspect of the action is screwing stuff up, and this way we can find out!

I 'll test all this out when i get home this evening (at work, I only 8.5). I n the meantime, good luck!

Carl

dinocarl
03-20-2003, 04:07 AM
koon69,

no soap on the 10. got a lot of strange behavior and will start my bug reporting process. *sigh*

koon69
03-20-2003, 04:32 AM
I really appreciate the time you are taking. AM users have to be the coolest people! :> I hope it runs under 10. Your stuff is great!

zandoria
03-20-2003, 05:00 AM
I noticed last week that it wasn't possible to run the simulation in an action in V10 (without immediate crashing). If you run the simulation in the choreography you will be OK.

You can still animate in the action, just wait untill you have everything in your choreography>select your model>switch to musclemode> then select your dynamic group from the PWS. Now you can can right-click and run the cloth wizard...

dinocarl
03-20-2003, 04:44 PM
William,
What happened for me in the action was strange inasmuch as the cloth was created and would simulate, but the suspension masses were totally whacked out in their position. When I deleted the spring system from the action, AM crashed.

In other words, it worked in the sense that it created springs and masses and associated them with correct CPs, and it did simulate. However, what got messed up was the position of the suspension CPs and their masses. Does this happen in the chor? (I ask because I don't have 10 available to me here at the office.) Does it get whacked out or does it behave as it would in 8.5?

Carl

zandoria
03-20-2003, 06:33 PM
I haven't had an opportunity to experiment with the suspension groups yet--maybe this weekend. I'm at work and don't have A:M here (we work with Rhino and AutoCAD).

I have been working on examples for Hash support of biased normal vs. perpendicular normals, so I haven't had a chance to play with the cloth this week.

dinocarl
03-20-2003, 10:48 PM
I'll give her a go when I get home, then.

I've also been experimenting using this technique as opposed to SmartSkin in certain typically troublesome areas, specifically, the big fleshy part of the thumb. Interesting results so far.... but certainly a long way to go.

Carl

dinocarl
03-21-2003, 01:19 AM
Here is my first animation using cloth for the base of the thumb. There is no smartskin or any fan bones on this aspect of the model. Just springs and masses tellin the CPs where to go! Check it out!

750K cinepak avi

http://www.dinocarl.com/epistemology/tute/msl.avi

zandoria
03-21-2003, 01:42 AM
Carl,
That is way too cool!:applause: :applause: :applause:

JTalbotski
03-21-2003, 03:21 AM
Carl,

Is that done with the suspension cp's? Can you show a wireframe or a shot which show's which cp's were cloth? I'm not sure what the cloth has done here. It looks very nice, though!

Thanks,

Jim

My Fault
03-21-2003, 03:57 AM
Wow Carl that is very clever... nice! :beer:

dinocarl
03-21-2003, 04:18 PM
Thanks for the kind words, William, Jim, and MyFault. I put together a little page so you can see some of the geometry and springs up close

http://www.dinocarl.com/epistemology/tute/cloth04.html

It has a another 750K quicktime movie on the page of a realtime render, so you can see how the geometry reacts.

I think that throwing in a little smartskin here will make sense, but not in the deformation of the geometry. Instead, I'll use smartskin to move around suspension CPs.

Also, I'm thinking that in this particular case, it'll make a great deal of sense to create multiple suspension CPs for a few of the geometry CPs, where different suspension CPs are grouped to different bones. That way, the CP willa ctually have more than one bone acting on it!

Granted, this may be coming more than a day late since after 9 you can do something like this with CP weighting, but I'm not sure that CP weighting would cope with well strecthing and rotating at the same time the way that this cloth system can.

Carl

zandoria
03-21-2003, 04:41 PM
I did a little experimenting last night with "jiggle".
I made some dynamic groups for Jim Talbot's "Jane" model and then had her march around with the resolute walk.act from the CD

With a lot of tweaking of the spring settings, and several simulatons, I got some pretty good "jiggle" going in her breasts, thighs, and tummy. But the simulation was still a bit too dynamic for me.

I ended up deleting the spring system, and instead went through the action file in muscle mode with the magnet tool. I knew that I would be using those same dynamic groups, so I copied the CPs on the first frame and then went through the action adding jiggle on the proper keyframes and then pasting the default position back in place between the extremes.

This worked very well, and was a lot easier to control for me. Just for the control, I think that this is the way I want to animate. Skeletal motion first and then a extra pass or two adding muscle motion on top of it.

Bugle
03-21-2003, 08:11 PM
Well, well well... vewy interesting. It's taken almost 3 years, but someone has finally figured out cloth :)

I wonder if it'll work in 8.0... must try it out.

Unfortunately again it seems like another strike against upgrading, if people are having more problems with version 10 than 8.5...

gra4mac
03-21-2003, 08:59 PM
Hi William. I have been wondering if you have tried the cloth sym in Poser 5? The demo on the Poser web site looks great, but you can't tell from that. It seems that cloth in A:M is still a ways off, and if the Poser cloth works as desired, I might give P5 a try.

Cheers, Graham

dinocarl
03-21-2003, 10:08 PM
Well, Graham, I agree with William. Certainly cloth in AM has a ways to go, but William's technique is the simplest and likely the best solution for this kind of secondary movement. The technique I developed over the last few days is based on the assumption that one would want to make clothing using Cloth. This, I think, is a rare requirement of any software package considering that simulations like these are always kind of a pain. The jiggle and the other areas of experimentation have just been results of me letting my imagination run away with me. : )

Not that people shouldn't consider alternatives, just that sim isn't always, and usually isn't, the simplest answer. And AM, especially version 10, has really nice tools to pull this off, like the magnet tool and deformation cages.

Still, I plan on taking a looong hard look at this new thumb setup I got going. It really looks to be just what I've been looking for - which is to say, a faster alternative to SmartSkinning this area. We'll see ...

Carl

zandoria
03-21-2003, 10:08 PM
Poser5's hair and cloth are way ahead, sorry to say...
Although the program gets very slow as you start adding stuff. The cloth simulations that I ran with it looked great--like something from Pixar or ILM (well maybe not that great, but that big of a difference over A:M's)

The node-based material editor, hair and cloth are great additions, and could be used to do some really good stuff. But since most Poser users lack tools for modeling and making their own props and clothing, there seems to be an awful lot of nekkid Poser figures fooling around...

I've done a couple of conversions from A:M into Poser, just to play with the hair--but to have to animate in it, model "morph poses" instead of just manipulating the mesh directly--It's just not for me...

JTalbotski
03-21-2003, 10:52 PM
Originally posted by Graham Clark
Hi William. I have been wondering if you have tried the cloth sym in Poser 5? The demo on the Poser web site looks great, but you can't tell from that. It seems that cloth in A:M is still a ways off, and if the Poser cloth works as desired, I might give P5 a try.

Cheers, Graham

Hey Graham,

There is no Poser 5 for Mac yet anyways. I couldn't find any info on when it would happen either.:hmm:

Jim

koon69
03-22-2003, 03:07 AM
Zandoria have you thought of writing to Hash about how Poser is better at this than AM?

zandoria
03-22-2003, 03:21 PM
I don't think it's a good apples to apples comparison of how the dynamics are created(polygons vs splines). Martin and the guys go to Siggraph, I'm sure they are well read on that stuff...

Plus, there is a huge list of feature requests that people have asked for, and from the alphas that they're testing it is clear that they are working on them. be patient.

dinocarl
03-24-2003, 04:11 PM
koon69,

Working in 10.5 with cloth has been much more successful for me than in 10.0. I still find that opening up the action that I created in 8.5 will not run at all in either. However, using the Thom model, animating a new action and then setting up the cloth in 10.5 has worked just fine.

koon69
03-24-2003, 09:08 PM
I guess you are saying that I would need to re-create your 8.5 model in 10.5? How would I do that? I dont think my brain can handle all that! :>

dinocarl
03-24-2003, 10:59 PM
Hey koon69,

You don't have to redo the model, just the spring system. Take the model from the project that you downloaded, then start a new Action. Animate Thom moving around. Then scrub back to the beginning of the animation. Go into Muscle mode. Select the group named 'clothing', Right click on the selection box in the Action, and go to Cloth wizard. From there, you can experiment with settings, but I recommend turning off all Mass stuff. Make your mass either 0 or 0.01, cloth drag and collison radius should also be 0. Stiffness values other than structural (which I leave alone) I keep around 10 or 20. Then Simulate. Voila! (Hopefully)

Carl

gra4mac
04-10-2003, 01:28 AM
Hay guys. I thought I'd let you know that I used Carl's cloth suspension method to make an animated gif for my upcoming web page. It's not anything spectacular, but the suspension method worked great. I wanted a stip of text to look like it was flowing and rippling. I made a cloth strip with suspention splines extruded behind to give the desired amount of flow in the cloth, and a fan. The result is here,

file:///Drive%20Main/Desktop%20Folder/ISS%20Web%20pages/Web%20pages/Index.htm

Cheers, Graham

Bugle
04-10-2003, 02:29 AM
*cough* Graham, that be a local link in your machine ^_^

gra4mac
04-10-2003, 03:05 AM
Well sheesh, it worked for me. Try this one.

http://www3.telus.net/imagestreamstudio/

Cheers, Graham

CGTalk Moderation
01-14-2006, 05:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.