From the course: Learning nCloth

Setting up a simulation test scene - nCloth Tutorial

From the course: Learning nCloth

Start my 1-month free trial

Setting up a simulation test scene

- [Instructor] If you want to try a new laundry detergent, it is greatly advised to try it on a small piece of fabric or in the corner, because you will really never know what the result it will be and you don't want to spoil your garments. As we've seen although, nCloth simulation, it's a little bit like when you launch a washing machine program. It's running and then it's better not to stop it in the middle because if you spend your time to start something and stop it and start it, well you will waste a lot of time and then, you know, time is everything. So how can we really test our ideas like that with nCloth? How we can, maybe, very quickly see what changes we've made, our doing on our objects and how we can observe the fastest way our parameters are affecting the object. So let's explore! Unless we've seen, we can just create a new scene first and we can stop to walk with very, very simple object. So one of the very simple objects we will very often create is a plane, and this plane will be representing the ground in our world, because the most really simple action that can happen in a dynamic world on our object is just falling. Is just having gravity and falling on the ground, and we will be able to observe what is happening. So the other test object that are very, very often created is a new plane, and I will advise myself to testing on a plane because, well, it's a little bit like basically the most simple little piece of fabric that you could have, and you can start to see, maybe, in a small way, and very quickly as well, because this will calculate almost instantaneously, see what is happening. So now that we've built our two planes, we can start to basically create the nCloth dynamics. So we can select the ground and we can go right on in the FX mode. We can go in the nCloth's menu and hit Create Passive Collider. And what we can observe in the outliner directly is that two nodes have been created. So far, we haven't been looking really at what Maya's doing in the background when we are creating or starting those commands. But what nCloth's and Maya's been doing is creating a nucleus1, so we can observe that first. And we now have a nRigid1 as well. So I will propose to move the ncloths1 at the top like that. Like that, we know that the nucleus (mumbles) will always be there. And since the nRigid in is the pPlane1, I will propose to move the nRigid1 just under pPlane1. We can now create our Cloth object. Let's select the second plane, nCloth menu, and we can say Create nCloth. There you go, and now, we have this nCloth1 that just created under the pPlane2, and we have our Cloth setup already done. So that was easy. But now, we can see that we have those nodes. We can hit play and we can see that it's working. So nCloth is ready and the world is ready. So to finish prepare this test scene, I will propose to as well create a camera, like this, because a little bit like in wondering, you will really be able to observe the same thing again and again, and if you have a camera that's always defunct, it will be difficult for you to compare your playblast and compare your animation and compare very precisely if something different happened. So now that you can go and switch to camera1, and I would just propose to frame, maybe, our object on the ground, and we're going to stay here, all the time, to observe what is happening on this plane, on this ground. So we can take this camera now and we can lock it. So we can select all the Translate and Rotate, we can right click, and we can say Lock Selected. I usually keep my camera at the top as well of the outliner, so I will move camera1 at the top. So now we have a test scene, and this scene is really just the two simple commands that you will have in any Maya, on any computer in the world and you will really be able to compare if any changes you do is really doing something, doing something good, or doing something bad. That is what we call a Sandbox. In computing, a Sandbox is an isolated testing environment to be able to test new code and to try if those very, very minor changes, how they are affecting the rest of the world. Like this, you will be able to notice everything you do. You will be able to really see the changes you make and you will be able to check if every step you do is really going in the right direction. And in the same way before launching a washing machine, you separate the colors and the whites.

Contents