Jump to content
Hash, Inc. Forums

SimCloth Idea/Question... Need Help


FilmReal

Recommended Posts

Hello everybody,

 

I have been working with Sim Cloth with some success ( I have a human model with a hooded robe + cape outfit which is working relatively well in Sim Cloth) however it is only working well because the geometry resolution of the fabric is relatively low (as is the invisible model used for bounding information). While it is working pretty serviceably as is, I was trying to use the split-patch plug-in to make the fabric more complicated. Of course upon doing this, the simulation times became very slow, which isn't so bad, but now also the number of collisions is in the tens of thousands and often the simulation now becomes unsolvable even with a good deal of tweaking when it comes to the variables, # of steps, etc..

 

Here is my thought.

 

Is there some way to simulate the cloth with these serviceable low-res meshes first... bake the muscle animation.... subdivide the mesh (with split-patch), and then run another cloth simulation where the newly created subdivisions are dragged along by the baked muscle motion of the low-res part of the mesh.

 

This would drastically improve the results (over the low-res method)… And because you could pretty much ignore all collision data on this second run without a too serious drop in quality, the overall speed of running both simulations would be an improvement. More importantly, it is easier to control, manage, re-adjust, and manipulate the low res-version.

 

However, whenever I try to make this happen, I can't seem to get muscle animations to drive a Cloth Simulation.

The two simply don't seem to mix. It seems like it would be possible too, since there are group settings labeled “attached” that seem related to my current quest. But haven’t been able to make it work.

 

Does anyone have any insight on this matter?

 

Thanks,

 

FilmReal

 

 

P.S. For some reason I couldn't post on the Cloth board, is that board discontinued?

Link to comment
Share on other sites

  • Hash Fellow

I don't think that would get you much even if a 2nd sim were possible.

 

The 2nd sim would be like small squares of cloth being moved by rigid chicken wire. In real cloth every point can exert a cascading effect on all the other points. In your cloth, the points that were simmed first would be like a barrier to that since they are moving on a predetermined path and not influenceable.

 

 

also... suppose you simmed a 10 x 10 grid. that's 100 CPS

 

double that to 20 x 20 and you'd have 300 more points to sim, which isn't a great improvement over the 400 that 20 x 20 would have been originally.

 

 

I've had improved success with cloth by scaling my model about 5x and increasing the collision distance 5x before running the sim.

 

then scaling the whole thing back down when it was done.

 

 

Also, other people have had success deleting unnecessary collision creators, like the interior of an armpit.

 

 

 

 

 

 

 

P.S. For some reason I couldn't post on the Cloth board, is that board discontinued?

 

It's temporarily retired. If there are a new flurry of developments with cloth it might warrant a dedicated forum again.

Link to comment
Share on other sites

I admit it would be an approximation which would only "virtually" increase the quality of the simulation, however the increased speed and ease of malleability would make it worth the bother IMO.

Also it is not as bad as chicken wire driven cloth patches...

 

Where 1 represents a point controlled by the first pass and 2 represents a point controlled by the second...

A true chicken wire solution would look like sort of like this.

 

1---1---1

1---2---1

1---1---1

 

In the method I am proposing the distribution would look more like this

 

1---2---1

2---2---2

1---2---1

 

Literally every other point along any given spline would be run on the second pass.

 

I hope my bad illustrations make sense.

 

Also in the case of my particular model the difference is approximately 661 versus 2627 patches... which is a signifcant increase.

 

I've had improved success with cloth by scaling my model about 5x and increasing the collision distance 5x before running the sim.

 

then scaling the whole thing back down when it was done.

 

I am not sure I know what you mean... are you referring to literally scaling up the size of the model and it's cloth in the choreography (wouldn't you have to scale up the whole world?) or are you referring to that weird scale variable under the sim cloth plugin properties for each group (which I can't make heads nor tails of in all honesty).

 

Thanks for responding so fast by the way.

Link to comment
Share on other sites

  • Hash Fellow
In the method I am proposing the distribution would look more like this

 

1---2---1

2---2---2

1---2---1

 

Literally every other point along any given spline would be run on the second pass.

 

that's still a lot of unresponsive points across the mesh. I'd say the likelyhood of them putting programming time in to this is about none.

 

AM's simcloth is based on an open source Simcloth which likely had very thoughtful minds applied to the problem. What we see here is not someone's first stab at cloth sim but a very maturely developed process. I think if this were a useful optimization We'd probably see it already.

 

 

 

 

I've had improved success with cloth by scaling my model about 5x and increasing the collision distance 5x before running the sim.

 

then scaling the whole thing back down when it was done.

 

I am not sure I know what you mean... are you referring to literally scaling up the size of the model and it's cloth in the choreography (wouldn't you have to scale up the whole world?)

Yes, physically scale the cloth and the model it interacts with. In my case the cloth was part of the model file of the character that was wearing it.

 

If the cloth has to interact with other models, this becomes more complicated to do, perhaps unfeasible.

 

 

No guarantees. You may have other things besides inadequate collision distance going wrong. In which case increasing the collision distance still wont' appear to solve your problem.

Link to comment
Share on other sites

Thanks for your pointer about up-scaling.

 

As for your other comments, I think you misunderstood my question and took it as some sort of affront. I am not asking for a feature.

 

I am pretty convinced that the mechanism already exists.

 

I mean with capes and dresses, they often hang off the rest of the geometry (if that geometry moves Sim Cloth moves the Dress or Cape accordingly irrespective of the added complication of collision.

 

 

 

So garden variety geometry is driving Sim Cloth geometry in that case, so it seems reasonable that it could be driven also by every other point, as it were.

 

 

I really think the program can already do this; I just think I am missing something.

 

 

 

By the by, this is hardly my first stab at anything Animation Master related, I’ve been using the program for seven years.

Link to comment
Share on other sites

  • Hash Fellow

Wondering about a feature isn't a problem, but I just dont' see this one panning out.

 

I know that there is no documented provision to do what you are proposing.

 

And thinking it thru, i dont' see any benefit to be gained either in simulation time or successful results.

 

Since the idea is to simplify by ignoring collisons in the second sim, you might as well stay with the low res mesh that ignores collisions between the original CPs anyway. All you're going to get is a higher res mesh that gave the appearance of only the accuracy of the lo-res mesh.

 

I do not see it ever getting great results.

 

Post a pic of what you are working on. Someone who knows cloth may have ideas.

Link to comment
Share on other sites

  • Hash Fellow

reading your initial post a bit more... are you saying that the 1st cloth simulation no longer works after you subdivide the cloth? Even for the CPs that were there before?

 

I'm not surprised, I'm going to guess that the identity of all the CPs has been jumbled by adding new ones to the same mesh.

 

Maybe you could show your unsuccessful result and that would tell more.

Link to comment
Share on other sites

All right... for what it's worth I did get this to work, however, it looks kind of weird and isn't by itself too useful.

 

However, the way I got it to work is kind of interesting, or at least a little surprising to me. It was with one simulation not two. The simple mesh was one group, I subdivided with split patch, and the newly created patches went into a different group.

 

Then I gave the first group Sim Cloth properties so that collision detection was on. The split patch group was given Sim Cloth properties so that collision detection was off.

 

Then I made one over-arching group that actually has the Sim Cloth material applied to it.

 

I created subgroups in the material that referenced those two first groups so that the simulator would access the each group’s Sim Cloth settings during the simulation.

 

As predicted it did increase the speed of the simulation, while maintaining a very high patch count. However, as you thought Rob, whenever the cloth was struck by a deflector, it looked too much like a bunch of evenly distributed “pinches” in the clothing as few lone collision-conscious points endeavored to drag the rest of the collision free points along.

 

 

 

However, I didn’t know about this subgroup thing until now, and I find it is incredibly useful for speeding up simulations.

 

 

 

In the sim I am working with now, I created five groups:

 

 

 

One with Collision Detection OFF but Self Collision ON

 

Another with Collision Detection ON and Self Collision ON

 

Another with Collision Detection ON but Self Collision OFF

 

One with Collision Detection Off but Self Collision OFF

 

And one last group set with “Attach” ON

 

 

 

I basically looked over the model and judged which areas would probably have no self collision issues (or any collision issues) and placed each section into the most logical group. Also, any areas that are not really supposed to move at all (like the collar of this hooded cape thing) were placed in the Attach group. Because this allows the computer to think as little as possible during the simulation, the simulation is running much faster and the results are easier to control. So I guess I learned something good out of this, even if my initial plan didn’t work.

Link to comment
Share on other sites

The subgroups are key. As tempting as it is to just apply cloth and let the sim run, all cloth sim technology is still very touchy.

 

(I read an interesting list of cloth sim tips from a Pixar cloth-sim lead once - made me feel better...even the pros have intersections and failed simulations.)

 

Sub-groups tell the computer what is truly important, and how that importance is to be dealt with. Essential for good/stable sims.

 

Oh, and the rule of thumb on cloth mesh density - build the mesh to the minimum resolution to display the maximum detail desired. If you need to simulate wrinkles 3 cm wide, then you will need patches no wider than 3 cm.

 

Ask yourself, "does this tell the story, sell the effect, etc?" If the answer is no, then explore other options.

 

"Less is more," is not true - that is a logical fallacy - but less can be more effective.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...