Maya VFX Series: nCloth for Character Animation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this is Reza and welcome to another video of effects series in Maya in this video we're going to learn how to use ncloth system to generate a realistic cloth behavior for our character now in this scene I have a simple character and it just goes through an apt it's a mocap with the rig and the rig has been skinned to a geometry nothing too special now before we put the ncloth in I just want to walk you through the rules and guidelines and how to prepare for the scene now I've prepared the clothes in Marvelous Designer but feel free to just extrude from the geometry and write apologize with this it comes with side pockets and everything is ready to ready to go as you can see the character is rather massive each unit is one meter in marvelous and I can deal with that in Maya when we apply and cloth simulation but just so you know that was my way of creating cloth for my character now when you export this into Maya this would be the type of topology that you receive so it's rather horrendous it's not really working for us and to be honest with you if you want to start with this it is almost impossible to get it right with an cloth so what I had to do I had to Rita pologize this and convert this to evenly spaced quads and there are a number of ways you can do that it can use topology tool in Mudbox you can use topology tool here in Maya it can remesh and then reach apologize or you can use zremesher in ZBrush and that was the method i used to create clean geometry and here's the clean geometry that I managed to create now it is really really important to have quads and not end guns in your scene if I come in you can see I have side pockets and if I isolate trousers you can see those side pockets I can actually look into it and these are all holes now for any cloth that is a problem so let's I think it's a good time for me to talk about guidelines and rules on what ncloth expects to receive as a clean geometry and only then it behaves as it should be first rule is you need to have quartz so you can get away with few triangles as a matter of fact I do have few triangles under the armpit and few areas but too many triangles again will result in really bizarre deformation the second rule is it needs to be single sided you can have double sided geometry but out of that you need to create a single sided geometry and when you finish your end cloth simulation you just wrap it to your high resolution mesh and you take it from there but for the sake of simplicity I've started with single sided and it it just gets the job done and last but not least you need to make sure you've got no non manifold geometry this means that if I go to mesh and clean up option box and enable non manifold geometry faces with holes and concave faces if I press clean up I should not receive any errors while you're at it if you have any end guns convert them to quads using multi cut tool in Maya I've also gone ahead and you've eat everything nicely I did the same thing for the trousers I also now let's go back to our character and export this to our animation scene now here's the character and I simply imported the trousers and the shirt into the scene what I did with the trousers I sealed all the holes so I closed the pockets I closed the zipper and any other areas that can cause us headache I did the same thing for the shirt another thing I did I gave myself 50 frames as a pre-roll now you cannot start simulating from frame 0 because the cloth needs time to settle usually somewhere between 50 to 25 would be a good number so if I click on the character and scrub through you can see from minus 52 minus 25 the character doesn't move at all now from minus 25 to frame 0 it comes to original position and only from frame 0 the character does the act so I'm just gonna switch back to minus 50 also I need to make sure that for my end cloth under time slider preferences playbacks peak is set to play every frame so ncloth can actually simulate every single frame or calculate every single frame alright with this we are ready to go what I don't want to do is to simulate the actual geometry that I have on my character and use this geometry as my Collider I would like to create a duplicate of these models so everything is nicely preserved and any other extra calculation that I have can be applied to the duplicated mesh before I do that I'm just gonna go in expand my character select my rig press ctrl-g on it and put it in a nice group node with clean transformation left then I'm going to select character and the clothes and press ctrl-g on that as well just gonna call this care underscore GRP and i make sure i won't touch that or apply any nucleus node or cloth simulation note on that so this needs to be completely clean you will see the benefit of that shortly now it's time to bind everything into the character so i can just duplicate a copy knowing that they all follow the same movement i'm just gonna go and expand my character shift-click on that plus sign to reveal every single bone in this rig then i'm going to select the hip scroll down a shift select the very last joint which is a right to end with that i'm gonna control select the shirt and trousers i'm gonna go to rigging menu set i'm gonna go to skin bind skin reset the tool and just go bind selected joints now if I scroll everything moves with the character I'm just going to go and hide the joints that's good time to duplicate them just gonna collapse the character select John Doe press ctrl D and shift p to drop it out of the character note then i'm gonna select de trousers and shirt control d shift p excellent now they all have locked transformation because they were skinned to the character originally until i duplicated them so with all three selected I'm gonna go and select them all right-click on it and go unlock selected I don't want any deformation to be locked and that these are gonna be the guys that I'm going to work with for my in-class solution not the original character group you may want to have other things in the original character group including props assets and you don't want additional extra nodes on them instead you want to work with clean geometry with no interference or no additional calculation on already skinned geometry perfect I'm just going to select them all put them into a group and call them blend shapes we eventually going to blend shape them to the original character and original shirt and trousers it's gonna call this John Doe underscore glen shape again naming convention is really important for me and i do spend the time to rename every note shirt blend shape trousers let check now it's time to simply connect the skinned geometry to the blend shape right now if i were to hide my character there is absolutely no animation in here and I do need the animation with correct deformation on my blend shape notes so let's do that it's gonna expand the character group note select the John Doe body control select the John Doe body blend shape I go to animation deform Len shape not gonna go to option box really there is not much for us to change just gonna go and work with the default I'm gonna go ahead and create on the right hand side in the blend shape node I'm just gonna enable John Doe body blend shape waiting to one so blend ship actually works and I'm gonna do the same thing with the shirt for the rigged character select the shirt control select shirt blend shape deform blend shape go to blend shape input node and enable it's waiting trousers control select trousers blend shape deform blend shape you can also press G to repeat the last tool now if I go ahead and hide character group node and only look at my blend shape I can actually see things are moving now that would be the geometry that I apply in cloth to not the original scene I've already gone ahead and hit the character group note I really don't need to manipulate it or modify it by accident so it's hidden now great now I'm in a good place to start with end cloth simulation so I'm just going to save the scene and next would be for me to add an cloth to the trousers once that's done I'm gonna add apply and cloth to the shirt and we simulate everything together we clean up the scene and pretty much finish since I'm gonna just focus on the trousers I don't need to see the shirt so I'm just gonna go ahead press Hetch on it to hide it for now and let's go to effects and cloth and create an in cloth as soon as you do that you can see Maya is creating two separate notes one is my end cloth note and the other one is nucleus now nucleus is a general solver and particle and cloth and in hair are actually using this new note to solve the simulation it's the heart and the brain of your simulation and your end dynamics won't work unless you have nucleus note enabled we have n cloth as well and this end cloth node is in charge of the overall behavior of the cloth or the fabric now since we since we are going to turn more than one polygon geometry into an end cloth it is important for me to name this so I know exactly what I'm dealing with so this one is n cloth trousers for nucleus I don't need to rename it because I'm just gonna go with only one nucleus node for the entire scene now just very quickly I select my ncloth node and go to windows and node editor and expand the nodes it is really remarkable to see that every single joint that I have in the scene will go to a skin cluster and to its shape node and then we made a blend shape and connected this shape node to our blend shape shape node and then we created an end cloth out of it and the nucleus an end cloth always go together hand in hand and out of that we have the output mesh note it is really important to acknowledge that this node exists because we don't we no longer look at short blend shape nodes we're actually looking at the output cloth mesh node so this mesh that we see is no longer shirt blend shape node it is actually output cloth mesh note if you want to bring back the original node you can just simply go and display input mesh to bring back the original mesh but there is no simulation on it so if you bring it in you won't simply see any movement all right I hope it makes sense let's go and press ctrl a to go to attribute editor and go and select the end cloth and let's see what we're working with we basically have two very important rollout that we constantly go back and forth and tweak in our end cloth node one is collision and the other one is dynamic properties when you actually specify what exactly what type of behavior you expect from that cloth in our nucleus node we have three rollouts that are very very important the first one is force field the second one is the quality of your in cloth which is solver attribute and the third one is scene attribute which is in charge of the scale of your scene and very similar to other dynamic behaviors in Maya scene scale is very very important we'll get to that in a second for now I'm just gonna select my ncloth node and I'm gonna start with a decent preset and go to preset and apply t-shirt now this gives me a relatively good starting point obviously a lot needs to be tweaked but for now I think it gives me a good starting point to begin with now I'm gonna go and select my nucleus node and for now I am going to increase my sub steps to 10 and 12 3 & 4 are just simply way too low to simulate anything one thing I forgot to do actually is to go to my nucleus into time attribute and my start frame is not frame 1 my start frame is minus 50 so I'm just gonna quickly put in minus 50 in there also another thing that I need to be mindful of is right now there is no collision object so this trousers cannot collide with anything it just gonna fall down so I'm going to select my John Doe character and I'm gonna go to ncloth and make that a Collider through create passive collider in the option box it acknowledges that I'm using this nucleus one node and I'm gonna go make collide now with these two changes I can now go ahead and do a play blast to create a play blast I prefer not to just play blast the scene but first encash the scene and only then I go through a quick preview so with the geometry selected when we I mean effects menu set I'm gonna go to n cache create a new cache an object option box I'm gonna earn cash the entire scene using cash frame range to time slider and go create alright let's play well as you can see I would call this a true disaster so the trousers are falling down and the cloth is actually coming out of the body so nothing is working but one thing actually works and that is the collider so that part of it I'm quite happy about but the behavior of the cloth is very very erratic and unexpected so let's close that I'm going to go back to frame 1 let's select the pants go to collision solver display and I'm going to enable collision thickness I wanna see how thick the cloth is when it comes to collision well this is way too thick I'm just gonna reduce this to probably point 0 to 5 that's much better I am going to switch back to off and I'm gonna check the same thing for the body I'm gonna go to collision thickness and [Music] again I have thickness 2.5 and I think it's way too high I'm gonna change this to 0.2 0 5 and off now it's time to put in some constrains so the pants won't fall down and the clothes stays put at least it's absolutely important for ncloth simulation to have correct constrains in place and the constraints that I use for ncloth is point to surface so I'm gonna select the first two rows control right click to vertices to vertices or you can go ahead and select them manually so you select the points shift select the collider go to n constrain point to surface we are gonna have a lot of constraints so I might as well go ahead and name them as we go we're gonna call this trousers talk copy the name then I'm going to go down and here go to edge select the first one select the second loop first loop second loop control right click to vertex to vertex select my Collider and in constrain point to surface I'm just gonna rename this one to again names don't need to really make sense as long as it makes sense to you now one good checkbox that I really use in my constrains if I and select my constrain and go to my attribute editor is that exclude collision it kind of pushes out any hgo interpenetration and I found this actually quite helpful so I'm just gonna select the constraints on both constraints and I'm gonna take that check box under strength drop-off rollout also I noticed that the trousers do drop down right at the beginning simply because the material is not rigid enough for a lack of better word and this is something that you need to always change in your end cloth so first things first I'm just going to reduce the friction to 0.1 I found the default value is always too high now if you found that yet the pants or the clothes are actually going up and down like a spring then stretch resistant and compression resistant is the one to change I'm going to start with stretch resistance of 80 and compression resistant on 20 if you double this double the next one as well these two usually work hand in hand and I'm going to reduce my bend resistance a little so I get more pleasing lines on my cloth I try not to touch rigidity and any restitution angle or tension since these are for hard surface objects so never altered them on a when you're working on characters clothes I'm gonna go all the way down into damp I found the overall default value is always way too high so I'm just going to reduce it to something like 0.4 and mass I want to have a slightly heavier cloth so I'm going to increase the 0.6 to 0.8 now before we make too many changes let's encash this again so I'm just going to encash and delete the existing cash all right we back now you can see with only few changes we made we see dramatic improvement on the look of our simulation we have some geo interpenetration and that sub-step issues simply because maya cannot catch up with amount of simulation that is happening so rapidly so we need to increase the substeps that's for sure but I'm really really pleased with the result I think we need to a little bit work on these areas and we're almost there there are few tweaks and enhancement in the quality of the simulation is needed but apart from that I'm actually fairly pleased with the result so let's go ahead and make those changes now I want to make these areas a bit tighter so the way you do that and the way you partially have an impact or effect as the region of your geometry or your end cloth is through painting and you do that a lot we every time you use an cloth you need to know how to paint a specific attribute on the model now the attribute on a target is rest length scale I want to reduce it to something like point 9 but not on the entire model only on these areas so I'm gonna right-click go to the hand and cloth vertex and rest length scale the double-click and my tool settings with the ramp enabled I'm gonna go to replace and probably use a value like point nine I'm gonna zoom in and just behind these areas so this point nine four rest scale only affects this area I'm going to go switch to smooth and flood everything a couple of times so the overall influence is smooth enough okay that's done also I'm going to go to quality settings and this max self collide iterations I'm going to increase it to eight it helps with the collision and the artifact that I'm getting I'm gonna scroll down and enable trap check on the model and increase the push out to something like point of one so it pushes out any cloth that has been trapped into the model I found this actually very very useful and I feel like I still need to reduce the down but not much is happening so I'm just going to reduce the damp to point to and see what I'm getting now it's time for me to address also a very very important aspect of my simulation and that is my space scale as you can see I have my measures here and this guy is 182 centimeters tall which is somewhat realistic what Maya calculates is every unit is one meter this means that this character is hundred and eighty two meters which is just massive just gonna use point two five for now and see how we go and that should help us with the movement of my simulation and into sub steps and let's crank up the number to something like 30 and 35 now I'm going to delete the old cash in cash it again and do another play blast and we'll be back all right let's play fantastic reducing scene scale an increasing sub step truly works so you need to really constantly be mindful of the scale of your scene and make sure that the resolution did you have matches the movement of the character I'm actually fairly happy with what I have so I'm going to save this scene and export this geometry as an Alembic the way to do that is to go to cache with the model selected go to olympic cache and export selection to olympic i'm going to make sure that right color set is enabled and UV right is enabled as well and i'm just gonna call this trousers version 2 and go export now I'm going to hide the trousers and I'm going to hide my end cloth and go ahead and deactivate it I'm gonna do the same thing from my constraints I'm gonna go ahead and deactivate them now it's time to bring the shirt and I'm gonna go ahead and import the Alembic so I'm gonna go to cash a lambic pack cash and import the trousers just going to give this a shader and read it doesn't matter what color but just gonna go ahead and give it this color for now now the reason I'm doing this is to create that extra level of collision between the shirt and the pants one way of doing this is to simulate both of these objects at the same time but I found that much easier and more straightforward to just bring this as an Olympic turn it to a Collider and then create that natural behavior now with this pants selected I'm just going to go to ncloth and just convert it to a passive collider and I'm just gonna call this trousers now I'm gonna see a select D shirt and turn that to an end cloth go to option box make sure nucleus is selected and rename it to sure I can go ahead and turn off constraints for the trousers as well we don't need them anymore no I'm pretty much gonna do the same thing for the shirt so it should be much faster for you guys to just go ahead and rinse and repeat first things first with the end cloth know it's selected I'm going to choose t-shirt preset and while I'm at it I'm gonna go ahead and apply my constraints you now for the geometry itself I know for a fact that because of the scale of my scene stretch resistant and been resistant neat tweaking without even doing a play blast I'm going to go ahead and change them it's gonna set my stress resistance something like forty and compression resistant to fifteen Bend resistant to the same amount that I did for the trousers now I need to do one thing then that thing is new and we didn't do that in in the trousers and I need to make sure that this area is not going to deform too severely since usually this area in in the cloth is rather rigid again I need to paint that because it's just a region that I want to have an impact on now the attribute I want to target is input mesh attract so I want this area to get attracted to the base mesh not the simulation mesh I'm just gonna go to the Hanes vertex map and target input attract go and go to replace probably 2.7 and zoom in a little set it to smooth and smooth it out while I'm having this I'm just going to do the same thing for the sleeves as well you all right excellent gotta go and select my ncloth shirt and reduce the mass to point two and damp two point three simply because it's a big ginormous cloth and I want to have a little bit of interaction and movement not not to have it too rigid again that's just not going to be too realistic best best thing to do is to study references and see how cloth behaves in certain speed and certain movements now I think I'm in a good place to encash this and do a play blast and see how it looks all right we're back let's play and see what we have perfect actually quite like the the form of the wrinkles in the behavior of the cloth so look at it from back I was a bit concerned about the armpit but it actually works rather beautifully I'm gonna press 3 to go to smooth mode and it looks really good there's a little bit of tearing a penetration here but we can just fix that with a good old shape editor we can just blend shape it in and to be honest with you with motion blur it's not really that big of a deal so I actually quite like this this artifact here is just normals that we need to fix select those faces and go reverse normal but apart from that it actually looks pretty good now this area the cloth bunches up so we may want to use that rest length attribute and paint a little bit of rest length attribute in here so this area gets a bit shorter just going to set it to 0.5 and I'm going to just paint that area then I go to smooth flawed go back and one more thing that I would love to do is just to paint dampening as well so I'm just going to go to that X damp and 8.5 is a good value [Music] you good I'm gonna go to smooth and flooded a couple of times so it's smooth enough fantastic let's check our sub steps 30 and 35 sounds good I'm going to end cache it and I'm going to export it as a limbic also I'm gonna select this guy and export it as Olympic and bring them all into a brand new scene so our brand new Cena is going to have three Olympic files no extra calculation in there no skin influences no nucleus note evaluation no constrain calculation so it's going to be very fast to render very fast to calculate very fast to preview all right we're finally there Here I am in the master shot I've gone ahead and imported three Olympic files that I had the trouser shirt and the character as you can see there is no skeleton there is no skin binding there is no nucleus calculation the scene is clean and pretty fast actually so it's time to dress the set time to bring in assets the environment into the master shot I've already done that so I have a few props to work with and grand playing I've already textured everything I've already put some lights in as you can see if I go to show lights I have a fairly simple scene so nothing too complex and I have a camera just before I play there is another video that I go through basic in cloth notes if you found some parts of the video a bit too difficult to understand I highly encourage you to watch that video too as in that video I go through all the basics of any cloth alright now I'm gonna go ahead and render the same and we'll be back in a second that's it hope you guys enjoyed this tutorial thank you very much for tuning in and see you in the next one
Info
Channel: SARKAMARI
Views: 15,838
Rating: 4.9731545 out of 5
Keywords: nCloth for Character, nCloth for Animation in Maya, nCloth in Maya, Autodesk Maya nCloth, Reza Sarkamari, neucleus node
Id: RhAxSgPpZww
Channel Id: undefined
Length: 42min 13sec (2533 seconds)
Published: Mon May 25 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.