One of the quickest way to model a deformable body is to embed it inside a regular grid. We will simulate only the points of the grid's cells. The description of this grid is made inside a Topology which describes how the particles are connected.
We will add a SpareGridTopology: it only keeps the full cells of this embedded grid.
Now that we have a topology in the scene, the MechanicalObject will rely on it, in order to initialize itself.
To use this component, you have to:
Open the SparseGridTopology parameters. Find the fileTopology section, and click the ... button, found across from Filename of the mesh. Use the file browser to select /Sofa/share/mesh/dragon.
Switch to the Property 4/6 tab. Find the section labeled n. Change the grid resolution from (2 2 2) to (7 6 5).
Now, several particules are created, representing your deformable object: it embeds the visual model we put.
The particles fall against the Plane we defined previously. As no internal force other than a plane is defined, the original shape is not kept.
Change the 3d mesh for the SparseGridTopology, and the resolution of the grid.
Edit the MechanicalObject to see the number of particles simulated.