count number of transparent pixels in sprite

New releases and general discussions.

Post » Sat Aug 01, 2009 6:05 pm

Yeah I'm getting some weird results, but I suspect its image editor related rather than imagmanipulator, but that's just another reason to use the function sparingly. Again per pixel operations are always going to be quirky especially when dealing with semi transparencies, not to mention other users hardware.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Aug 02, 2009 11:13 pm

Again: Occlusion Query
I believe it does this exact same thing... though it would have to be a plugin.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Aug 13, 2009 11:55 am

i think i have a possible solution. but im not at home to test it

my break is just about over so i cant break it down into each little layer operation, but basically you make the object that must be checked as completely covered, and use the covering object as a mask,paste this to a canvas, and update collision mask, then check for a collision with the original unmasked sprite. if there is a collision, it is not fully covered.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Aug 13, 2009 12:46 pm

Well its certainly simpler than getting coords for each pixel.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests