Hand animating Constraints
Q. How can I hand animate a dynamic MASH network?
A. By hooking up a locator to a Constraint you can then use that to pull dynamic MASH points around in your scene.
- Create a MASH network with your object.
- On the Distribute node set the Number of Points to 1.
- Add a World node and set the Cluster Mode to Fibonacci Sphere and Previous Points Mode to Kill. The World node has some collision detection built in so this is just a method to create a non intersecting initial distribution.
- Under the Cluster rolldown set Points Per Cluster to your liking and increase Radius until the points no longer collide with each other. (We’ve used 88 points with a radius of 19).
- We have also increased the radius of the individual objects inside the World node to 2 but this isn’t needed.
- Add an Orient node. This node can be used to aim MASH points in a particular direction. By rotating our input lolly we can orient them to point inwards to the centre.
- Add a Transform node to move the network up in Y. This is just to move it above the floor. Again, this is down to taste.
- Add a Color node to add colour variation to the lollies (more info here)
- Add a Dynamics node to your network and set the Collision Type to Convex Hull. Mesh could be used but would slow things down and we don't need to in this case.
- Under the Constraints rolldown, right click in the window and Create a Constraint.
- Double click the Constraint to open its UI.
- Set Type to Custom and Connection Mode to Connect To Point.
- Then in the Controller Null input right click and Create.
- You can now animate your Constraint by setting position keys on this locator.
We've also enabled a motor to the Constraint which we've used to rotate the lollies. You can also play with checking the Breakable attribute on the Constraint and try to shake your lollies loose.
Download an example file here (requires Maya 2018)
Tip - use Interactive Playback as it allows you to see how the MASH dynamics react to the movement of the controller null. This setting is located at the far right the FX shelf.