Recipe 5.5. Vector-Based 3D Graphics


Problem

You want scalable 3D vector graphics and control over individual elements within the Flash authoring environment.

Solution

Render and Export vector graphics with the SWFT format and SmartLayer technology.

Discussion

As you no doubt know by now, one of Swift 3D's core features is its ability to render and export to a variety of vector formats, including SWF, AI, EPS, SVG, and SWFT. You most likely have already heard of or used the first four formats. The fifth, SWFT, is a proprietary export format of Swift 3D. Although it is similar in some ways to a standard SWF, it alone can render an object to different layers depending on specific criteria. Objects in motion, static objects, highlights, shadows, and more can all be assigned to their own layers. These layers are respected when imported to Flash via the SWFT importer that installs with the Swift 3D standalone application.

As an example of how the SWFT file format works, this example renders the first five frames of the animation used in the previous section. To render to SWFT with SmartLayer technology:

  1. In the Preview and Export Editor, click Vector under the Output Options if it is not already selected.

  2. Under the General category, select Swift 3D Flash Importer from the Target File Type drop-down menu, and enable Smart Layer technology by checking the Separate Stationary and Moving Objects box.

  3. Select the fill type of your choice and include Highlights, Reflections, and Shadows as desired. I use Cartoon Average Color Fill, because it often provides the best quality for the smallest file sizes. I will not be rendering outlines; if you do so, they will be assigned a layer of their own as well.

Figure 5-29 shows a sample of SWFT layer structure after imported into the Flash authoring environment.

With each element residing on its own layer, greater control can be had over individual elements when working in Flash. For example, you could convert colors in motion to movie clips and set color properties dynamically.

The SWFT importer and format are compatible only with Flash MX 2004 and up.





Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net