Multiple Masks?

Hello all,

I’ve found much older threads on the topic where it was stated that it wasn’t possible to do so, but currently is there a way to add multiple masks to an image/group in Corona SDK?  Looking through the documentation and tutorials for masks, I unfortunately don’t see that it is possible, but wanted to check here and see if anyone found a way to do it, or maybe simulate it?

Hi @elsoqo,

You can probably do a certain degree of multiple masking by, for example, masking an object, then placing that object inside a display group and masking that group with a different mask. However, you should be cautious to not exceed the nested masking limit that is described in the docs, for example: http://docs.coronalabs.com/api/library/graphics/newMask.html

Take care,

Brent

Thanks for the reply, Brent.

Unfortunately, the way this particular app is supposed to work, it’d need unlimited user-determined mask placement… so that definitely wouldn’t be ideal.  We do have a solution that uses 0 masks, but I was thinking of trying a ‘nicer’ solution which would have involved multiple masks, which is why I was curious.

Hi @elsoqo,

You can probably do a certain degree of multiple masking by, for example, masking an object, then placing that object inside a display group and masking that group with a different mask. However, you should be cautious to not exceed the nested masking limit that is described in the docs, for example: http://docs.coronalabs.com/api/library/graphics/newMask.html

Take care,

Brent

Thanks for the reply, Brent.

Unfortunately, the way this particular app is supposed to work, it’d need unlimited user-determined mask placement… so that definitely wouldn’t be ideal.  We do have a solution that uses 0 masks, but I was thinking of trying a ‘nicer’ solution which would have involved multiple masks, which is why I was curious.