Mask Working On Simulator But Not On Device

So I have a mask that was working fine on the simulator and the device…then I updated corona to the latest version and now the mask won’t work on my device anymore. If I remove the mask the whole image shows up just fine. If I add the mask back the whole image disappears on the device  but works perfectly on the simulator. Any ideas on this one?

RESOLVED: To anyone who might be having this issue the problem was fixed by changing the transparent part of the mask to white.

I put together a quick test case. I’m testing it on an android device. I’m not sure if it works correctly on an iPhone.

https://www.dropbox.com/s/5uyu2q3x6htpva6/Test.zip

You might want to submit a bug report with the test project.  Make sure to include the daily build number you are using, and you might also want to include a link to this thread.

Actually I have submitted an MASK issue a while back and have never heard aything about it, IT works flawlessly on Windows Simulator, but you build for device and - its totally screwed up, also you put it on the MAC Simulator - it has the same issue as the actual Device as well.

Same versions of Simulators on both.

I’ll have to dig through my emails and see if I can find the Bug ID.

Larry.

 

Okay I went ahead and filed the bug. Hopefully it’s something that can be resolved soon as I can’t continue on with my game until it’s fixed.

Hi @dmglakewood,

I downloaded your sample project and noticed that you don’t have a black border of at least 3 pixels around the mask. That’s documented in the mask API details: http://docs.coronalabs.com/api/library/graphics/newMask.html

Can you please test this out and let me know if it changes anything?

Thanks,

Brent

I was really hoping this was the answer. I fixed the image and made sure it has at least a 3px black border around the whole image and I made sure both the height and width are multiples of 4 and still no luck. Here is the new build that I tried

https://www.dropbox.com/s/5uyu2q3x6htpva6/Test.zip

Hi @dmglakewood,

In your latest project, I noticed two issues, both easily fixable:

  1. your new mask (with border around) is no longer divisible by 4 (height = 450, should be 452)

  2. Most importantly, you’re trying to mask with a transparent region in the center. Masks should be black and white (or shades of grey), with the white part being fully visible, black as fully masked. I saved your mask as black and white and it seems to work fine.

Brent

  1. Man I thought I checked the division by 4 before saving the image my bad.

  2. That did the trick. I wasn’t aware what the transparent part of the mask had to be white. Thanks for all your help on this.

Well thanks for that TidBit of details, I just tried the same thing on my App and fixed my Issue as well.

I can’t wait to completed my next app now :slight_smile:

Larry

I put together a quick test case. I’m testing it on an android device. I’m not sure if it works correctly on an iPhone.

https://www.dropbox.com/s/5uyu2q3x6htpva6/Test.zip

You might want to submit a bug report with the test project.  Make sure to include the daily build number you are using, and you might also want to include a link to this thread.

Actually I have submitted an MASK issue a while back and have never heard aything about it, IT works flawlessly on Windows Simulator, but you build for device and - its totally screwed up, also you put it on the MAC Simulator - it has the same issue as the actual Device as well.

Same versions of Simulators on both.

I’ll have to dig through my emails and see if I can find the Bug ID.

Larry.

 

Okay I went ahead and filed the bug. Hopefully it’s something that can be resolved soon as I can’t continue on with my game until it’s fixed.

Hi @dmglakewood,

I downloaded your sample project and noticed that you don’t have a black border of at least 3 pixels around the mask. That’s documented in the mask API details: http://docs.coronalabs.com/api/library/graphics/newMask.html

Can you please test this out and let me know if it changes anything?

Thanks,

Brent

I was really hoping this was the answer. I fixed the image and made sure it has at least a 3px black border around the whole image and I made sure both the height and width are multiples of 4 and still no luck. Here is the new build that I tried

https://www.dropbox.com/s/5uyu2q3x6htpva6/Test.zip

Hi @dmglakewood,

In your latest project, I noticed two issues, both easily fixable:

  1. your new mask (with border around) is no longer divisible by 4 (height = 450, should be 452)

  2. Most importantly, you’re trying to mask with a transparent region in the center. Masks should be black and white (or shades of grey), with the white part being fully visible, black as fully masked. I saved your mask as black and white and it seems to work fine.

Brent

  1. Man I thought I checked the division by 4 before saving the image my bad.

  2. That did the trick. I wasn’t aware what the transparent part of the mask had to be white. Thanks for all your help on this.

Well thanks for that TidBit of details, I just tried the same thing on my App and fixed my Issue as well.

I can’t wait to completed my next app now :slight_smile:

Larry

Thanks for that awesome post. You know I’ve been looking for the best hard drives I’m glad you were able to track me down and give me this offer :smiley: