FAQs Related to GFxExport

This section contains few of the questions that developers may have when using the GFxExport tool.

1. What are the advantages of using GFX files over using SWF files?

The main advantage is the ability to use external DDS (compressed texture) files. When SWF file is loaded, it typically contains embedded images in JPEG format internally; these JPEGs need to be decompressed before being used for rendering - a step that can easily turn 20K of data into 2M or so, depending on the target image size. With compressed textures, however, you can save 4x on video memory use - an amount that is significant (consider 20M used for images vs. 5M). In addition, JPEG decompression takes a lot of processing power during loading, although this cost can certainly be compared against the alternative - loading larger DDS files from disk. In the end, video memory considerations typically win for most developers.

For additional benefit, GFxExport includes some options that can be used to compress font vector data more efficiently to save RAM, such as "-fc" (font compaction). This is primarily significant for Asian fonts, as the SWF vector format is already reasonably compact for many cases. GFxExport can also be used to pre-generate font textures or gradients, although this is not recommended except for low-end systems.

2. Why is my GFx file larger than the original SWF?

SWF files are compressed by default. You can use "-c" option to produce compressed GFx files. In practice, however, many developers often compress multiple GFx-generated files within their own package system or zip, using a custom GFx::FileOpener to load them as necessary.

3. GFxExport incorrectly exports text with special effects (glow, shadow, etc.). Why does this occur?

You should not use "-fonts" option if you want to use effects like glow, shadow and blur. Please refer to Font and Text Configuration Overview for more details.

4. I have my own texture format that my engine uses. How can I use GFx files with images in this format?

After the export is finished, you can have your own custom tools on to convert the exported images into your own custom format.

After images are stored in your own texture format, you have to install the GFx::ImageCreator class to load those textures into Scaleform. A GFx::ImageCreator::CreateImage virtual function will get called for every texture file. Here you can load your custom images, wrap them in Render::ImageInfo and return for Scaleform to use.

5. How can I make textures to be exported with names I want?

You can set the name you want GFxExport to use in Linkage Properties of the image.

6. Our pack tool relies on images named [filename of .swf]_[ID#], how can we make GFxExport use this name format even for images that are tagged "Export for ActionScript"?

Use " –ne" option.

7. How do I exclude image from packed texture?

You can add _nopack or .nopack to Linkage Identifier of the image in the Flash Studio.

8. How can we avoid re-exporting textures that we know did not change from the last export?

You can make these files read-only.

9. GFxExport takes too long to process our files. Is there any way to speed it up?

Default DDS compression quality is "normal". Using "-qf" option ("fast" quality setting) will significantly reduce processing time.

10. Where can we find more information on GFxExport?

You can find additional information on GFxExport in the related forum topic on the Developer Section of our website. Also, refer to the "Art and Assets" and "Using Custom Images, Icons and Dynamic Textures" sections of our FAQ.