Random point within spline or layer

I just got started with Synfig recently, and I must say, the range of animation tasks that can be automated is stunning. However, I couldn’t think of any way to create one of the first effects I wanted to try: making an object sparkle by placing particles on it.

If it had a simple shape, I could find a way to approximate it using the tools available to me. I would like to be able to apply this effect to pretty much any object, though, including ones with complicated and even animated shapes. The only solution I can think of is a way to generate a vector representing a random point inside a spline, or, even better, a random point where the alpha channel of a particular layer is nonzero. Are either of these possible?

Not possible in a direct way (using a particle generator that does that) but you can have some alternatives that could be valid.
First you need to have a particle generator. There is a particle template I made some time ago that still working. It is on the wiki.


Also, there are people working to automate this to be able to generate more than one particle type on one animation:

Finally, you can use those and limit its scope to the bounding box of the shape you want to put particles over. Then finally only need to group the particles and put them above the shape with the “Onto” blend mode.