Flash notes by Edzis

ActionScript programmer / Flash developer Edgars Simsons on professional stuff

Archive for November 4th, 2008

Blur on rotationY = 0? Use transform.matrix

with 14 comments

matrix3D vs matrix in image quality

matrix3D vs matrix in image quality

If you have run across bad quality visuals after doing DisplayObject transformations in 3D (rotationX, rotationY, rotationY or z-axis modifications) you might want to use transform.matrix to get back the quality.

I wanted to make a simple 3D animation in Adobe AIR 1.5 / FlashPlayer10 content in AIR – the DisplayObject should rotate around the Y axis from 90 to 0. The animation worked fine, but as soon I was changing the rotationY the content got blurry, even if i just set the rotationY to 0. I tried different solutions and was about to shout out for help when I remembered reading somewhere that as soon as the third dimension is applied to a Display object its transform.matrix is replaced with transform.matrix3D. And indeed after the animation is done I set DisplayObject.transform.matrix and the blur is gone! Flash removes all the 3D transformations. You might see that the image on right is much crisper, especially on the small horizontal lines.

However, if anybody knows why the content is blurred the first place despite no actual 3D transformation and/or other solutions how to remove it, I would love to hear that!

Written by edzis

November 4th, 2008 at 2:55 pm

Posted in Adobe Air, Flash Player 10

Tagged with , ,