Return to Unity Plugin

Crisp edges of masked object

All about Unity plug-in

Crisp edges of masked object

Postby Petr Kavan » January 4th, 2018, 12:47 am

I have object in swf, that is cut by a mask. I convert it by gaf and import to unity. Resulting animation in unity correctly uses mask, BUT edges of masked objects are crisp, not anti-aliased. It looks bad, because everything else is smooth, but not edges of parts that are cut away by mask. Can something be done about it?
User avatar
Petr Kavan
 
Posts: 17
Joined: November 21st, 2017, 5:06 am

Re: Crisp edges of masked object

Postby Alexey Finkilshtein » January 4th, 2018, 2:40 am

Hi,

To try to help you we need your fla file and unity test project.

Thanks.
User avatar
Alexey Finkilshtein
 
Posts: 411
Joined: May 21st, 2014, 6:53 am

Re: Crisp edges of masked object

Postby Petr Kavan » January 7th, 2018, 11:09 pm

Ok. So here: http://kozeluzstvi.cz/pig.zip is a zip containing fla of animation (together with gaf created from it). I do following steps

1) Open pig.fla in Animate CC. It is animation of pig rooting in the ground. During animation, brown heap of ground is created, and it is at the bottom cropped by mask.

2) Do Export film, store as swf. I open swf in some player, and I can see that the edge of ground heap, that is cut by mask, look anti-aliased in the same way as the rest of animation.

3) I convert swf to gaf, using nesting mode, Main Timeline and Library options. Texture atlas compression is PNG lossless slow, but results were the same as with PNG lossless fast

4) Create a new project in unity. Drag created swf and png to project, use Add to scene, move created object to the camera and run. I can see that all edges in animation are anti-aliased as usual, except for the edge that is cut by mask. This edge is crisp, with clearly visible pixels.
User avatar
Petr Kavan
 
Posts: 17
Joined: November 21st, 2017, 5:06 am

Re: Crisp edges of masked object

Postby Alexey Finkilshtein » January 13th, 2018, 12:58 am

Hi, try to remake the mask layers. you can see some 100% working example in the demo fla file at GAF/Examples/Sources/Robot/RedRobot.fla
User avatar
Alexey Finkilshtein
 
Posts: 411
Joined: May 21st, 2014, 6:53 am

Re: Crisp edges of masked object

Postby Petr Kavan » January 30th, 2018, 1:21 am

Oh, I did not receive notification about your post. Ok, I will look at it, thank you.
User avatar
Petr Kavan
 
Posts: 17
Joined: November 21st, 2017, 5:06 am

Return to Unity Plugin

Who is online

Users browsing this forum: No registered users and 1 guest