Maya tutorial: Dissolving an object
STEP 1:
You can use any object or make a curve of any shape and revolve it. We used the goblet from our
goblet modelling tutorial.
STEP 2:
Select the object you want to melt and create the lattice. Animation mode>Deform>Create
Lattice>option box. you will want the lattice with 6;6;6 divisions
STEP 3:
Select ffd1Lattice go in the Dynamics mode and choose Soft/Rigid Bodies>Create Soft Body
STEP 4:
Create the primitive polygon plane and set the subdivisions up to 10;10. Place it right under the object
(goblet). Make sure the lattice is not penetrating the plane. That will be the floor.
STEP 5:
Select ffd1Lattice and assign the gravity to it. Dynamics mode>Fields>Gravity
STEP 6:
Now set up the collisions between the lattice and the floor. Select ffd1Lattice then the plane, and in
Dynamics mode choose Particles>Make Collide
STEP 7:
In the outliner window select Display>Shapes. This will enable the shapes of particles to be selected
through the outliner.
STEP 8:
Once you have turned the shapes on you can notice in the outliner next to the ffd1Lattice there is a
plus icon. Click on it and it will expand the subobjects. Select ffd1LatticeParticleShape and add two
new attributes. To do that go Modify>Add Attribute... Tick Data Type - Float; Attribute Type - Scalar.
Name the attribute "expanse". Add one more attribute with the same set up and name it "size". (Make
sure you will name them properly because in the script which I will show you in the next step you will
call these attributes in the script.)
STEP 9:
Now we will add a small expression so as to use these attributes to control the expanse and size of the
object. Select ffd1LatticeParticleShape and open the Expression editor. You will find it under
Window>Animation Editors>Expression Editor. Put the following script into the Expression box.
Expression:
vector $dissolve = ffd1LatticeParticleShape.worldPosition;
float $expanse = ffd1LatticeParticleShape.expanse;
float $size = ffd1LatticeParticleShape.size;
if ($dissolve.y < $size) ffd1LatticeParticleShape.velocity = unit
(ffd1LatticeParticleShape.worldPosition -<<0,0,0>>)*$expanse
Hit the Create button.