Flash Blender Love - Compress png output?

Hi Community,

I’ve been doing a lot of blender-to-flash stuff lately, basically making animations, exporting them with premultiplied backgrounds as pngs. It’s actually very cool what is possible if you do some clever timeline manipulation in flash.

My question is, is there a way to compress the pngs that blender spits out without losing too much quality in the process?

Does anyone who has experience with blender and flash have any tricks or best practices to share? The .SWF filesize sure blows up quick with the number of frames used in animation.

-austen :RocknRoll:

hello.
I can’t speak on optimizing the renders that blender outputs, But from the sound of what your doing it seems like most of your file size problems can be remedied with some tips on working with and optimizing raster files in flash.

General rules for raster files before you import them into flash.

  • Never import images into flash larger then what you need them for. Flash always uses the full resolution of of raster images no matter how you scale them in flash. Re-size the image before you import it.
  • Don’t compress the files before you import them. Flash gives you good control over how your images get compressed in the final swf. So start with the highest quality, with correct resolution “Rule 1” you can.

Compression settings for images imported into flash

  • By default all raster image imported into flash will have it’s compression settings decided by the setting here " Edit/Preferences/ Category = PSD File Importer/ Publish settings. Link to Image of Menu
  • Each image can have it’s own setting customized and previewed from it’s properties menu in the library. Select image in library, Right click / Properties Link to Image of Library Poperties menu

Tips for good compression.

  • Almost always Photo (JPEG) compression is what you want for any raster image, Even if it’s got an alpha. Change the quality setting and click test to see it previewed.
  • Flash will keep and use an images alpha channel even if you use JPEG compression. and the alpha will always stay at it’s original quality even if you compress the image into an artifact-ed mess. This is pretty awesome!
  • Vectorize your image Whenever Style allows. Depending on the visual style of your project and images, often converting raster images into vector art will help improve the quality, performance and SWF file size. You can do this by using Trace bitmap command, found in Modify/Bitmap/Trace bitmap. Play with the setting and preview to tweak the output. Alpha maps will be used when tracing so take advantage of it.
  • Optimize your Vectorized images after you trace them. After you use Trace Bitmap. Go the extra step to optimize them by Optimize Curves. shortcut “CTRL+ALT+SHIFT+C” or from the menu at Modify/Shape/Optimize. Doing this improves performance and decreases file size of your SWF.

Example of tips used on a simple png image

Sorry for being long winded but I hope some of this helps.