The First Fruit from Autodesk's Acquisition of Maya
Stam took a few moments with Studio Daily to explain nCloth, the Maya Nucleus framework, what it can do now and the possibilities for the future.
JOS STAM: I’m part of the research group. We are not really tied to any products so we have the freedom to explore different things.
I started working on Cloth about six years ago. I wrote a little prototype – a very simple piece of cloth that you could move around. The nice thing about it was it was very fast and stable compared to what was out there [on the market]. So it was just a little toy that I wrote. At the time people said it was nice but there were no plans to actually turn it into a product. Then about four years ago there was a push since there were some problems with the solver that was in Maya at the time. Since we’d bought the source code from another company it was hard to change it. So they asked me to spend some more time doing the cloth. It took three years to turn that prototype into a product.
Theoretically, what was different about the way you approached cloth simulation and the ways it was approached in other software packages?
There are actually many aspects. If you look at the solvers before, they would model cloth as a set of springs. The problem is springs work well for things that stretch and that are bouncy, but they don’t work well for cloth since it doesn’t stretch all that much. The idea I had was to go the other way and instead of starting with springs you start with hard rods. So you go from something that is very stiff to less stiff. The problem with springs is that if you make them very stiff you have to lower the time stamp and you get a lot of other problems that make it very slow.
The other aspect is self-collision in the collisions. Most techniques sort of allow the penetration of the cloth into the character and then push it out. In our approach we looked in space/time. So for example the problem with depth technique where you push-out things is that if an object moves really fast it is actually an invalid state at the end of the step. So what we did was look in space/time and find the point in the collision and try and resolve it that way. So it’s more robust in that sense.
So once you’ve set up your parameters correctly you don’t have to do any keyframing.
Yes. You can have two pieces of cloth hit each other and there will be a response from one piece of cloth to the other and vice versa.
What about the water simulation? Is that coming soon?
Hopefully. I already have a prototype that still needs to be improved. It depends on how important it is to be in Maya since you would also want to extend it for rigid bodies as well, for solids, perhaps for hair. So I am working on all of these, whether it goes into Maya is not up to me.
It’s the same framework used in nCloth. The solver doesn’t care whether it is hair, cloth or liquids; it’s just a system of particles with links between them. So it’s just how you link them up. Of course there are other parameters that will be different, like bending doesn’t make sense for liquids. So there will need to be different layers that we build on top of the solver.
The other interesting thing is that the solver is not part of Maya really. It’s a library that could be used by other products.
And once a mesh is converted into a cloth there are parameters including density, buoyancy, wind, gravity, etc?
Yes and you can actually texture-map them so you can change the values per-particle. So you can have it be less stiff in certain parts. Those parameters are obviously different when you are doing hair, liquids or cloth.
You can also keyframe the values over time. So, for example, you can vary the stretch over time.
Besides cloth, hair and liquids, do you see other applications that this solver can be used for?
Another thing we think of using this as a modeling tool, so you could have the simulation run and you could change the shapes over time. What is nice is that the collisions are resolved. So for example if you are modeling a phone you can just take the receiver and place it down [in the holder] and it will rest naturally.
The thing is it has to be really fast so we are trying to make the solver faster for more complex shapes.
Explain the advantage of modeling a character within the Nucleus framework rather than the traditional way.
Let’s say you have a character, you are guaranteed that the hands will not go through the character itself. You can change the shape using the physics so you are closer to real world modeling.
So basically having a rigid body that you can then fracture, turn it into jello or clay for example. With nCloth you just have a surface so the interior is empty so that’s another thing we are looking at. We don’t have the modeling tools right now in Maya to create a solid. We have all the tools to create a mesh, but the tools to make a solid are not there yet. You can use it for skin. Already we have a notion of a constraint, so you can you can constrain the cloth to a mesh, so it finds the closes point and tries to keep it there. It is a spring constraint so if you were to push on it, it would propagate to its neighbors as well. We haven’t really played around with that but it’s doable right now.
[With a character] I think you would create the skeleton in rigid geometry and then create the muscles and skin on top of that. I’ve seen people doing that already with Syflex. We are hoping that this will allow people to do some really groundbreaking work.
Crafts: VFX/Animation
Sections: Business Creativity
Did you enjoy this article? Sign up to receive the StudioDaily Fix eletter containing the latest stories, including news, videos, interviews, reviews and more.