Let's say I have polygons A and B (green), polygon centroids (white), buffers around these centroids (blue), and a collection of points (red). I want to create a raster layer that represents the distance from each polygon cell to the closest point (red) within the polygon buffer (blue). For the raster of A, the distance should be to the closest point (red) in A's buffer region. I think I need to first rasterize the shapefile containing A and B, but I'm getting an error.
I created a basic example of this setup in QGIS.