I am creating this effect at the moment where I have to fill up shapes with an even field of points.
As the shapes move around, the points stay in the same spot but disappear if they are outside of the shape's volume.
At the moment I am doing this by creating a massive grid of points, and then deleting any that are outside of the volume. This works okay, but it is pretty inefficient as it has to create heaps of points even if they aren't used.
So I was wondering if anyone knew a way that I could optimise it. I thought there might be a way to just generate the points inside the object but I'm not sure where to start...

Thanks
Pete