PDA

View Full Version : cloth and collision



sadkkf
08-30-2012, 05:18 PM
Hi--

I've got a cylinder object with discs spaced out inside. I want the cylinder to be cloth and the discs to be collision objects.

This is modeled as one object with the discs on layer 1 and the cylinder on 2.

Both layers have collision effects on it and layer 2 also has cloth. When I calc the effects, there's no collision. Any ideas?

Dodgy
08-30-2012, 05:52 PM
The collision objects are very thin, so you might want to check out my youtube video on this subject:

http://www.youtube.com/watch?v=qRh2Jpl4_Vk&list=UUV1ks2APY9Mn21UlSJe4IcQ&index=7&feature=plcp

sadkkf
08-31-2012, 08:59 AM
Thanks, Dodgy. Learned quite a bit from your tute, but still can't this to work the way I want. Not a big deal. I can probably get away with effectors for this.

Thanks again!

phillydee
08-31-2012, 09:44 AM
what's your ClothFX calculation resolution set at? Maybe worth a look

phillydee
08-31-2012, 10:04 AM
Just a quick and dirty test. Packaged scene included. I don't know if what I did will help but it *should* work as advertised

:goodluck:

sadkkf
08-31-2012, 01:57 PM
omg...that works great! Thank you!

I copied your settings to my setup and it didn't work so I need to spend some time looking it over more closely.

Thank you again!

phillydee
08-31-2012, 02:06 PM
Sorry I didn't have much time to refine or list out what I did. Was early and I had to get rolling with work... I'll try and list here my thought process in trying to solve the issues you were having:

1) you may need more vertices in your cloth

2) try "Exclusive Collision" with the discs

3) make sure you have two-sided collisions enabled on the cloth

4) In my scene the diameter of the discs are 1m. To keep the polygons from intersecting, I set the collision distance to @ 7cm IIRC

5) I like to create the cloth larger, and then use "Polygon Size" to 'shrink wrap' the cloth. You may need to start your calculations at negative frame values so that by zero your cloth is all settled etc.

6) try increasing the resistance value to get the cloth to settle down... I didn't really play with it, just tried to get the cloth to "work"...

I don't have the scene open so I don't know what else.

Hope that helps!

sadkkf
08-31-2012, 02:29 PM
Oh, man, no worries. You've helped a lot!

Looking over our two scenes the biggest difference I could see was the exclusive collision. When I added that, mine rendered much more realistically. I tweaked some other settings and am now very close.

I also noticed you subpatched the cloth, which mine wasn't.

The main thing I want to do with this is move the discs back and forth under the cloth. It kind of bunches up so I think I need to make a denser mesh. I'll keep tinkering, but you got me 99% there.

Thank you a ton!

phillydee
08-31-2012, 02:38 PM
If it bunches, try playing with the collision's friction settings, like reduce it or put it in the negatives. I don't know--that may or may not give you results you want.

Oh and about the Sub-D'd cloth: ClothFX will only use the base mesh to calculate *IF* you have Sub-Ds set to "Last"....

If you're still not getting results with the sub-D cloth, you may need to add more vertices. (I found that using evenly spaced points, ClothFX behaves a little better)

As always, YMMV.:goodluck:

sadkkf
09-01-2012, 07:58 AM
I am messing with the friction and some other settings with mixed results.

When I set the SubD to render last, the cloth object ignores the collision with the discs.

For reference, I'm looking to create something very similar to the gobstopper machine in Wonka's factory, but without so much slack:

http://www.youtube.com/watch?v=-9RiflNC8KY

I actually have a weekend off so I'm going to really mess with this and see what I can do.

Again, thanks for all your help!

Dodgy
09-01-2012, 05:39 PM
When I set the SubD to render last, the cloth object ignores the collision with the discs.

It sounds very much like you don't have the resolution in your cloth to 'see' the discs when subd is set to last, like I explain in the video I made. You have to have a high enough poly count that points are able to hit the dics as the cloth falls, otherwise the object won't collide. Phillydee's set up works because he's fixed the ends and the mesh near the central disc is dense enough that it can't go through the disc without a point passing through the disc in the middle. Your mesh converted to subdivisions and with subd set to first will have more points and more likelyhood of points colliding.

sadkkf
09-02-2012, 07:48 AM
Thanks for all the input.

I spent some time tinkering with all the settings and honestly can't say where things started working. I boosted the res of the cloth mesh and diameter of the collision objects.

Because the inside disc needs to move I couldn't get away with adding more polys in only one spot. Also, to reduce the bunching I found increasing the viscosity helped the most.

Have a look and see where this ended up. This is part of a much larger anim, but this needed to be done first as a proof of concept to see how the rest would go. I'll still tweak this, but am convinced it can work.

Thanks again!