Maya In-Depth: Soft Bodies
Maya In-Depth: Soft Bodies
-soft body setup -goal weighting and deformation - field dynamics with particle systems - soft body goal weight painting
First, we will make a surface to test on. Go to the surfaces tab and click on the NURBS Sphere icon. This will make a sphere that should be accesible in the outliner. Make sure you have it selected (by default it will do this when you create it) before preceding to the next step.
Looking at the outliner, we see that nurbsSphere1 has been made into 3 nodes - a nurbsSphere, a particle field that is undeneath it in the hierarchy, and a copy of the nurbs sphere (the goal object) After selecting the particle object in the outliner, create a field (in this example a newton field) to exert a force on the particle cloud.
The newton force is a geometric point, which is placed at the default 0,0,0 point in the scene. we can select it and move/manipulate it the same way as any piece of geometry.
After selecting the particle object in the outliner, go to the channel editor using the icons in the upper right corner of the maya interface. This will make accessible the numeric attributes of our particle system. Scroll down to the Goal Weight attribute. We want to set this to 0 now. This describes how intensely the particle sphere will try to return to its previous shape (the duplicated shape that was made a goal). Setting it to 0 effectively neutralizes the goals influence. A weight of 1 would not allow the object to deviate from its initial shape.
Press the play button in the lower right corner of the interface. You should see the the sphere deform under the effects of the newton field. By stopping the playback and going back to the start of playback (the first button next to the current key) we can return the sphere to its original state.
To change the magnitude of the force that we have applied, sekect te newton field in the outliner, and change the magnitude field in the channel to a small number, here using .2 - you should see a much slower deformation of the sphere.
By moving the center point of the field, we can change the way the surface interacts with the field. If you are not already in the move tool, select it in the main toolbar (or press w). Now select your force and drag it (either by grabbing it with the mouse and moving it or by dragging an axis at its center pivot. It is also possible to key values int its TranslateX..Y...Z values in the channel box. Play the simulation and see how it is effected.
Now we will manipulate the goal object to further transform the object. Select the particle system and in the channel box change the Goal Weight to .1 - be carefull, a little weight goes a long way.
Now, in the outliner, select the copy of the nurbs sphere. You must do this in the outliner because the object has been hidden. In the channel editor, you will see that its visibility attribute has been turned to off. Type on into the window and press <enter>. The goal sphere should show up in the viewport.
By going into component mode, we can gain access to the control points that define the geometry of the nurbs sphere. Use the component mode toggle in the main toolbar, and make sure control points are selected (the square black box in the second image to the right). You should see the control points of the sphere appear in the viewport.
Select a few of the control points and move them. The more point you move, the more the object will deform. Remember that we are deforming the goal object, so our original sphere that it tied to the particle system will now try to move towards the shape, to the degree that it is weighted by our goal weight attribute.
Go back into object mode, using the toggle at the top of the interface. You can also press F8 to exit component mode, as well to enter it. Turn off the visibility of the object (the copy of the nurbs sphere).
Play the simulation again - you should see your sphere attempt to both respond to the newton force as well as assume the shape of your newly deformed goal object. You should play with adding more forces. Remember to have your particles selected whenever you create a force field - this will automatically link the two - otherwise your force field will not affect your object. If you create a force field without linking it, you can do it manually by selecting the field you have created, the particle system, and selecting Fields -> Affect Selected Object(s) A very interesting tool to work with is the Paint Soft Body Weights Tool - this allows you to paint onto the surface the amount of influence the goal object has on the sphere. Make sure to have the original sphere that you want to paint selected, not the particle system or the goal object, before engaging the tool.
To see the tool menu, bring up the tool options editor in the far right corner of the interface, next to the channel box button. By selecting a radius (in u+l) and value, you can paint a grayscale map onto the surface. Areas in white will be affected by the goal object, areas in black will not.