Hi,
I think I get the picture 🙂
You can do this using the effect called „Particle Playground” under Effect->Simulation.
Firstly you need to draw a desired shape. Then create a new solid and apply the above effect.
Then in the Effect Controls, use your shape as an Explode Layer in the „Layer Exploder” Tab. What it does is forming your drawn shape into lots of particles, which you can disperse by playing around with the effect’s parameters (like Gravity and Repel). Remember to key „Radius of New Particles” from 1 to 0 in first 2 frames, otherwise you will get new particles generating every next frame and you won’t get the result you’re looking for 🙂 It’s also important to „zero” all values under Cannon Group, because they’re triggered automatically and generate particles from a point.
You’ll have to experiment with the values to get the appropriate effect. I think it would be OK to just disperse the particles from the first shape, then do the same with the other shape on a separate composition, time-reverse it and composite them together with a little fading in between to trick a little bit when they transform from one to another.
I hope this helps you to get the direction…
Best regards,
Piotr.