Chain with nCloth - prevent it from breaking


#17

its pretty simple, look at this image and refer to my scene, you should be able to figure it out-

pink is the hero link, model it 1st.
then model the green simple poly, that fits in the center of the hero.
then duplicate them, combine them, and follow the rest of my scene...

#18

you need to understand that you do not generally (never if you are me) simulate the hero geometry.

you make a version of the hero geometry that is cloth-friendly, simulate that and wrap the hero geo to it

.j


#19

Hi,

thats really a nice method, I tried that and it works but which attribute prevents the geometry from deformation. I tried different Shapes of the sim-geometry and different number of edges and I played around with the restistance attributes. How can I make the chain-elements stiff without making the whole chain stiff?

thanks


#20

stretch,compress,bend and shear resistance.

could play with very little deform or rigidity, but youll get some strange results (may be good for you though)

damp and stretch damp too.

could also play with constraints to keep them stiff… but that will get slow sims.


#21

for each link, select every vert and make a componentToComponent constraint with a max distance so it includes all verts in that link.
now every vert is connected to every other vert (in that link) so it cant bend.

I would avoid rigidity, does not work if you are setting your initial state far from origin… just tries to pull the whole thing back to origin as fast as possible… bug has been around for years…

.j


#22

Sorry it doesnt prevent the geo from deforming. I spended a lot of time figure out what the attributes are doing. I selected all vertices of one ring of the simulation geo and pressed “component to component Constraint”. Is there another way of fixing one set of vertices? or did i make a mistake?
(my chain is one mesh and one nCloth object, right?)


#23

sounds like you are not setting it to max distance.

what does the resulting constraint look like?

it should be a connection from every vert to every vert in a link.

1 constraint per link

.j


#24

should look like the attached image (constraints selected)…

.j


#25

I did have the same problem with deforming links. Nether thought of doing the constraint as John did, probably it is a better solution…
I solved it by attaching render links not with wrap deformer, but with hair follicles to the center of the low link poly. Our render people wanted all render links to be separate, so this solution came up early in the process. You just need to make sure that UVs of your low poly solve chain are O.K, so that hair follicles will be attached properly.
I use it in production, and it works pretty well. It needed some scripting to do the initial setup though…


#26

I had to increase max distance to 10 to make it similar to your picture, and increase the strength of the constraint to 1000 to make the sim chain with almost no deformations, but I wonder that the wrapped geometry deforms stil way to much.


#27

http://img693.imageshack.us/img693/6682/playblastchain4.mp4


#28

I found a better solution then wrap deformers, binding the chain geometry (elements not combined) to joints which are constrained to the faces of the simulation geometry.


#29

Yep, it’s the same concept as using hair follicle, brueghel.


#30

Just throwing in a few questions here.

For clothed characters in production, how low do you usually go for both the passive body mesh and the cloth mesh? Going too low on the cloth mesh could lose finer wrinkle details so do you handle such specific shots separately maybe with a higher resolution mesh?

Also, the recommended value for space scale is usually 0.01 to let the nucleus solver know that the model units are in cm. However, I’ve always had a really hard time to get predictable or desirable results with this value. Usually the default of 1 looks better. And all the examples from Duncan’s tech talks, on these forums and even the visor use a space scale of 1 (though I’ve seen it mentioned in other threads that one should use a space scale of 0.01 with the presets). So for a clothed character in a production pipeline is 0.01 the norm or am I just getting this all wrong?

To illustrate the problem, I’ve attached a sample file with two nCloth leaves falling to the ground. One nCloth is in a meters nucleus system and it was relatively simpler and faster to setup using the silk preset as a starting point. The other one is using a nucleus solver in centimeters mode and I really had to fight this a lot to come up with usable values. And the result is still not as satisfying as the meters one.

-Sachin


#31

With the space scale at 0.01 the gravity is 100x stronger. (but should be at real world speed if you modelled in cm) This makes the simulation much more compute intensive. You may need stretch resistance around 500 and substeps of 50 if the mesh is fairly dense.

Those demos and such tend to be with the default space scale just because it is good for interactive demos and such. However the simulation will appear in slow motion if the space scale is 1 and the object was modelled in cm. Garments will move around much as they do on space station astronauts.

Duncan


#32

The Autodesk nucleus whitepaper does talk about the space scale mostly affecting the gravity. But like you said Duncan, the stretch resistance also increases at the cm scale. Is there any general guideline to come up with an appropriate value for the stretch resistance for a given space scale or is ~500 just a good value to start with? Say a preset created for meters space uses a stretch resistance of 60. When I change the space scale to 0.01 do I multiply the stretch resistance by 100? Or just double it first and then check the sim?

The whitepaper does explain the substeps part well and in general recommends using a value which maintains at least 1 collide iteration for every 10 stretch iterations. So I understand using around 50 substeps for a stretch resistance of 500. Its the latter that tricks me most of the time.

Btw, great videos and files in your recent tech talk post on the blog, Duncan. Some really out of the box examples of using Nucleus in so many interesting ways. The side winder and worm examples were really cool. Never realized one could use drag to move a snake forward so convincingly!

-Sachin


#33

substeps of 20 and max collision ittrs of 30 work well in production…
cm with solver scale 0.01
stretch resistance around 100-200 for normal cloth…

give this thread a read
http://forums.cgsociety.org/showthread.php?f=86&t=811248&highlight=tips

.j


#34

The thing that makes it complex is the density of the mesh, as well as how fast the character and elements are animated. The values for stretch resistance and such that you need tend to go up exponentially with the resolution of the mesh. It is different if you use “object space” instead of the default “link” scaling relation setting. This and the “world space” setting attempt to compensate for mesh density. Additionally the “world space” compensates for the scale of the object(in general most users would probably prefer the “object space” setting, as the worldspace one can make small meshes expensive to compute)

In general the stretch resistance that is “good enough” is a small fraction of the real world values. To compute the true stretch resistance of silk would grind your computer to a halt. You could hang a ton on real silk with very little stretching, but for simulation all we generally need is enough to avoid stretching under modest movement and its own weight. Thus the settings often depend on the fastest moving element in the scene.(sometimes it can help to use animated input mesh attract or constaints to help deal with occasional extreme motions)

Any solver needs to iterate in time and the amount of computation is generally linearly proportional to how fast all the motion is. The primary driver of motion is gravity, but one also has things like keyframed constraints and collision objections. If one has a coat on a mouse it is harder to simulate than one on a giant because the motion and acceleration of gravity is proportionately much stronger at the smaller scale. (cartoon mouses move slower than real ones, though, because we anthropormorphize them… the reverse is often true of giant characters)

At any rate if you change your space scale from 1 to 0.01 AND gravity was the only motion in your simulation AND the simulation was just barely non-stretchy enough then increasing the stretch resistance by a factor of 100 would be required. Also if the collisions were just good enough then you would also need to increase substeps by a factor of 100, however generally the collisions at the lower gravity level were probably OK if nothing else was animated. In practice one would generally only need to increase it by that factor if the character animation was also sped up by 100.

I wrote most of that white paper btw.

Duncan


#35

That helped a lot Duncan and John. Thank you. And I actually find your nucleus paper more descriptive and useful to understand these attributes than the help docs.

You could hang a ton on real silk with very little stretching, but for simulation all we generally need is enough to avoid stretching under modest movement and its own weight.

That reminds me that using the silk preset on a dress in 0.01 space scale, the cloth really starts drooping a lot during the initial run up. So I had to increase the stretch resistance further to avoid that. Its easier to understand why after your post.

-Sachin


#36

its all just voodoo magic anyhow, so just test it out :wink:
trial and error! you eventually get a ‘feel’ for what works best…