Chain with nCloth - prevent it from breaking


#13

its easy :wink:
i did kinda what john wrote.

load the scene, and unhide the cloth object, which is simply a flat poly with 6 edges, for each link… duplicated and combined to make one object. same for the actual render links which are wrapped to the cloth.

its pretty straightforward… just mess around and take a look at everything.


#14

Hi LuxX,
Howard’s sample scene is very well illustrating the principle, and if you will follow John’s instructions you will get there. There is really nothing I can add, except give yourself some time to play with settings to get the result you need :slight_smile:


#15

depends what your idea of a long time is :wink:
and how many layers of cloth you are solving…

you throw a multi layered, 100,000 face costume in there, it aint gonna solve in real-time I’ll tell you that.
But it probably wont solve at all with substeps of 10 :wink:

I have never had an solve issue from too many substeps…

.j


#16

Well guys sorry but as i said i dont know much about Ncloth so help me out a bit plz

take 1 hero chain link: you mean make 1 link that you will duplicate later on ?
make sim geo to represent it= what do you mean by this?
make 1 poly face with probably around 15-20 edges where the edges are in the center of the hero link = I totaly dont understand anything what you say here?
ie, an n-sided face with no internal edges

now duplicate a few times and arrange them to make you chain= I get this part :slight_smile:
the faces will intersect, use wireframe view it should look more like a chain (made of wire)

combine them all into 1 mesh.= know how
make cloth.= know how
set self collision to “vertex edge”.= know how
increase “self collision milti” to thickness of your hero geo

now display the self collisions, there should be no intersections.

hopefully that makes sense, I dont have anything to draw that here…


#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