The awxfiles utility 1.5

Converting between Alias|Wavefront files

The awxfiles utility converts Alias|Wavefront files saved in the .Geo, .obj/.mod, or wire file format.

The Explore file format is identified by the .Geo suffix and the Advanced Visualizer file format is identified by the .obj or .mod suffix. Although the wire file formats are extensionless, they are recognized by awxfiles. You can easily convert the geometry and material information bidirectionally between any two of the following three file formats by employing any of several options:

From To
.Geo .obj/.mod
.Geo wire
.obj/.mod .Geo
.obj/.mod wire
wire .Geo
wire .Geo
wire .obj/.mod

To run awxfiles, type the following:

awxfiles [ -help ] [ -vers ] [ -banner ] [ -W partition ] [ -P project ] [ -O output_format: (g)eo, (w)ire, (o)bj, (m)od, (d)sided ] [ -v names ] [ -x names ]

Transformation options

[ -tAngle rotation_angle ] [ -tAxes x y z ] [ -tCenter x y z ] [ -tScale x y z ] [ -tTrans x y z ] [ - images ]

Polygonal options

[ -eAngle smoothing_angle ] [ -rVal detail line border ] [ -rMode border group texture edge ] [ - rRatio ratio ]

Metaball options

[ -B metaball_tesselation ] [ -nofix ] [ -angle a ] [ -thresh t ] [ -min minDepth ][ -max maxDepth ]

Surface options

[ -N ] [ -T surface_tesselation ]

[ -ExpMode Explore_mode: (r)elative | (a)bsolute | (u)niform ]

[ -U use: (p)lanar_error | (s)ize | (b)oth ] [ -p planar_threshold ] [ -s size_threshold ] [ -f frontier_threshold ] [ -l subdivision_level ] [ -lu u_level ] [ -lv v_level ]

[ -AlMode Alias_mode: (a)daptive | (u)niform | (x)approximate total ]

[ -U use: (t)riangle | (q)uadrilateral ] [ -m subdivision_limit ]

[ -mi subdivision_min_limit ] [ -ma max_limit ] [ -c curve_threshold ]

[ -l subdivision_level ] [ -lu u_level ] [ [ -lv v_level ]

[ -n number_of_polygons ] [ -o count_tolerance ] [ -p curve_tolerance ]

Wire specific options

[ -E ] [ -R ] [ -I ] [ -V vertex_group (to/from): (s)et | (c)luster | (b)oth ]

Tav (.obj/.mod) specific options:

[ -G grouping information - ao ] [ -F polygonal_options: ac ]

Explore specific options

[ -A ] [ -old ] [ -ref ]

Mandatory option

file(s)_in [ file_out ]

You must give the name of the input filename. If you do not give a file extension, the file ending with .obj is searched for first, then .mod, and finally .Geo.

If you do not give an output filename, the resulting file will have the same base name as the input filename but with a different suffix (see the output format for file format and defaults). If you specify several input filenames, they are all merged into a single output file.

Conventions

Options

-help

Type awxfiles -help to display all the command-line options for the program.

-vers

Type awxfiles -vers to display which version of the program you are using and the date of this version.

-banner

Type awxfiles -banner to prevent the banner of the program from being displayed.

-O output format

Creates the output format you want the resulting files be in.

The double-sided format is used only in combination with the Advanced Visualizer formats: .obj, and .mod. You can type the following in upper case or lower case.

-O g for the Explore file format .Geo, .Grp, and .Col

-O w for the wire file format.

-O o for the .obj file format

-O od for a double-sided .obj file format

-O m for the .mod file format

-O md for a double-sided .mod file format

For example, typing the following line converts the file named sphere.Geo to a file named sphere.obj: awxfiles -O o sphere.Geo

-x name1,name2,...

When you type -x, only the named objects are converted. The names of objects are separated by commas without a space between the names of objects.

-v name1,name2,...

When you type -v, all objects except the named objects are converted. The names of objects are separated by commas without a space between the names of objects.

For both the -x and the -v options, you can specify a range by separating names with two commas, for example, nameA,,nameD converts items ranging from nameA up to nameG.

Transformation options

-tAngle rotation_angle

The default rotation angle is zero degrees. For example, typing the following line converts the object named sphere.Geo and rotates it at a 90-degree angle around the Z axis: awxfiles -tAngle 90 sphere.Geo

-tAxes x y z

Lets you define the rotation and translation axis by entering X, Y, and Z values. The default values are 0 0 1, meaning that you rotate around the Z axis.

-tCenter x y z

Lets you define the rotation and translation center by entering its X, Y, and Z values. The default values for rotating and translating are 0 0 0.

-tScale x y z

Lets you define the scaling values by entering X, Y, and Z values. The default values for scaling are 1 1 1.

-tTrans x y z

Lets you define the translation values by entering X, Y, and Z values. The default values for translating are 0 0 0.

When you use one of these transformation options, the other four options are applied with their default value.

-images

Copies any referenced texture maps to the current project directory.

Polygonal options

-eAngle smoothing_angle

Is the angle value for smoothing edges. Any angle value between two connected facets greater than the value you type produces a hard edge. This means that the render will show them hard; otherwise, edges are rendered soft. The default angle is 30 degrees.

Polygonal reduction

You can slim down the size and complexity of overweight polygonal objects by using three different reduction methods:

-rVal

-rMode

-rRatio

A good reason for extracting a lighter object from a detailed object is to save on memory at rendering time. This is especially useful when rendering an object far away in the distance or in shadow. Also, this cost-saving feature shortens the time between skeleton movements when previewing in your animation program (although at rendering time, you need to replace them with the non-simplified objects).

Finally, you will also find this function useful for reducing metaballs, especially those consisting of over 30,000 polygons. The reduced objects retain the grouping information.

-rVal detail line border

Indicates the amount by which the detail, line, and border are to be reduced. The values, ranging from 0 to 1, represent tolerance values rather than exact percentages. The default is 0.5. For example, typing the following line reduces the detail by 0.2, the line by 0.9, and the border by 0.1:

-rVal 0.2 0.9 0.1 detail controls the line of force and the planarity of the facets. A line of force refers to the dominant lines that characterize the shape of an object.

line controls the limit between two facet groups or a sequence of hard edges or lines of force. In other words, a line signals the location of the main features of a polygon. Intermediate points between end points on lines may be removed depending on the line reduction value. You may find it useful to combine the line and detail reduction parameters.

border controls intermediate points on connected edges, edges that are aligned depending on the border reduction value, are removed.

-rMode border groups textures edges

Indicates whether or not you want to keep the border, group edges, texture edges, or edges by setting each one to on or off.

border When set to on, the borders of objects are maintained. When set to off, the borders of objects may be modified.

groups When set to on, the borders of facet groups are maintained. When set to off, the borders of facet groups may be discarded.

textures When set to on, the textures of facet groups are maintained. When set to off, the texture the border of the texture map or between two texture maps is deformed.

edges When set to on, the hard edges of objects are maintained. When set to off, the hard edges of objects may be modified.

For example, to reduce the border and edges but not the groups and textures, you can type:

-rMode on off off on

-rRatio ratio

Is the percentage by which an object is reduced, ranging from zero to 100. The default is zero, meaning that no reduction is done. Sometimes, the value you specify may not be accepted because it is considered too high depending on the geometry of your object and the other parameters you specify. In such situations, the highest value possible is automatically chosen.

Metaball options

-B metaball_tesselation

Creates a polygonal object from a metaball; metaball objects are replaced by polygons which can then be subsequently modified using any of the polygon functions. This mode is turned on when you are writing wire or .obj file formats.

All intersections between the metaball skin and a 3D-grid are computed. The size of this grid affects the shape of the resulting facet. You can modify the size of this grid by giving values for the minimum subdivision and maximum subdivision. These terms refer to the number of times the grid is subdivided.

When the metaball skin is close to an intersection point on the grid, small facets are created whereas neighboring facets can be very large. Polygons resulting from such a conversion are likely to behave poorly in subsequent modeling operations such as Booleans. You can avoid such an undesirable result by bending the 3-D grid to make the polygon match the shape of the metaball and if necessary deforming each cube using the threshold parameter.

-nofix

Cracks are not automatically fixed.

-angle angle

Is the angle threshold between neighboring facets. Decreasing this value will increase the number of polygons. The default angle is 30 degrees (a negative value will cause a uniform subdivision).

-thresh t

Is a specified percentage of the length of the cube edge. The lower the threshold value, the better the approximation. The default is 0% (a negative value outputs any triangle).

During the conversion, the distance is computed between a corner of the cube and the surface of the metaball. When the threshold value is less than this distance, the corner point is automatically relocated to the surface of the metaball. When you define a threshold value, for example 0.01, the 3D grid is automatically bent along the metaball skin, so that all the resulting facets do not have disparate sizes whereas a value of 0.05 would make the 3D grid bend less than 0.01.

-min minDepth

Is the minimum octree depth (defaults to 1).

-max maxDepth

Is the maximum octree depth (defaults to 5).

Surface options

-N

Converts surfaces into Bézier networks.

-T

Converts surfaces to polygons. You can use either the Alias tessellation techniques when you are reading wire files, or the Explore ones when reading other files.

Typing -T without any options means that tessellation is done using the default values which are the same as in the Alias (Studio, PowerAnimator) or Explore environments. However, you can use the following options to change all or some of the default values for the -T option.

-ExpMode Explore mode

r relative

a absolute

u uniform

Adaptive method only - Explore (relative or absolute mode)

The surface is approximated by a polygonal object using three different criteria. The use option specifies how you want to mix the first two.

-U use (p)lanar_error | (s)ize | (b)oth

-p is the maximum distance (planar_error) between created facets and actual surface.

-s is the maximum size of facets created (size_threshold).

-f is the maximum distance (frontier_threshold) between created frontier (or border) edges and actual surface frontier edges.

Note that the term planar_error in the awxfiles utility is known as the Error parameter in the Convert from: Nurbs function, described in Chapter 9 of the 3Design User's guide.

If you want to convert to a regular mesh of facets, use the size criterion. This option subdivides all patches in approximately equally sized facets. However, if the only need is for accuracy, use planar_threshold.

The smaller the value of the planar_threshold parameter, the more accurate the result. The planar_threshold parameter creates facets where needed. That is, the more curved the surface is, the more it will be subdivided. Values can be given as a relative or absolute value. In relative mode, the value indicates a percentage of the overall object size. In absolute mode, the value is a real size measured in world coordinates. By default, the subdivision type is relative, mode equals both, planar_error equals 0.1 and size equals 0.2.

Uniform method (Explore Only)

The surface is approximated by a recursive subdivision with the same user-defined control over the entire surface, instead of the local-criteria controls of the Adaptive method.

Explore users will find this mode useful for interpolating NURBS objects in Anim. Use the subdivision level (in U, V or both directions) to control the recursive depth:

-lu u_level

Is the subdivision level in the U direction only.

-lv v_level

Is the subdivision level in the V direction only.

-l subdivision_level

Is the subdivision level in both directions.

-AlMode Alias_mode: (a)daptive | (u)niform | (x)approximate total ]

Use this option to convert Alias NURBS surfaces, trimmed NURBS surfaces and facets to polysets in a controlled manner. This option is used only when importing wire files:

a adaptive

u uniform

x approximate total

-U use: (t)riangle | (q)uadrilateral

Determines the type of polygons that are created: quadrilaterals or triangles.

quadrilateral Creates four-sided polygons. Note that when a trimmed surface is being tesselated, some three-sided polygons may be created along the trimmed edge, even though the option is set to quadrilateral.

Also, note that when using quadrilaterals and the adaptive subdivision type, it may be necessary to set the min and max values to the same value to avoid cracks from appearing in the polygonal surface.

triangle Three-sided polygons are created.

adaptive The Adaptive subdivision type (Alias only) subdivides the surface into polygons depending on the degree of curvature the surface has. Each surface is converted into the minimum allowable number of polygons that satisfy the curvature parameter. If the curvature parameter cannot be satisfied by subdividing within the maximum subdivision parameter, the maximum subdivision value is used.

Adaptive subdivision is the only method available for trimmed surfaces.

-mi min_limit

Specifies the minimum number of times each patch on the surface must be subdivided in either the U or the V parameter direction.

-ma max_limit

Specifies the maximum number of times each patch on the surface must be subdivided in either the U or the V parameter direction.

-c curve_threshold

Is the curve threshold value, specifying how close the resulting polygons must approximate to the original surface. Higher values produce a better approximation of the surface than lower values, depending on the constraints set by the minimum subdivision parameters.

By default, the subdivision type is adaptive, the output type is triangles, the minimum equals 2, the maximum equals 4 and the curve threshold is 0.6.

uniform (for Alias Only)

If the uniform subdivision type is approximate total, each surface is repeatedly tesselated with different adaptive subdivision parameters until user-defined options are found which produce a total polygon count close to the requested number of polygons. If the requested polygon count cannot be satisfied within the given search tolerance, either the closest tesselation that is found below the requested total, or the minimum number of polygons that possibly can be created is generated.

Note that the uniform setting is not available for trimmed surfaces. To achieve a uniform subdivision on trimmed surfaces, select the adaptive subdivision type and set the min and max parameters equal to the number of times you want the surface subdivided.

-lu u_level

Specifies how many times to subdivide each patch on the surface in the U parameter direction.

-lv v_level

Specifies how many times to subdivide each patch on the surface in the V parameter direction.

-approximate total (for Alias Only)

Each surface is repeatedly tesselated with different adaptive subdivision parameters until settings are found which produce a total polygon count close to the requested number of polygons. If the requested polygon count cannot be satisfied within the given search tolerance, either the closest tesselation that is found below the requested total, or the minimum number of polygons that possibly can be created is generated.

-n total

Specifies the total number of polygons that all the surfaces are tessellated into. To prevent an endless search, the next two parameters let you specify tolerances that end the search when they have been satisfied. The search continues until one of the tolerances is satisfied.

-c count_tolerance

Is the count tolerance value, specifying how close the number of polygons created is, to the total number you enter for the -n option. The search ends when a test tesselation, based on the parameter settings you specify, produces a polygon count between the total number of polygons minus the count tolerance and the number plus the count tolerance.

-p curve_tolerance

Is the curve tolerance value. Since it may not be possible to find a tesselation that satisfies the total number requested within the given count tolerance, this parameter ends the search when the changes to the adaptive subdivision curvature threshold parameter falls below this value.

The number of created polygons can get close to the requested total number, depending on the type of surface being tesselated and the variations in curvature. In general, we get closer to the requested total for surfaces whose curvature varies widely and continually.

Tav (.obj/.mod) specific options

-G grouping_information: ao

a do not write any groups

o do not add the default group by object

-F polygonal_options: ac

a triangulate all facets

c do not triangulate concave facets

Wire specific options

-E

Converts Alias FACE geometry into curves instead of trimmed surfaces.

-R

Discards .Geo, .obj, and .mod polygon vertex normals on export to wire.

-I

On export to the wire format, keep all the .Geo, .obj, and .mod surface materials by subdividing surfaces if necessary. The default is to keep the .Geo, .obj, and .mod surfaces intact and discard all except a single material.

-V vertex_group(to/from): (s)et | (c)luster | (b)oth

Converts the vertex grouping information (.Geo, .obj, and .mod vertex groups are translated to wire sets and clusters, and vice versa).

From .Geo, .obj, and .mod to wire

s convert vertex groups to sets only; this is the default.

c convert vertex groups to clusters only

b convert vertex groups to both sets and clusters.

From wire to .Geo, .obj, and .mod

s convert only sets to vertex groups.

c convert only clusters to vertex groups.

b convert both sets and clusters to vertex groups; this is the default.

Explore specific options

-A

Generates a Face file format database (for Explore users only).

-old

Normally, you use the 4.2 file format but if for some reason you wish to use a model in the earlier file format, then use this option to create a version 4.1 .Geo file.

-ref

Creates a reference object using the parametric mapping information. The reference object is used in the rendering to ensure that maps move in sync with the mapped object. Works only on polygonal objects.

Limitations

Unfortunately, there are a few limitations to how data is transferred between the various Alias Wavefront files and you should be aware of the following points.

From Explore

Loss of polygon holes

There are no holes in the Studio polyset or .obj representation. This means that the tessellated representation of 3Design polygons-with-holes must be transferred to another format.

Data being transferred from 3Design to the wire format and back again to 3Design is lost. Because the wire or .obj format did not get the edge-loop information of the polygon holes, it cannot pass back that information to 3Design.

Loss of Metaballs

Since there is no corresponding Studio or Advanced object, metaballs are tessellated and converted to polygons. Of course, this results in data loss when files are converted from 3Design to Studio and/or Advanced Visualizer and then converted back into 3Design.

From Advanced Visualizer

Loss of special surface types

In 3Design, there is only one type of surface (NURBS). So all other types (Cardinal, Bézier, and so on) are transformed to NURBS. This means that data is lost when files are converted from Advanced Visualizer to 3Design and then converted back to Advanced Visualizer.

Degraded Trim Curves

3Design has polyline trim curves only. So Advanced Visualizer trim curves (NURBS) are linearized before conversion to 3Design format. This means that data is lost when files are converted from Advanced Visualizer to 3Design and then converted back to Advanced Visualizer.

To and from Studio or PowerAnimator

Degraded trim curves

Because 3Design has polyline trim curves only, Studio trim curves (NURBS) are linearized before conversion to 3Design format. This means that data is lost when files are converted from Studio to 3Design and then converted back to Studio. Trim curves being converted back to Studio are missing the NURBS capabilities and accuracy, which probably will affect continuity. There may also be data explosion leading to increased memory usage and corresponding performance problems for very large models.

Trim curve edge connectivity information loss

In 3Design there is edge connectivity information for surface boundaries, but there is no trim curve edge connectivity. This does not necessarily present a problem, however, an attempt by Studio to stitch a 3Design "solid" model may or may not succeed at trim curve boundaries. In any case, 3Design surface models with connectivity are stitched, and the resulting open shell created in Studio maintains the 3Design connectivity information.

Data is lost when most closed shells from Studio are transferred to 3Design since they contain connectivity information at shared trim curve boundaries. Because the trim curves are also approximated with linear curves, Studio may not be able to recreate the shell after a bi-directional translation.

Studio face

Because there is no corresponding 3Design object, the face is transferred to 3Design as a trimmed surface, and therefore, a co-planar restriction on the curves is applied. If the curves are not co-planar, then the face curves are translated to 3Design curves.

Studio target surfaces

Because there is no corresponding 3Design object, information is lost in a bidirectional translation. The target surface is transferred as a surface and world-space curves that represent the curves on the surface. These world-space curves can be used to trim the surface in 3Design.

Studio DAG hierarchy

One of the fundamental differences between the Explore/Advanced Visualizer data model and the Studio data model is how objects are organized. In Studio, objects are organized in a DAG hierarchy, and this hierarchy is a fundamental part of animating objects in PowerAnimator. In the Explore and Advanced Visualizer environment, this hierarchy does not exist. Consequently, this DAG hierarchy gets lost in the translation.

Studio Vertex Groups on Surfaces

Because there are no vertex groups for surfaces in 3Design, sets of vertices are lost in a bidirectional translation.

3Design facet and material groups

Surfaces

In 3Design, a facet group can be a partial surface; that is, more than one material can be assigned to a surface object. Although you can adopt one of two solutions to this problem, both result in data loss (see the -I option).

One solution is to subdivide the 3Design surfaces until each facet group represents one surface object, and a single material per surface object. This maps to Studio's single material per surface directly. This solution assumes that material assignments are more important than geometric integrity, because the geometry's representation is different, but the shape remains unchanged.

If geometric integrity is important, then another solution is to reorganize the 3Design groups and partitions so that all facets of a surface are in the same group, meaning that a single material is used for the entire surface, and the remaining materials assigned to facets of the surface are lost.

Because there is no corresponding set in Studio, facet modeling groups for surfaces are lost in a bidirectional translation.

Polygons

In 3Design, a group can be a group of vertices, edges, or facets. Groups of edges are not transferred to Wire files. The facet groups are converted to vertices and the FacetGroup_ prefix is added to the group name. In Studio, the prefix helps you to identify the original facet groups, making it easier for you to convert them back from Studio to 3Design facet groups.

A Studio shader (material) can be assigned per polygon. However, a polyset may only have a maximum of 64 shaders assigned to it. Consequently, a 3Design polygon with more than 64 materials assigned to its facets may lose some material information.

3Design Material Partition

In 3Design, you can create more than one material partition. Because there is only a single list of shaders in Studio, only materials in the last 3Design partition are converted to shaders. The last partition in the list of partitions is the default for the Explore Render. This means that the other partitions in the list are lost when you are converting files from 3Design to Studio.

Materials

In the .Col file, a reference to a material (shader) is allowed (including UV texture mapping shaders as in 3Design version 4.2 and later). The shader is defined either in the .mtl or in the .mat file (Advanced Visualizer and Explore).

Currently, texture and Phong parameters can be transferred. But, more complex shaders may be lost when you are reading and /or writing wire files. When you save files with complex shaders, even parameters of referenced materials, are not included because 3Design and the awxfiles utility do not read .mat file.





[email protected]

Copyright © 1998, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.