Bl
Bl
Bl
Bl
Bl
You are here:   Home »  Import CAD Formats »  AutoCAD-Revit-Navisworks (DWF-3D)  
Bl

Okino logo
Adobe Illustrator 2D Spline Shape Importer


Arrow Importing .AI Files and History of the Adobe Illustrator AI File Format

This is a rather different and unique import converter in the long list of PolyTrans importers. This converter can be used to import high quality 2D vector spline shape data from such page design programs as Adobe Illustrator, CorelDraw or any other 2D design package which can output Adobe Illustrator (.ai) vector files.

For example, this .ai import converter can be used to import 2D vector logos, 2D text, bezier and linear spline shapes, and have them converted into a 3D polygonal representation ideal for instant rendering in a 3D software rendering package, or for subsequent export to another file format.

As an example, a 2D logo was designed in CorelDraw as a series of connected line and Bezier curve segments. This logo was exported as an Illustrator v8 file and imported into the Okino NuGraf software for subsequent rendering and manipulation.

Okino's PolyTrans and NuGraf software packages include a complete internal spline conversion engine, as shown in the following diagram. This conversion engine allows 2D shape data (defined as multiple spline or linear curve segments) to be imported from multiple file formats, stored in its internal database, displayed on its user interface in true spline curve fashion, optionally converted to a polygonal representation, optionally rendered, and optionally re-exported to another file format either as true 2D curve data (curves in, curves out), or as converted polygonal data:


Click image to view full size version


Thus, ideal uses of this import converter include:

  • Import of logos and text, in spline form, from popular 2D design packages into Okinos NuGraf package for rendering in 3D, or export to another 3D file format for rendering in another software package.

  • Conversion of complex spline shape data (curves within curves, such as the letter B) into a polygonal representation which can be accepted by any major 3D software package.

  • Import of one form of 2D spline curve data (such as Cardinal curves from the OpenFlight file format) and conversion to another 2D spline format for subsequent output as 2D spline curves again (such as Bezier curves output to 3DS MAX).

Arrow Settings for Export of Illustrator Files From a 2D Design Package

For proper conversion of Illustrator data from a 2D design package through this import converter, please adhear to these settings:

  • Always export text as curves and not command-based text.

  • Any version of Illustrator should be acceptable, but it is recommended that newer versions of the file format be used during export (such as Adobe Illustrator v8).

  • Do not include Placed Images within the Illustrator file (ie: dont include any bitmap images).

Arrow Which Elements are Extracted from the Illustrator File

This import converter will only extract a specific sub-set of entities from the Illustrator file format. Only curve paths, colors, groupings and compound path tags will be imported; all other information will be ignored. This is typical of Illustrator import converters as implemented for 3D software packages. Such a subset will allow the transfer of shape data which has direct equivalence in a 3D rendering/animation/modeling package.

The entities parsed and imported are:

m - Move to L/l - Line to C/c/V/v/Y/y - Bezier curve segment K/k - CMYK color G/g - Grayscale color XA - RGB color U/u - Composite object (grouped spline shapes) *U/*u - Compound spline path F/N/S/B - End of spline path f/b/s/b - End of spline path

More Dialog Box Options

The following information explains the various options on the dialog box:

Import Composite Object Groupings

The Illustrator file format allows several objects to be grouped together, acting as a new object. For example, if you have the letters ABC defined inside an Illustrator file as a series of spline shape objects, the U/u command tags allow all letters to be grouped together for easier manipulation. If this option is enabled then the object grouping commands of the Illustrator file will be converted into object groupings in the destination 3D software package. Disabling this option will cause all imported objects to become siblings of each other (no hierarchy or groupings will be made).

Apply Color Information

If this checkbox is enabled (checkmarked), then each imported spline shape will be assigned a unique material which corresponds to the colors assigned to it in the Illustrator file. If this option is disabled then no color or material information will be assigned nor created.

Overall Scale Factor

This option allows the imported spline shapes to be scaled larger or smaller. Values greater than 1.0 will make the imported shapes appear larger, while values less than 1.0 will make the imported shapes appear smaller.

Import Compound Path Objects as: Single Spline Shape, Multiple Spline Shapes

If multiple spline paths are surrounded by the *U and *u commands, then the source program wishes for these multiple spline paths to be stored as a single, complex spline shape object. For example, the letter O might be defined as 2 closed spline curves within a *U/*u command pair; this pair of curves should ideally be imported as a single object so that the hole in the letter O appears when rendered. If this option is set to Single Shape then the multiple paths will be imported as a single shape object (the ideal method), otherwise the Multiple Shapes option will import each and every curve as its own object (not ideal).

Import Linear Curves As...

Illustrator files define paths as a mixture of linear segments and Bezier curve segments. If a path is entirely composed of linear segments, then the path may be imported either as a Bezier curve such that all tangents are linear, or as a true series of connected line segments. The default is to import as a Bezier curve using linear tangents. Internally, there is not much difference in display quality between these two options, but this option is provided for generality.

Arrow Example Illustrator (.ai) File

The following is a portion of an Illustrator file exported from CorelDraw which defines the letter B using various paths, each path which is composed of linear and curved segements. This file represents the majority of the elements imported by this import converter. The lines which begin with %% are comments inserted into the file by us to help explain the contents of the Illustrator file:

%% '*u' is start of a compound path *u %% 'k' is the CMYK color 0.0000 0.0000 0.0000 1.0000 k %% 'm' is the move-to command to start a new spline path 133.2720 491.2560 m %% 'L' is the line-to command to move to next point of linear path 134.2800 491.2560 L 140.9040 474.1920 L 133.2720 491.2560 L %% 'f' is the completion of the spline path f %% And this is the next path of the compound path 0.0000 0.0000 0.0000 1.0000 k 127.4400 474.1920 m 125.6400 474.1920 L 127.4400 474.1920 L f %% This is the end of the compound path *U %% Likewise, here is a second composite spline path *u 0 O 0.0000 0.0000 0.0000 1.0000 k 146.9520 475.8480 m %% And this is a Bezier curve segment 147.8880 475.9920 148.6800 476.2080 149.1840 476.6400 C 149.6880 474.7680 148.4640 474.3360 146.9520 474.2640 C 146.9520 475.8480 L f 0.0000 0.0000 0.0000 1.0000 k 143.7840 482.2560 m 143.7840 475.8480 L 143.7840 482.2560 L f *U

Arrow References

Adobe Illustrator File Format Specification, available from the Adobe WEB site.