Blurred edge in ShapeStim

I need to present a rectangle that has blurred edges, so that in the end no sharp edge between background and rectangle is visible. ShapeStim unfortunately has no mask-attribute. I wonder whether there is another solution than creating a Texture with NumPy.

Create a shape that you use as a mask. Add this to a Grating Component and set the texture to be blank. That way you get no grating but you get a shape that matches the mask and you can vary its color. You can create the mask in anything (eg. photoshop). Use white for areas that will be “visible” and black for areas that are transparent (greys will be semi-transparent)

1 Like