View Full Version : Cloth problem....

05-08-2004, 04:04 AM
Hello when I pop up the fix menu in Cloth FX, it says nothing or all, that's it... (yes I've tripled checked, there is a part...)...I mean not even surfaces are there listed... how come ...?:confused: :(

05-08-2004, 04:33 AM
Oups... subpatch was on O, put it to 1... OK...

05-08-2004, 06:22 AM
aha... like I previewed it does not work at all ... and the scenes demos dont tell anything as it is already playing from a saved file... so... any tuts at the horizon...

Question.. does cloth works with ACs4 ?

05-08-2004, 08:59 AM
I'm currently dealing with the same thing (cloth skirt on a partly acs4 rigged character). Whatever problems you're having with cloth, likely have nothing to do with ACS4. The main thing to look out for I've found, is that the subpatch order should be set to 'First', or at least 'after bones' (before displacement).

I've gotten it to work predictably (though not really reliably) ONLY if the subpatch level is set to 1. Even then, if I close and re-open the file, It may stop working until I fiddle with the settings some more.

Very flaky.

05-08-2004, 05:00 PM
Originally posted by Hervé
aha... like I previewed it does not work at all ... and the scenes demos dont tell anything as it is already playing from a saved file... so... any tuts at the horizon...

Have you added the "Collision" dynamic to the object the cloth is colliding with? You need to do that to get collision detection to work.

Then double-click FXCollision to edit the Collision properties and set Type to "Object" and Mode to "Stick."

Also, the for cloth object, you need to open the ClothFx properties, go to the Collision tab and enable Collision Detect. You also need to go to the Etc tab and enable gravity at 9.8 m/s/s if you want the cloth to behave realistically.

That will get you part way there. The rest, I'm still trying to figure out. Both ClothFx and FxCollision have settings for Friction, Fixed, and Collision Offset, among other things. The manual explains what each of those settings do, but doesn't explain how they all interact or how to set them to get a desired effect.

In addition, I suspect ClothFx collision detection depends on the polygon size in the cloth object and the collision object, as Motion Designer did. (See http://forums.newtek.com/discus/messages/2/27184.html?1026744459)

I've been able to get ClothFx to work really well for "flapping in the breeze" type stuff, but I haven't been able to get collision detection to work reliably. My test was to drape a cape over a mannikin, but after a few frames, the cape would always slip through the shoulders and then the cloth would go crazy.

05-08-2004, 11:45 PM
I have had SOME success with this, but it has become clear, that there is a SHARP falloff between what is a reasonable calculation time and what is impossible as the complexity increases. Here are 2 examples:

Cloth tests (http://www.nigelanimation.com/Katya/cloth_tests.htm)

in the first example, the subpatch level of the cloth object is set to 2. The calculation time was fairly long (around half an hour), but bearable. When the subpatch level was set to 1, the calculation was much faster, and the violent flapping at the start of the simulation was greatly reduced - but the detail in the cloth was also greatly reduced. Setting the subpatch level to 3 made the calculation time skyrocket so that it didn't calculate a single frame in over an hour when I cancelled it.

In the second example, both the cloth object (skirt) and the collision object are much more complex. The skirt subpatch level is set to 1 since setting it to 2 or more made the calculation time unacceptable. Setting the 'collision offset' higher to reduce the legs penetrating the cloth seemed to kill my calculation time. In fact, I actually haven't succeeded in getting ClothFX to run this simulation a second time for some reason - even with the exact same settings. I'm glad I made this preview just so that I can remind myself that it CAN actually work (under mysterious circumstances).

It seems that the potential for very realistic results is there and the controls are MUCH more intuitive than the old Motion Designer interface, but it still seems VERY flaky and HIGHLY inefficient. It needs to be much more optimized in order to perform moderately complex calculations in a reasonable period of time.

05-09-2004, 01:36 AM
Yes Nigel and Lonestar.... simply said, something is wrong in what we're doing... I am pretty sure... otherwise, it is TERRIBLE for NT... I mean the entire deal (a big part of it in the publicity NT was doing prior releasing LW8) of the upgrade was ...

-More efficient animation tools
- hard and soft dynamics

other than that, I dont see the rest as a big deal....

Simply said, cloth is working with a simple stuff, but when doing serios stuff, it's a "no-go" hyper un-productive....

That said I go back to work, enough waited time....

Different day, same ****...

05-09-2004, 12:23 PM
I've found that if I delete everything but the cloth object and the collision object from the character test I posted previously, then I can set the subpatch level to 2 and still get an acceptible calculation time (well, almost an hour for 60 frames).

new skirt test (http://www.nigelanimation.com/Katya/new_cloth.mov)

Looks like the only way to make a useful animation this way would be to animate the character first, then when the animation is finalized, delete everything but the cloth object and the collision object (and the bones that effect them - then save as a new scene) and run the simulation. Once the simulation is finalized, save the motion as a file and apply it to the cloth object in the full original scene for rendering.

Should work in theory, but I'll have to try it out before I consider the problem oficially 'worked-around'.

05-09-2004, 01:29 PM
I've got some good results here in fact.... you have to set up the cloth object to afterbones, I'll post my results tomorrow... I am so tired right now.... ZZZzzzzzz need some sleep... see ya..:D :cool:

05-09-2004, 03:46 PM
Look forward to seeing them!

My first stab at the workflow I mentioned before (animate-delete-run simulation-re-import file) seems pretty viable:

.mdd file reimported (http://www.nigelanimation.com/Katya/cloth_test2.mov)

It ain't pretty, but it should work. The interpenetration in this sample is due to bone weights that need tweaking as the top part of the skirt is fixed and not subject to the simulation.

05-09-2004, 07:32 PM
Originally posted by Hervé
Yes Nigel and Lonestar.... simply said, something is wrong in what we're doing... I am pretty sure...

I don't doubt that. As I said, there are a lot of variables here, and I'm baffled by how they all interact.

I did my tests without subdiv, bones, or anything else that might complicate the scene.

One thing that seems to be a problem is the orientation of the polygons. If the cloth hits a collision polygon flat on, collision detection seems to work, but as the angle increases, so do the problems. When I dropped the cape onto my maniken, the problems seemed to occur at the shoulders, where the polygons are almost 90-deg to the cloth.

In addition to a good tutorial, it would be nice to have a technical description of how the various ClothFx and FxCollision variables interact, as well as restrictions (cases where collision detection does not work).

05-09-2004, 09:44 PM
it's pretty strait forward, and you said it yourself. if a mesh is to anguler collision becomes unstable. sadly at the cost of speed in most cases you have to increase the poly count for more acurate collision detection. Edge bevel or rounder comes in handy for isolated sharpe corners.
Or use a good deal of smooth then alittle move plus or smooth scale to compinsate for lost volume.

This is because INO's collision is based on points hiting faces.

05-09-2004, 11:39 PM
What I did is ... I first Loaded my ready animated model, the model has two layers, one is the Naked model with the top of the robe, and second one is the lower part of the robe... the grey part of this second layer is set to fix (created a part in modeler).....back in modeler, I deleted (the model is safe duplicated) the parts in the first layer (collision) I dont need for calculation , do not delete any bones ! so back in layout... here is the model before deleting unneeded parts...

05-09-2004, 11:42 PM
settings for the cloth part

05-09-2004, 11:43 PM
cloth collision tab

05-09-2004, 11:45 PM
and this

05-09-2004, 11:46 PM
now for the collision ob ject (body model piece)

05-09-2004, 11:49 PM
then when the calculation is done, back to modeler, reglue the missing parts for the body, and voila///

BTW, I thought you could isolate the collision parts, and not need to go in modeler deleting the unwanted (un-needed) parts to collide with.... ah well...:confused: :D

05-10-2004, 01:07 AM
Interesting that you set Mode to "Bounce" instead of "Stick." I would have expected that to cause the cloth to bounce around too much. Did you try the other mode, and did it make a difference?

I also notice that your collision object has a very high polygon count. I wonder if that's part of the secret?

According to Motion Designer article, the secret is to have lots of detail on the cloth and as little as possible on the collision object. My tests assumed ClothFx worked the same way -- but I wonder if it could be the other way around?

05-10-2004, 01:57 AM
ahhh, sorry 'bout that I havent showed the screen with the dleted part of the collision ob... I will, wait a minute...

05-10-2004, 02:07 AM
you see, originally, I've made some parts, thinking it coul reduce the calc. to just that part, but it seams to calculate with the entire model.... dunno 'bat dat....:confused:

05-10-2004, 02:09 AM
so here we go..... i deleted the un-needed parts, did the calculation, then saved the mdd file, then back to modeler to put back the deleted parts... and voilà...!:D

05-10-2004, 02:38 AM
Can't you save the object that has the deleted parts, set it to hidden, and have that as the collision object and not the rest of the body? That way you can recalculate whenever you want and you wont need to delete parts of your object again. It also means you can make your collision object lower poly and no one will notice ... :confused:

05-10-2004, 03:18 AM
Hello Karmacop, this is where I dont get it... how do you do that ... I mean There is 2 layers, one with the girl model and top dress and the skelegons, the other one with the lower part dress, and this part is just parented to the dir_Bone of layer one... if I want the cage low poly collision object to deform as well as the high poly, it has to be in Layer one also....:confused: :rolleyes:

05-10-2004, 04:16 AM
For the low poly collision object, can't you use "use bones from object: " and direct it at the bones used for the girl layer?

05-10-2004, 05:06 AM
Frankly said, I've never know about that ! looks like the one ! Now where do you do that exactly...? ah well where the FM (from RTFM):D

Thanks Karmacop... I'll try that... Is that the way you proceed btw...

Thanxxxs !;)

05-10-2004, 05:20 AM
just click on the object, and then in the bone properties window it's the very first optioin. At least it was in 7.5.

And I've personally never done it, i just thought this was how you were meant to do it. Tell me how it goes because I should have lw8 in a few days ;)

05-10-2004, 06:16 AM
a strange thing is happening ... it works, but as my main mover for the girl is a null, when I want to move the character's place, the collision body stays on place, so I've also parented it to the main character... no way it freezes the scene... parented to that null freezes the scene... but in a scene with just the girl, it works... If I put that girls scene into another scene with the load from scene, I find it unparented itself... ,and if I try to re-parent it... it freezes the scene again.... ahhhhh

BTW, I am using ACS4... any conaisseurs...,?

Hervé:confused: :mad:

05-10-2004, 06:25 AM
Now that sounds like a bug in the scene some how corrupting it all..... Might want to try building the scene up again.

05-10-2004, 08:19 AM
Sorry, I can't help you with that. Maybe email Deuce the scene and tell him how to reproduce the crash, it might be a bug.

05-10-2004, 01:35 PM
Looking at the pictures again, I see that the cloth polygons are all more or less parallel to the collision polygons.

That is consistent with my own tests. When the cloth and collision polygons were parallel, I was able to get collision detection to work well. Where I ran into trouble was when the collision polygon was nearly perpendicular to the cloth polygon.

I think I see why this might be. When the collision polygon is parallel to the cloth polygon, the cloth poly "sees" the entire entire surface area of the collision poly. As you tilt the collision polygon away from parallel and toward perpendicular, the cloth poly sees a smaller and smaller surface area. That makes the probability of a cloth point penetrating the surface area less and less.

If I'm right, this is an inherent limitation of collision-detection algorithm.

05-10-2004, 03:56 PM
Collision Detection uses points only!

05-10-2004, 04:41 PM

A minor point, but I noticed that you have your display subpatch level set to 2 and your render subpatch level set to 3. In the few test renders I've done, the ClothFX displacement won't show up in the final render if the render subpatch level is different from the display subpatch level. You may have to set them both to 2 (or run your sinmulation with the display level set to 3, if your cpu can handle it).

05-10-2004, 05:46 PM
Originally posted by HowardM
Collision Detection uses points only!

That doesn't sound right. Since points have no size, the probability of two points colliding would be miniscule.

05-10-2004, 06:10 PM
Read THIS (http://forums.newtek.com/discus/messages/2/27478.html?)
Read THIS too! (http://forums.newtek.com/discus/messages/2/28051.html?)

05-10-2004, 06:24 PM
Originally posted by HowardM
Read THIS (http://forums.newtek.com/discus/messages/2/27478.html?)

Howard, this contradicts your statement. It says clearly that Motion Designer's collision detection is "using points for the target and planes for the colliding object."

Now, ClothFx could be different, but there's nothing here to suggest that "collision detection uses points only," and I can't really see how such an algorithm would work.