Maya tutorial: Dissolving an object

Maya tutorial: Dissolving an object This tutorial will show you how to animate the dissolving (melting) of any object.

When you use it in the scene where will be lots of objects melting down in different time intervals, so you can get a pretty nice effect. This can be done through a basic lattice deformer converted to the soft body and driven by a gravity field.


Maya tutorial: Dissolving an object




You can use any object or make a curve of any shape and revolve it. We used the goblet from our goblet modeling tutorial.


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


Select ffd1Lattice go in the Dynamics mode and choose Soft/Rigid Bodies>Create Soft Body


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.


Select ffd1Lattice and assign the gravity to it. Dynamics mode>Fields>Gravity


Now set up the collisions between the lattice and the floor. Select ffd1Lattice then the plane, and in Dynamics mode choose Particles>Make Collide


In the outliner window select Display>Shapes. This will enable the shapes of particles to be selected through the outliner.


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.)


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.





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.






Now you can experiment a little with these new attributes to control the size and expanse of the melting object. To make the whole process a bit slower or faster you can change the value of the magnitude of the gravity field.

Related tutorials: