View Full Version : Need cloth dynamic help!

11-08-2006, 05:54 PM
I'm just passing beginner stage here, getting into dynamics - havin' a blast!

I do have a problem though:
I'm working with a collision object and a piece of cloth. The cloth is fixed on all four sides. The C object has an irregular shape with a flat front. The effect I'm looking for would be like something pressing on a piece of lycra stretched over a frame. In other words, I want to see pretty clearly the shape of the object pressing on the "cloth".

I can't seem to get the cloth to have a tight fit around the face of the C object. I want a tight fit - flat across the face and a (fairly) true representation of the irregular borders. What I'm getting is a kind of bulbous effect. I've tried so many setting combinations, I'm dizzy.
FYI: (for some reason I think these are important) I have the collision Radius/Level and the cloth Collision Offset very low. Thought that would make for a tight fit.

What have I missed?

Also - once the object presses out, I want it to increase in size/rotate etc.
So morph targets (for me at least) seem like a much more complicated way to go. I would love the cloth to just react to the changes. Is that possible?

Thanks - JoePoe

11-08-2006, 06:27 PM
Do you want the cloth to stretch across the raised features and miss the lower areas or do you want the cloth to fit every feature?

11-08-2006, 10:09 PM
The front surface is flat, so there aren't any high or low spots (but that would be cool to know how to handle also) - but for right now just flat.
Picture, for ease of explanation, the letter "L" with a substantial front face of course. I want the "fabric" to lay flat over the front surface and then show clearly defined edges as it stretches back to the "frame".

Try pulling taught the t-shirt you're wearing (if you are) and pressing something with a flat face, like a cd case or something, out from it. That's the type of edging I'm looking for.

So, I guess what I'm asking is how do I get the cloth to mimic the actual geometry of the C object more closely.

BTW Both objects are subpatched and the geometry subdivision orders are set to last. Also, I've tried, in my many setting trials, both of the relevant "type" options for the C object - "object-subdiv" and "object-advanced".


11-08-2006, 11:15 PM
Try setting the subdivision lvel to first unless your original mesh is already very subdivided. Also try freezing the collision object.
Heres an example of something I did.

11-09-2006, 11:24 AM
SplineGod - Good morning to ya.

And thanks for helping, although, sorry to say, I'm still not getting it.
When I tried freezing the C object (I also changed the collision Type to just Object), I got no interaction with the cloth at all. aaargh.

Your 3dtext.mov is excellent and very close to what I'm trying for (without the gravity of course). Is there a companion tutorial for that video?
(hopefully available for download:D)

Also, I tried simplifying my scene to focus in on this dynamic. I replaced the C object with a simple box collision object and dropped the cloth on top of it (like your video). I'm getting a nice flat top surface, but the edges are still WAY rounded (on the inside of the box collision bounding box by the way).

I still can't help but think I'm missing something simple - like finding just the right balance between collision offset, bound, friction and fix force.

11-09-2006, 11:54 AM
I dont have a tutorial on that. One thing you might try is increasing the subpatch level of your cloth object and setting the subdivision order to first.

11-09-2006, 12:40 PM
Another thing that might work is to render your object and use that as a displacement map.

11-09-2006, 04:44 PM
One thing you might try is increasing the subpatch level of your cloth object and setting the subdivision order to first.

Oh boy - the calculation is excruciating. After all that it's better but still not great.

Yes I've done this (ish) using the diplacement map technique. It's a lot of hand work with envelopes on the size/placement etc when I know, or think I know, it can be done through cloth dynamics.

11-10-2006, 06:42 AM
Why not stencil the shape of your letters in the fabric, clean up the polys, sub-D it and just drag the stencil shape out at the apropriate time? You don't have to bother with cloth dynamics, it works a lot faster and the effect is the same....

11-10-2006, 12:06 PM
Hey Sarford

(Let me fist preface all this by restating that I'm fairly new to this, so please correct me if I'm wrong!!)

I see your point. That would work just fine if the motion was a simple out and in, or even out at a specific skewed angle and back in etc. No problem.

Ideally, I want the object, while it's interacting with the "cloth" to grow in size and rotate on a couple of axis (or is it axes?). So, I don't think the geometry gained from the stencil would give me that flexibility. No?
Picture a cube pressing out. At one point there would be a flat face, then an edge, then, maybe, a corner point - all the while changing in overall dimension (yikes!).

Morph targets are another option. I'd just need a whole lot of them.

I'm actually getting a lot closer with the cloth dynamic.
SplineGod was right on. I've made huge progress by taking the original geometry of the cloth way way down, bumping up the subpatch level in layout and setting the subdivision order to first. From there I think I just need to find the right balance between the collision offset, sub structure and hold structure settings to get the effect I'm looking for (the edges are still a little rough).

But, by all means that doesn't mean I don't need/want any more input.

Thanks :thumbsup:

11-13-2006, 08:23 PM
Hey SplineGod! - just wanted to say thanks!! :D
I think I've got the hang of it!

here are a couple of 3 sec tests:



11-13-2006, 08:31 PM
Cool! Those came out looking pretty good. What did you finally come up with?