Component to component Maya nCloth


#1

Hello,

Is there a way to optimize the component to component constraint for Maya nCloth? I am experiencing ~30min calculations every time i rewind. I’m using default settings. Poly count 70K. At this rate I’m going nowhere.

Thanks for any help!


#2

constraints by nature will slow down your sim but the key to realistic calculation times is to use within max distance and get away with the least amount of connections as possible.

If your still too heavy consider using a lower rez mesh to drive a wrap deformed high rez piece of geometry. Cloth still deforms well at lower poly counts.


#3

Great! Thank you!

I was trying to use max distance but the calculation time (each time rewinding) was just way to great. I like the idea of using a lower res mesh to drive the high res surface using wrap deformer. I am however trying to rip or peel the surface so I’m not too sure how I can do that in conjunction to using the wrap deformer.


#4

the peeling definitely adds more complexity to your sim…ill have to think on that one, maybe, if your lucky, one of the NCloth masters on this site will chime in and give you a hand.


#5

Thanks again Michael!

Yes that would be great! I found some topics on peeling but nothing about optimizing or properly using the constraints. My sim is looking good. Now all I need is for the cloth to stick and tear and not give off individual triangles.

>30 min assigning the constraint.
>30 min updating any settings.
>30 min rewinding

Thanks!


#6

So I’m still trying to figure out the best use of the constraints. Some specs:

Poly plane 75200 subdivisions 75200 (Constraints too slow)
Breaking up the plane into ten pieces then applying constraint. (Too slow)
Simming only one piece of the ten. (Less slow but not very organic looking)


#7

Hey there, i thought i would chime in here. Its such a pain, but when creating dynamic constraints on this many polys, its always gonna be slow.

I dont really know if i can suggest any ways to optimize that you havnt already tried.

I dont think there is a way (that im aware of) to use wrap deformer in conjuction with geometry that has changing point count/edges, but maybe if its pre-torn there may be a way.

Not sure what you mean by ‘give off triangles’?

So first you want your poly count as low as possible but still enough for what your trying to achieve;
Optimize your input mesh first, make sure your using triangles, that have not been subdivided uniformally.
How you tear, how you smooth between tears all affect this, any additional nodes here will increase the constraint calc time.
All previous operations to the mesh will be considered in the constraint reset, so keep this in mind.
Test your settings on a smaller scale sim and apply to your full scale.
Also if you know you want to rewind for some other reason than to re-sim the cloth, be sure to disable it first (took me ages to remember this one!)
Cant remember off the top of my head what component to component defaults to, and this is entirley dependant what your going for in your scene, but under the nComponent node your will find the connection the constraint is making, edge will be very slow, but more accurate, for speed choose vert(may be named point).

With regards to speed, so much is dependant on your workflow.

Again depending on what your going for, you can still get a tearing effect and forego constraints all together.

Once you have cached, turn the cloth off and enjoy your 2 second rewind time :slight_smile: (its super satisfying!)


#8

Thanks for chiming in!

Yeah I’m experiencing slow calculations at 5K verts. That’s when I isolate a fraction of the entire mesh. So I was contemplating assigning constraints over a grid pattern. Then I read from Duncan that it’s not wise to add multiple tearable surface constraints to one mesh.

You have great pointers, all of which I have tried. Disabling the constraints before rewind is genius!!

I am basically ripping the crust of some land and we are looking for a tearing effect as it happens.

I’ll see how it goes today.

Thanks again!


#9

This is a great example:

https://vimeo.com/54526413


#10

Hmm, a slow calc at 5k verts somethings not right, for instance i recently had a tearable surface constraint on a 180k and had reset times of around 5 mins.

Without knowing your workflow, and if you’ve tried the pointers in my previous post, its difficult to pinpoint where your calc times are coming from.

When you say a crust of land, is it a flat surface your workingwith or does it have depth, just because i hear breaking land i think solid shatter. You’re creating this on a plane right, not a thick mesh?

How come you need multiple constraints of the same type for one mesh if its all tearing? As long as its the whole mesh, definitley stick to one.

Ah yeah, i can let you know 100% - without any doubt, that was not made using any sort of constraint, and forgoes them completley, as i mentioned is an option in my previous post.


#11

I am a huge believer in using pre-torn meshes. So much more control over the final result and infinitely faster sim times. Even if it takes a day to model you pre-torn mesh you do a few speedy resets/sims and you made up that time.
https://www.youtube.com/watch?v=kgbN7hWx0h4
This is a spot I built the sims for and we used all pre-torn meshes for the tearing paint and added some additional flake elements at the end. You can use an edge to edge constraint which is quite fast if you can explicitly select the edges to get the same “tearing” behavior.
I paired that setup with animated maps for input attract and had a very directable setup.


#12

Thanks for all the input!

I was thinking of ways to speed up the simulation by break9ing up the mesh into several. Applying ncloth to all my pieces and simming each quadrant one at a time. That’s really not working out that well. I’m at my whits end. So this is what I am doing.

  1. Create 75x200 mesh.
  2. Using ninja shatter to break it into 500K something pieces.
  3. Kill all history.
  4. Combining.
  5. Create nCloth.
  6. Applying component to component constraint to get peel effect. Weld, max distance, glue strength.
  7. No collisions on cloth.
  8. Lowering nucleus settings.
  9. Applying volume axis to push the cloth.

Animatedfox - great stuff!!

FyreFlare - Yes the surface is flat. I figured I’ll give it some thickness once it’s cached.
Oh so he’s not using constraints. I guess the sheer density gives that illusion.
Maybe this is the wrong technique all together. The goal is to have a layer of sod that gets ripped up by wind ending up in a vortex.

Thanks again! I’m learning a lot from your feedback.


#13

Splitting a mesh up into 500K pieces is going to destroy any simulation. That is a massive number of pieces to compute with a max distance constraint. You should really try to work in layers with FX stuff…everyone will be happier. Sim 100-1000 large chunks. Cache that out. Isolate sections for additional smaller chunks. Then add additional particles and instanced chunks to your hearts content. So much more control and infinitely faster sim times.
You could also use a much lower resolution grid for your initial shatter. Then shatter and do a poly smooth. This will ensure you have quads which nCloth finds very tasty.(maybe ninja shatter gives you quads, never used it)

One little tip for your constraints, anything that you can do to use a setting other than max distance will make things much faster at reset on such high resolution meshes. Just spending a few minutes trying to refine your selected/affected components will save you time. The idea of selecting all those shattered edges might seem daunting, but it isn’t that bad really. Select all of your components and then shrink your selection [SHIFT]+[,]. This will deselect all of your border components. Then invert your selection [CTL]+[SHIFT]+[i].
While it wont be perfect, it should help cull out a few components from your constraint which at the scale you are working right now could help a little.


#14

A big thank you!

Your suggestions worked like a charm. :thumbsup: :thumbsup: :thumbsup:


#15

Also take a look at selection constraints. This a very powerful way to select borders and other ways. It’s one of the few area Maya does well with polygons.

https://www.youtube.com/watch?v=rvFEtTVPKEo


#16

Thanks for the link!

Yeah the constraints are incredibly powerful. Got it working as long as I was willing to wait over night for cache. Looks pretty darn good. However, I elected to go without the constraints in the end. With small enough chunks and some fine turbulence it looks wispy enough and trails off real nicely.

Thanks again!